Building WiX x86 / x64 using Platform Attribute
I am using the following define to make my script setup flexible according to my build environment.
if $(var.Platform)=x64 "ProgramFiles64Folder" define PlatformProgramFilesFolder = "yes" define win64Flag = "bin\x64\Release" define TargetConfigurationPath = else "ProgramFilesFolder" define PlatformProgramFilesFolder = "no" define win64Flag = "bin\x86\Release" define TargetConfigurationPath = endif
in detail I remember the variable win64Flag which I use in every attribute of Win64 components. I also use the platform in the "Platform" attribute of the packages. But to get back to the Win64 attribute, I use this variable like this:
And I always get a warning that the use of this operator in the YesNoType attribute is invalid.
I am creating this stuff using candle.exe with this call:
candle.exe -ext WixUtilExtension -dPlatform=x86 "Deployment\WiX Setup Project\SetupScript.wxs" -out "Deployment\TempBuildOutput\SetupScript x86.wixobj" light.exe -ext WixUIExtension -ext WixUtilExtension "Deployment\TempBuildOutput\SetupScript x86.wixobj" -out "Deployment\TempBuildOutput\Installer_x86.msi"
I have a CustomAction in my script that automatically launches the application if the installation is complete. This works fine on x64 assemblies, but not x86 assemblies. This is why I think there might be something wrong with the Win64 attribute, or better, in the way I use it.
But in my thoughts, something should be right with this code because the files are installed in the appropriate folder on x64 (Program Files) and x86 (Program Files (x86)). But I am asking myself why my applications are not starting after the installation is complete.
I am working on Windows x64, could this be the reason why I am not running my x86 autostart applications?
Is there a way to resolve the warning about my Win64 attribute usage?
source to share
I can't tell you why your application won't launch after installation is complete without additional information to diagnose the problem, but I can tell you why you are getting an invalid attribute warning.
Invalid attribute warning is generated by Visual Studio if you want to compile your project on the command line, which you will not see, you will see a warning. The Visual Studio XML Editor performs automatic XML schema validation if it recognizes the schema of your XML document. Wix XML Schema defines the values allowed for an attribute
. Visual Studio sees that you do not have one of these values and will kindly advise that you are not following a particular pattern. Wix, on the other hand, first preprocesses the document and replaces the violation value with the value you define in your included file, making it such that the document passes schema validation.
In short, this warning is probably not the cause of the problem you are seeing.
source to share