久久久久久久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 的類)
主站蜘蛛池模板: 综合成人在线 | 亚洲午夜精品一区二区三区他趣 | 99热播精品 | a在线视频观看 | 超碰在线播 | 亚洲精品乱码久久久久久9色 | 尤物在线精品视频 | 91中文视频 | 欧美性大战久久久久久久蜜臀 | 日日碰狠狠躁久久躁婷婷 | 色精品| 91亚洲一区| h视频网站在线观看 | 99精品国产一区二区三区 | 巨大荫蒂视频欧美另类大 | 中文字幕精 | 免费视频一区二区 | 国产乱码精品一区二区三区忘忧草 | jizz视频| 国内在线视频 | 亚洲一区二区三区在线 | 亚洲网站在线播放 | 中文字幕在线观看日韩 | 欧美xxxx在线| 国产高清久久 | 色视频在线播放 | 尹人av | 亚洲精品在线免费 | 久久成人免费 | 国产精品自产拍 | 国产精品综合一区二区 | 中文字幕第十页 | 亚洲欧洲小视频 | www.亚洲.com| 国产成人a亚洲精品 | 福利片一区二区 | 欧美成视频 | 毛片一级片 | 久久国产一区二区三区 | 久久久亚洲精品视频 | 成人在线小视频 |