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

以編程方式運(yùn)行 MSBuild

Running MSBuild programmatically(以編程方式運(yùn)行 MSBuild)
本文介紹了以編程方式運(yùn)行 MSBuild的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

我正在嘗試以編程方式執(zhí)行 MSBuild,但無(wú)法執(zhí)行以下命令:

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).問(wèn)題似乎是 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

如何將項(xiàng)目文件傳遞給 MSBuild?

How do I pass in the project file to MSBuild?

推薦答案

我會(huì)推薦 stronlgy 通過(guò) Microsoft.Build 命名空間.微軟到處都在使用它,所以這應(yīng)該很重要......

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 是您運(yùn)行構(gòu)建任務(wù)所需要的...源代碼示例:

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 記錄構(gòu)建消息

這篇關(guān)于以編程方式運(yùn)行 MSBuild的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執(zhí)行 Excel NORMINV 函數(shù)的 C# 庫(kù)?)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權(quán)列表中選擇 x 個(gè)隨機(jī)元素(無(wú)需替換))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創(chuàng)建時(shí)間表的摘要描述)
C# Normal Random Number(C# 普通隨機(jī)數(shù))
Standard deviation of generic list?(通用列表的標(biāo)準(zhǔn)偏差?)
AsyncCTP: Creating a class that is IAwaitable(AsyncCTP:創(chuàng)建一個(gè) IAwaitable 的類)
主站蜘蛛池模板: 日韩中文字幕在线不卡 | 日本不卡视频 | 欧美a级成人淫片免费看 | 欧洲成人免费视频 | 亚洲成av人片在线观看无码 | 精品在线一区 | 日韩精品一区二区三区中文字幕 | 丁香五月网久久综合 | 亚洲精品一区二区三区在线 | 视频一区二区中文字幕 | 精品国产伦一区二区三区观看说明 | 人人澡人人爱 | 久久九七 | 欧美aⅴ| 成人精品区 | 日本aaaa| 天天射天天干 | 国产色网站 | 狠狠干网站 | 国产精品久久国产精品99 | 古装人性做爰av网站 | 国产精品久久久久久久午夜片 | 国产精品五月天 | www.亚洲 | 日本黄色大片免费 | 奇米超碰在线 | 少妇精品久久久久久久久久 | 男人的天堂在线视频 | 国产亚洲一区二区精品 | 午夜私人影院在线观看 | 免费xxxx大片国产在线 | 国外成人在线视频 | 久久毛片| 天堂av影院 | 成人在线免费视频观看 | 精品一区二区三区在线观看国产 | 欧美精品在线一区二区三区 | 日韩免费一区 | 狠狠干天天干 | 欧美色综合| 欧美极品在线观看 |