首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MSBUILD :错误MSB1008:在创建安装文件时只能指定一个项目

MSBUILD :错误MSB1008:在创建安装文件时只能指定一个项目
EN

Stack Overflow用户
提问于 2017-05-25 06:05:28
回答 2查看 5.8K关注 0票数 1

在构建驱动程序项目的设置时,我遇到了这个错误。

代码语言:javascript
复制
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 version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1008: Only one project can be specified.
Switch: Studio

For switch syntax, type "MSBuild /help"

你知道这个错误吗??怎么解决这个问题?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-05-25 06:49:04

将路径放在引号(")中,以指示路径是一个参数。由于路径包含空格(在VisualStudio之间),Studio部分被认为是一个新的参数,MSBuild不知道如何处理它:

代码语言:javascript
复制
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"
票数 2
EN

Stack Overflow用户

发布于 2017-07-12 10:40:44

代码语言:javascript
复制
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();
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44173424

复制
相关文章

相似问题

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