-
I have a pair of small applications for which I'm using Wix 4 to install. These are .NET 6 applications which I want installed as Self Contained applications. Is there a better approach to this than adding a |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Here's what I find works really well for me. I create a repos with an Application\Application.sln and Installer\Installer.sln. My projects are like Application\Project\Project.csproj. I create a FolderPublish Profile that looks like this. FolderProfile.pubxml
In he Project.csproj I added property In my build I simply run:
This places everything I need in the Installer\Deploy folder. You can exclude stuff like .PDBs. createdump.exe and if you see something like mscordaccore_amd64_amd64_7.0.523.17405.dll you don't want that either. You only need mscordaccore.dll. From there I use my IsWiX project templates to create my WiX v4 files, drag drop the files in from the deploy folder, create a shortcut and build it all using: dotnet build $slnFile -c Release /p:MSIProductVersion=1.2.3 -o OUTPUT_ARTIFACTS_PATH It's super easy these days. |
Beta Was this translation helpful? Give feedback.
-
Try adding <ItemGroup>
<ProjectReference Include="..\path\to\Your.csproj" Publish="true" />
</ItemGroup> Then you can use the automatically added bindpath |
Beta Was this translation helpful? Give feedback.
-
Here is my solution, it's a combination of @robmen and @chrpai answers:
|
Beta Was this translation helpful? Give feedback.
Try adding
Publish='true'
to theProjectReference
in your .wixproj to your .csproj. So in "My.wixproj":Then you can use the automatically added bindpath
!(bindpath.Your)
in yourSource
attribute to reference the files.