我在尝试构建驱动程序项目的设置时出现此错误
C:\ Program Files(x86)\ Microsoft Visual Studio 14.0> msbuild / t:clean / t:build C:\ Users \ iomadmin \ Documents \ Visual Studio 2015 \ Projects \ KMDF \ KMDF Driver5 \ KMDF Driver5。 sln / p:Configuration =“Debug”/ p:Platform = Win32 / p:TargetVersion =“Windows10”/p:TargetPlatformVersion="10.0.10010.0“ Microsoft(R)Build Engine版本14.0.25420.1 版权所有(C)Microsoft Corporation。保留所有权利。
MSBUILD:错误MSB1008:只能指定一个项目。 开关:工作室
对于切换语法,请键入“MSBuild / help”
关于这个错误的任何想法?怎么解决这个?
答案 0 :(得分:2)
将文件的路径放在引号(Visual
)中,以指示路径是一个参数。由于路径包含空格(Studio
和Studio
之间),msbuild /t:clean /t:build "C:\Users\iomadmin\Documents\Visual Studio 2015\Projects\KMDF\KMDF Driver5\KMDF Driver5.sln" /p:Configuration="Debug" /p:Platform=Win32 /p:TargetVersion="Windows10" /p:TargetPlatformVersion="10.0.10010.0"
部分被视为新参数,MSBuild不知道如何处理它:
val alt = orig.copy(
child = orig.child.flatMap {
case b: Elem if b.label == "b" =>
val attr2Value = "100"
val x = <x attr1="200" attr2={attr2Value}/> //////////////////// Snippet
Some(b.copy(attributes = b.attributes.append(x.attributes)))
// Will remove any <remove-me some-attrib="specific value"/> elems
case removeMe: Elem if isElem(removeMe, "remove-me", "some-attrib" -> "specific value") =>
None
case keep => Some(keep)
}
++
<added-elem name="..."/>
// Tests whether the given element has the given label
private def isElem(elem: Elem, desiredLabel: String, attribValue: (String, String)): Boolean = {
elem.label == desiredLabel && elem.attribute(attribValue._1).exists(_.text == attribValue._2)
}
答案 1 :(得分:0)
private void GetExeFile(string link)
{
Process compiler = new Process();
compiler.StartInfo.FileName =@"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe";
compiler.StartInfo.Arguments = link + @"C:\Users\khan\Documents\Visual Studio 2012\Projects\Calculator\Calculator.sln /t:build /r:System.dll /out:sample.exe stdstr.cs";
compiler.StartInfo.UseShellExecute = false;
compiler.StartInfo.RedirectStandardOutput = true;
compiler.Start();
txtGetContent.Text = compiler.StandardOutput.ReadToEnd();
compiler.WaitForExit();
}