首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >获取错误源:错误源:系统找不到类型为‘candle.exe’的文件'Product.wxs‘

获取错误源:错误源:系统找不到类型为‘candle.exe’的文件'Product.wxs‘
EN

Stack Overflow用户
提问于 2016-11-14 21:39:49
回答 3查看 6K关注 0票数 2

我正在使用最新版本的wix v3.10.3,同时执行以下命令:

代码语言:javascript
复制
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 

我得到以下错误:

代码语言:javascript
复制
candle.exe : error CNDL0103 : The system cannot find the file 'Product.wxs' with type 'Source'.

当我使用Visual Studio进行编译时,我没有得到任何错误,构建成功。而通过命令提示符,我得到了上面的错误。

有没有人能建议如何解决这个问题?

EN

回答 3

Stack Overflow用户

发布于 2017-02-09 07:39:32

candle.exe在解析带引号的以反斜杠结尾的命令行参数时似乎遇到了问题。例如,更改以下内容:

代码语言:javascript
复制
-d"ADX_PATH=C:\Program Files (x86)\Add-in Express\Add-in Express .NET for Internet Explorer\\"

至:

代码语言:javascript
复制
-d"ADX_PATH=C:\Program Files (x86)\Add-in Express\Add-in Express .NET for Internet Explorer"

在您提供的命令中,同一问题存在于多个位置。

我使用的宏是这样的:

代码语言:javascript
复制
-d"BinariesDir=$(OutputPath)"

我不得不改成:

代码语言:javascript
复制
-d"BinariesDir=$(OutputPath)."

这样,当它们被展开时,就不会以\结尾。

票数 2
EN

Stack Overflow用户

发布于 2017-01-09 16:26:54

从Product.wxs和Product.wixobj文件所在的文件夹中运行批处理文件。让我们将批处理文件命名为installer.bat

使用以下命令编辑installer.bat:

代码语言:javascript
复制
candle Product.wxs 
light Product.wixobj
@pause

将installer.bat文件复制到Product.wxs文件所在的setupproject文件夹以及其他bin和obj文件夹中。运行installer.bat文件。希望这对你有用。

谢谢

票数 1
EN

Stack Overflow用户

发布于 2019-08-22 22:53:01

这可能是因为您引用的product.wxs中的某个片段为空。

就像在product.wxs中

代码语言:javascript
复制
!--<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>

在这里我们可以看到Component必须有一些东西才能成功构建。

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40590094

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档