Output directory different for command line build vs. Visual Studio #7510
-
I'm trying to get a WiX v4 project to build on a build server, and running into a problem with the build output directories that I can't get my head around. The project is set up so that the code compiles first, then I have my first .wixproj which uses Heat to harvest the files from the C# build directory and put them into an MSI. Then I have a second .wixproj which creates a bundle, first installing the .net runtime if needed and then installing the MSI I just created. Everything works fine when I build using visual studio - the first MSI is placed in the bin\x86\Release\ directory, where it is found by the bundle like this:
However when I build the same project using dotnet build from the command line (or when the build server does the same thing) the build fails because the MsiPackage can't find the source file. When I look, it's because the MSI is now placed in 'bin\Release' rather than 'bin\x86\Release'. The same happens when I use msbuild from the command line. Any idea why the directory is changing? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
When you add projects as dependencies to a WIX project in Visual Studio, you can reference their output directly without a path. That may also work with MSI outputs from a WIX project. Try adding the first WIX project to the second one as a dependency and reference the MSI as follows: <MsiPackage SourceFile="MyInstaller.msi" bal:DisplayInternalUICondition="1" /> |
Beta Was this translation helpful? Give feedback.
When you add projects as dependencies to a WIX project in Visual Studio, you can reference their output directly without a path.
That may also work with MSI outputs from a WIX project. Try adding the first WIX project to the second one as a dependency and reference the MSI as follows: