[wix-users] How to build WiX Custom Action projects without having VS Extension installed?

Edwin Castro egcastr at gmail.com
Wed Jan 15 15:19:18 PST 2020


Which version of WiX v3 are do you have installed? I think I see
wix.ca.targets installed by the WiX CoreMSI when the MSBuild Support
feature is selected.

https://github.com/wixtoolset/wix3/blob/wix3112rtm/src/Setup/CoreMsi/MSBuild.wxs


I think it gets installed into
[ProgramFilesFolder]\MSBuild\Microsoft\WiX\v3.x

https://github.com/wixtoolset/wix3/blob/wix3112rtm/src/Setup/CommonLib/Folders.wxs


I expected MSBuildExtensionsPath to resolve to C:\Program Files
(x86)\MSBuild for a 32-bit process.

https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-reserved-and-well-known-properties


If WixCATargetsPath is not explicitly set to C:\Program Files
(x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild
\Microsoft\WiX\v3.x\Wix.CA.targets then MSBuildExtensionsPath must be
getting resolved to C:\Program Files (x86)\Microsoft Visual
Studio\2017\BuildTools\MSBuild by the version of MSBuild used on your build
server.

I'd confirm that C:\Program Files
(x86)\MSBuild\Microsoft\WiX\v3.x\wix.ca.targets exists and explicitly set
WixCATargetsPath on your build server OR figure out why
MSBuildExtensionsPath seems to be getting resolved to a non-standard
directory.

--
Edwin G. Castro


On Wed, Jan 15, 2020 at 2:53 PM Philipp Weber via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> Hi,
>
> I've got a C# solution containing a WiX installer project, which
> references a C# Custom Action project for WiX v3. Within the csproj of
> that CA project, there is a WixCATargetsPath entry referencing the file
> Wix.CA.targets:
>
> <WixCATargetsPath Condition=" '$(WixCATargetsPath)' == ''
>
> ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets</WixCATargetsPath>
>
> The Wix.CA.targets is obviously part of the installation of the Wix
> Toolset VS 2017 Extension, and not of the Wix Toolset itself. But on our
> build server, neither Visual Studio nor Wix Toolset Extension is
> installed, which is why the build there fails:
>
> error MSB4019: Das importierte Projekt "C:\Program Files (x86)\Microsoft
> Visual Studio\2017\BuildTools\MSBuild\Microsoft\WiX\v3.x\Wix.CA.targets"
> wurde nicht gefunden. Vergewissern Sie sich, dass der Pfad in der
> <Import>-Deklaration korrekt und die Datei auf dem Datenträger vorhanden
> ist.
>
> On the build server, WiX Toolset is installed, but not the corresponding
> VS extension.
> So is it possible to build Custom Action projects on the build server
> without having the Wix Toolset Extension installed? Is there any
> alternative?
>
> Thanks for your help in advance
> Philipp
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/



More information about the wix-users mailing list