获取错误candle.exe:错误CNDL0103:系统找不到类型为“Source”的文件“Product.wxs”

时间:2016-11-14 13:39:49

标签: c# visual-studio wix ieaddon wix3.10

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

<!DOCTYPE html>
<html>
	<head>
		<meta char="utf-8" />
		<title>Chapter 3</title>
		<style>
			body {
				background-color: #3D6DF2;
				margin-top: 15px;
			}
			video {
				background: black;
				border: 1px solid gray;
			}
			#container {
				position: relative;
				display: block;
				margin: 0 auto;
				width: 500px;
				height: 500px;
			}
			#yours {
				width: 150px;
				height: 150px;
				position: absolute;
				top: 15px;
				right: 15px;
			}
			#theirs {
				width: 500px;
				height: 500px;
			}
		</style>
	</head>
	<body>
		<video id="yours" autoplay></video>
		<video id="theirs" autoplay></video>
		<script src="main.js"></script>
	</body>
</html>

我收到以下错误:

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 

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

有人可以建议如何解决这个问题吗?

3 个答案:

答案 0 :(得分:1)

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

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

candle Product.wxs 
light Product.wixobj
@pause

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

谢谢

答案 1 :(得分:0)

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)."

因此,当它们展开时,它们不会以\结尾。

答案 2 :(得分:-1)

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

像 在product.wxs中

@font-face {
  font-family: 'My font';
  src: url('./fonts/Myfonts-webfont.eot');
  src: url('./fonts/Myfonts-webfont.eot?#iefix') format('embedded-opentype'),
    url('./fonts/Myfonts-webfont.woff') format('woff'),
    url('./fonts/Myfonts-webfont.ttf') format('truetype'),
    url('./fonts/Myfonts-webfont.svg#my_fonts_otbook') format('svg');
  font-weight: normal;
  font-style: normal;
}

and using it as 
.btn {
  font-family: 'My font', sans-serif;
  max-width: 100%;
  width: 20%;
  height: 8%;
}

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