[wix-users] MSBuild daily build error

Davidsen, Zac (Zachary) T ZTDAVIDSEN at beckman.com
Fri Jan 7 08:40:47 PST 2022


I don't know if it satisfies quite the same use cases, but you might also look into just using the WiX toolset nuget package instead of embedding all the tools in source control.

As for the compile error, that looks to me like it's a problem in your .csproj file.  Is the project importing wix.targets instead of wix.CA.targets?

The bottom of my custom action project looks like this:

  <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') " />


Confidential - Company Proprietary

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Dima Vasilkov via wix-users
Sent: Thursday, January 6, 2022 6:40 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Dima Vasilkov <dimvasilk at gmail.com>
Subject: [wix-users] MSBuild daily build error

Hello,

I have an existing WiX project that I am setting up for daily builds following the instructions at https://urldefense.proofpoint.com/v2/url?u=https-3A__wixtoolset.org_documentation_manual_v3_msbuild_daily-5Fbuilds.html&d=DwICAg&c=9mghv0deYPYDGP-W745IEdQLV1kHpn4XJRvR6xMRXtA&r=Hblpuym5RtUs_4R6qwcviv7o1-X2VNe9YBkPtiuw4mw&m=zx9Vo11eR1lA-ivWx8u71YNnYmzoIfTPUiYCAZWuvdKjWVahpCmd1p56F0TipirQ&s=UFsNULuaH0L5KdsL4p81eqsqff64MeL3YVrMzYVN7TQ&e= .
However I am getting an issue compiling a custom action. For some reason msbuild is using candle to try to compile the .cs file

Here is the relevant section from .csproj
  <ItemGroup>
    <Compile Include="CustomAction.cs"/>
    <Compile Include="Properties\AssemblyInfo.cs"/>
    <Content Include="CustomAction.config"/>
  </ItemGroup>

Here is msbuild output
PS C:\Users\Dims\pix\builds\CA2bt9yg\0\pix\pix\WiX> & "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe" `
>>
"/p:DefineConstants=`"Branding=foobar;MajorMinorPatch=1.19.43;RelID=asdf`""
`
>>         /property:Configuration=Release /p:SignOutput=true -m
Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

Build started 1/6/2022 5:45:37 PM.
     1>Project "C:\Users\Dims\pix\builds\CA2bt9yg\0\pix\pix\WiX\pixBA.sln"
on node 1 (default targets).
     1>ValidateSolutionConfiguration:
         Building solution configuration "Release|Mixed Platforms".
     1>Project "C:\Users\Dims\pix\builds\CA2bt9yg\0\pix\pix\WiX\pixBA.sln"
(1) is building
"C:\Users\Dims\pix\builds\CA2bt9yg\0\pix\pix\WiX\pixStack\pixStack.wixproj"
(2) on n
       ode 3 (default targets).
     2>Compile:
       Skipping target "Compile" because all output files are up-to-date with respect to the input files.
       Link:
       Skipping target "Link" because all output files are up-to-date with respect to the input files.
       GetCabsToSign:
       Skipping target "GetCabsToSign" because all output files are up-to-date with respect to the input files.
       GetMsiToSign:
       Skipping target "GetMsiToSign" because all output files are up-to-date with respect to the input files.
       Signing:
       Skipping target "Signing" because all output files are up-to-date with respect to the input files.
     2>Done Building Project
"C:\Users\Dims\pix\builds\CA2bt9yg\0\pix\pix\WiX\pixStack\pixStack.wixproj"
(default targets).
     1>Project "C:\Users\Dims\pix\builds\CA2bt9yg\0\pix\pix\WiX\pixBA.sln"
(1) is building
"C:\Users\Dims\pix\builds\CA2bt9yg\0\pix\pix\WiX\checkWslVmp\checkWslVmp.csproj"
(4)
        on node 4 (default targets).
     4>Compile:
         ..\binaries\candle.exe -dCPC -d"Branding=foobar"
-dMajorMinorPatch=1.19.43 -dRelID=dfe7ebb7-9eb3-40de-b3e4-054a7814b1e1
-d"DevEnvDir=*Undefined*" -dSolutionDir=C:\Use
         rs\Dims\pix\builds\CA2bt9yg\0\pix\pix\WiX\ -dSolutionExt=.sln -dSolutionFileName=pixBA.sln -dSolutionName=pixBA -dSolutionPath=C:\Users\Dims\pix\builds\CA2bt9yg\0\pix
         \pix\WiX\pixBA.sln -dConfiguration=Release -dOutDir=bin\Release\
-dPlatform=x86
-dProjectDir=C:\Users\Dims\pix\builds\CA2bt9yg\0\pix\pix\WiX\checkWslVmp\
-dProjectExt=.cspro
         j -dProjectFileName=checkWslVmp.csproj -dProjectName=checkWslVmp -dProjectPath=C:\Users\Dims\pix\builds\CA2bt9yg\0\pix\pix\WiX\checkWslVmp\checkWslVmp.csproj
-dTargetDir=C:\

 Users\Dims\pix\builds\CA2bt9yg\0\pix\pix\WiX\checkWslVmp\bin\Release\
-dTargetExt=.wixlib -dTargetFileName=checkWslVmp.dll -dTargetName=checkWslVmp -dTargetPath=C:\Users\Dim

 s\pix\builds\CA2bt9yg\0\pix\pix\WiX\checkWslVmp\bin\Release\checkWslVmp.dll
-out obj\x86\Release\ -arch x86 CustomAction.cs
         Windows Installer XML Toolset Compiler version 3.11.2.4516
         Copyright (c) .NET Foundation and contributors. All rights reserved.

         CustomAction.cs

 4>C:\Users\Dims\pix\builds\CA2bt9yg\0\pix\pix\WiX\checkWslVmp\CustomAction.cs(1):
error CNDL0104: Not a valid source file; detail: Data at the root level is invalid. Line 1, pos
       ition 1.
[C:\Users\Dims\pix\builds\CA2bt9yg\0\pix\pix\WiX\checkWslVmp\checkWslVmp.csproj]

Which file can I check to fix this issue?

Best,
Dima

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=DwICAg&c=9mghv0deYPYDGP-W745IEdQLV1kHpn4XJRvR6xMRXtA&r=Hblpuym5RtUs_4R6qwcviv7o1-X2VNe9YBkPtiuw4mw&m=zx9Vo11eR1lA-ivWx8u71YNnYmzoIfTPUiYCAZWuvdKjWVahpCmd1p56F0TipirQ&s=AF-s7DsOJcd4Azb2Bp7iEcijH6xhfxrSNdabvT1bQrM&e=
Please be advised that this email may contain confidential information. If you are not the intended recipient, please notify us by email by replying to the sender and delete this message. The sender disclaims that the content of this email constitutes an offer to enter into, or the acceptance of, any agreement; provided that the foregoing does not invalidate the binding effect of any digital or other electronic reproduction of a manual signature that is included in any attachment.



More information about the wix-users mailing list