久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

以編程方式運行 MSBuild

Running MSBuild programmatically(以編程方式運行 MSBuild)
本文介紹了以編程方式運行 MSBuild的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在嘗試以編程方式執行 MSBuild,但無法執行以下命令:

I am trying to execute MSBuild programmatically and can't execute the following command:

string command = string.Format(@"C:WindowsMicrosoft.NETFrameworkv4.0.30319msbuild.exe  ""{0}{1}.csproj""", _args.ProjectPath, _args.ProjectName);

字符串被渲染為:

C:WindowsMicrosoft.NETFrameworkv4.0.30319msbuild.exe  "C:...TestResultsFoo 2011-08-31 16_29_40OutFoosolutionNameprojectNameprojectName.csproj"

然后我使用新的 ProcessStartInfo(command).問題似乎是 Foo 和 2011 之間的空間.我得到以下輸出:

I then use new ProcessStartInfo(command). The problem seems to be the space between Foo and 2011. I get the following output:

MSBUILD : error MSB1008: Only one project can be specified.
Switch: 16_29_40OutFoosolutionNameprojectNameprojectName.csproj

如何將項目文件傳遞給 MSBuild?

How do I pass in the project file to MSBuild?

推薦答案

我會推薦 stronlgy 通過 Microsoft.Build 命名空間.微軟到處都在使用它,所以這應該很重要......

I would recommend stronlgy to go the official route via classes/interfaces in Microsoft.Build namespace. Microsoft uses this all over the place, so this should count for something...

特別是.類 Microsoft.Build.Execution.BuildManager 和 Singleton Microsoft.Build.Execution.BuildManager.DefaultBuildManager 是您運行構建任務所需要的...源代碼示例:

Esp. the class Microsoft.Build.Execution.BuildManager and the Singleton Microsoft.Build.Execution.BuildManager.DefaultBuildManager is what you are after to run a build task... source code examples:

  • http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/ec95c513-f972-45ad-b108-5fcfd27f39bc/
  • 使用 MSBuild 4.0 記錄構建消息

這篇關于以編程方式運行 MSBuild的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執行 Excel NORMINV 函數的 C# 庫?)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權列表中選擇 x 個隨機元素(無需替換))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創建時間表的摘要描述)
C# Normal Random Number(C# 普通隨機數)
Standard deviation of generic list?(通用列表的標準偏差?)
AsyncCTP: Creating a class that is IAwaitable(AsyncCTP:創建一個 IAwaitable 的類)
主站蜘蛛池模板: 97久久久久久久久 | 日韩成人免费视频 | 夜夜爽99久久国产综合精品女不卡 | 色就干| 午夜av电影 | 日韩亚洲欧美综合 | 日韩羞羞 | 羞羞视频在线观免费观看 | 天天影视亚洲综合网 | 亚洲国产一区二区在线 | 久久精品亚洲精品国产欧美kt∨ | 日本色婷婷 | 亚洲国产欧美日韩 | 99精品视频在线观看免费播放 | 在线精品一区 | 玖玖爱365 | 日韩免费一区二区 | 男女网站在线观看 | 亚洲日韩中文字幕一区 | 亚洲精品久久久一区二区三区 | 在线成人一区 | 日韩中文在线视频 | 国产精品一区二区久久精品爱微奶 | 麻豆亚洲| 欧美日韩综合 | 国产精品久久久久久影院8一贰佰 | www.夜夜骑.com | 亚洲欧美激情精品一区二区 | 色婷婷国产精品 | www.一区二区三区 | 欧美日韩亚洲视频 | 国产精品一区二区福利视频 | 亚洲精品99 | 中文字幕 亚洲一区 | 国产精品国产精品国产专区不片 | 久久中文字幕一区 | 国产激情在线 | 一区二区三区国产精品 | 免费的av网站 | 一区二区三区日韩精品 | 精品一二区 |