[wix-users] Custom action built using new csproj file

Radek Falhar radek.falhar at sodat.com
Mon Oct 8 05:07:08 PDT 2018


Hello,

I'm trying to upgrade a WiX compiled custom action project to new 2017 csproj format.
Also, I'm trying to multi-traget both .NET 4 and .NET 4.6.1
I'm using Wix 3.11

Is this supported feature? If yes, where do I find information on how to achieve it?
When searching, it is quite hard to differentiate the new format from the old one. Also, differentiate between setup project and custom action project.

I managed to make it build using code :

  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <Import Project="$(WixCATargetsPath)" Condition=" '$(WixCATargetsPath)' != '' " />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.CA.targets" Condition=" '$(WixCATargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.CA.targets') " />
  <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixCATargetsImported)' != 'true' ">
    <Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
  </Target>

But that seems to completely override how VS builds with WiX code that ignores the multi-targeting feature.

Thanks for answer,
Radek


More information about the wix-users mailing list