2

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

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 

我收到以下错误:

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

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

谁能建议如何解决这个问题?

4

3 回答 3

3

candle.exe似乎无法解析以反斜杠结尾的引用命令行参数。例如,改变这个:

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

至:

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

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

我正在使用这样的宏:

-d"BinariesDir=$(OutputPath)"

我不得不改为:

-d"BinariesDir=$(OutputPath)."

这样当它们被扩展时,它们就不会以\.

于 2017-02-08T23:39:31.527 回答
1

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

编辑您的installer.bat:

candle Product.wxs 
light Product.wixobj
@pause

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

谢谢

于 2017-01-09T08:26:53.870 回答
-1

这可能是您指的是 product.wxs 中的一些片段,它是空的。

就像在 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>

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

于 2019-08-22T14:53:01.293 回答