Wixsharp: impossible rename file during installation

Created on 26 Nov 2018  路  4Comments  路  Source: oleg-shilo/wixsharp

https://stackoverflow.com/questions/14475166/changing-file-name-while-installing
current implementation is:
public File(string sourcePath, params WixEntity[] items)
{
this.Name = sourcePath;

probably need to split name and source path

Done / Released enhancement

Most helpful comment

@Xaddan is right. The default use case is the deployment of the file with the same name as the source file.

Everything else needs to be done by specifying custom attributes directly as in the example above.

Though in the very next release you will be able to set it via dedicated property TargetFileName:
C# new File("A.txt") { TargetFileName = "B.txt" }

All 4 comments

can you please review it and approve or reject.

You can change the name as follows:
C# File("A.txt"){AttributesDefinition = "Name=B.txt"}

@Xaddan is right. The default use case is the deployment of the file with the same name as the source file.

Everything else needs to be done by specifying custom attributes directly as in the example above.

Though in the very next release you will be able to set it via dedicated property TargetFileName:
C# new File("A.txt") { TargetFileName = "B.txt" }

@Xaddan, @oleg-shilo thank you very much ) {AttributesDefinition = "Name=B.txt"} is working

Was this page helpful?
0 / 5 - 0 ratings