2

I am using the latest version of wix v3.10.3 and while executing the following command:

D:\File_Transfer\11-Nov-16\internetexplorer\2000\INTERNET_EXPLORER_SRC>call "C:\Program Files (x86)\WiX Toolset v3.10\bin\candle.exe" -sw1076 -sw1072 -dDebug -d"ADX_PATH=C:\Program Files (x86)\Add-in Express\Add-in Express .NET for Internet Explorer\\" -d"DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\\" -d"SolutionDir=D:\File_Transfer\11-Nov-16\internetexplorer\2000\INTERNET_EXPLORER_SRC\PMP\\" -dSolutionExt=.sln -dSolutionFileName=PMP.sln -dSolutionName=PMP -d"SolutionPath=D:\File_Transfer\11-Nov-16\internetexplorer\2000\INTERNET_EXPLORER_SRC\PMP\PMP.sln" -dConfiguration=Release -dOutDir=bin\Release\ -dPlatform=x86 -d"ProjectDir=D:\File_Transfer\11-Nov-16\internetexplorer\2000\INTERNET_EXPLORER_SRC\PMP\PMPSetup\1.0.0\\" -dProjectExt=.wixproj -d"ProjectFileName=PMPSetup(1.0.0).wixproj" -d"ProjectName=PMPSetup(1.0.0)" -d"ProjectPath=D:\File_Transfer\11-Nov-16\internetexplorer\2000\INTERNET_EXPLORER_SRC\PMP\PMPSetup\1.0.0\PMPSetup(1.0.0).wixproj" -d"TargetDir=D:\File_Transfer\11-Nov-16\internetexplorer\2000\INTERNET_EXPLORER_SRC\PMP\PMPSetup\1.0.0\bin\Release\\" -dTargetExt=.msi -d"TargetFileName=PMPSetup(1.0.0).msi" -d"TargetName=PMPSetup(1.0.0)" -d"TargetPath=D:\File_Transfer\11-Nov-16\internetexplorer\2000\INTERNET_EXPLORER_SRC\PMP\PMPSetup\1.0.0\bin\Release\PMPSetup(1.0.0).msi" -dPMP.Configuration=Release -d"PMP.FullConfiguration=Release|AnyCPU" -dPMP.Platform=AnyCPU -d"PMP.ProjectDir=D:\File_Transfer\11-Nov-16\internetexplorer\2000\INTERNET_EXPLORER_SRC\PMP\\" -dPMP.ProjectExt=.csproj -dPMP.ProjectFileName=PMP.csproj -dPMP.ProjectName=PMP -d"PMP.ProjectPath=D:\File_Transfer\11-Nov-16\internetexplorer\2000\INTERNET_EXPLORER_SRC\PMP\PMP.csproj" -d"PMP.TargetDir=D:\File_Transfer\11-Nov-16\internetexplorer\2000\INTERNET_EXPLORER_SRC\PMP\bin\Release\\" -dPMP.TargetExt=.dll -dPMP.TargetFileName=PMP.dll -dPMP.TargetName=PMP -d"PMP.TargetPath=D:\File_Transfer\11-Nov-16\internetexplorer\2000\INTERNET_EXPLORER_SRC\PMP\bin\Release\PMP.dll" -out obj\\Release\ -arch x86 -ext "C:\Program Files (x86)\WiX Toolset v3.10\bin\\WixNetFxExtension.dll" Product.wxs StandardUI.wxs 

I get the following error:

candle.exe : error CNDL0103 : The system cannot find the file 'Product.wxs' with type 'Source'.

When I compile using Visual Studio, I don't get any error and the build succeeded. Whereas via command prompt, I'm getting the above error.

Can anyone suggest how to resolve this?

Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
Manobala
  • 21
  • 1
  • 4

4 Answers4

3

candle.exe seems to have trouble parsing quoted command line arguments ending with a backslash. For example, change this:

-d"ADX_PATH=C:\Program Files (x86)\Add-in Express\Add-in Express .NET for Internet Explorer\\"

to:

-d"ADX_PATH=C:\Program Files (x86)\Add-in Express\Add-in Express .NET for Internet Explorer"

The same issue exists in multiple places in the command you provided.

I'm using macros like this:

-d"BinariesDir=$(OutputPath)"

which I had to change to:

-d"BinariesDir=$(OutputPath)."

so that when they are expanded, they don't end in a \.

snips-n-snails
  • 637
  • 5
  • 22
1

Run your batch file from the same folder where your Product.wxs and Product.wixobj files are. Let's name your batch file as installer.bat

Edit your installer.bat with:

candle Product.wxs 
light Product.wixobj
@pause

Copy your installer.bat file in the setupproject folder where your Product.wxs file is and other bin and obj folders are. Run the installer.bat file. Hope that works for u.

Thank you

0

I found the same error when I did not pass BOTH extension dll's like this:

-ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixUtilExtension.dll" 
-ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixUIExtension.dll"
Chris
  • 1,101
  • 8
  • 13
-1

This might be you are referring some fragment in product.wxs which is empty.

Like in product.wxs

!--<Feature Id="F_UpdateConnectionString" Title="Updating ConnectionString" Description="Update the Connection String" Level="1">
      <ComponentRef Id="SetConfigurationValues" />
    </Feature>-->

 and insidefragment 

<Fragment>
<DirectoryRef Id="INSTALLFOLDER">
      <Component Id="SetConfigurationValues" Guid="03D1E734-464F-4A2D-B385- 
  42DECB86C557">

  </Component>
    </DirectoryRef>
</Fragment>

here we can see Component must have something to build successfully.

Amol Aher
  • 189
  • 2
  • 4