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

創建自定義 MSBuild 任務時如何從 C# 代碼中獲取當

How do you get the current project directory from C# code when creating a custom MSBuild task?(創建自定義 MSBuild 任務時如何從 C# 代碼中獲取當前項目目錄?)
本文介紹了創建自定義 MSBuild 任務時如何從 C# 代碼中獲取當前項目目錄?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我不想運行硬編碼路徑的外部程序,而是想要獲取當前的項目目錄.我正在使用自定義任務中的進程調用外部程序.

Instead of running an external program with its path hardcoded, I would like to get the current Project Dir. I'm calling an external program using a process in the custom task.

我該怎么做?AppDomain.CurrentDomain.BaseDirectory 只是給了我 VS 2008 的位置.

How would I do that? AppDomain.CurrentDomain.BaseDirectory just gives me the location of VS 2008.

推薦答案

你可以試試這兩種方法之一.

You can try one of this two methods.

string startupPath = System.IO.Directory.GetCurrentDirectory();

string startupPath = Environment.CurrentDirectory;

告訴我,你覺得哪個更好

Tell me, which one seems to you better

這篇關于創建自定義 MSBuild 任務時如何從 C# 代碼中獲取當前項目目錄?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 的類)
主站蜘蛛池模板: 婷婷久久网 | 亚洲男人天堂av | 国产探花在线精品一区二区 | 九九久久国产 | 日本精品一区二区三区视频 | 超碰在线97国产 | 久久久青草婷婷精品综合日韩 | 久久久久久国 | 婷婷综合色 | 日韩视频在线播放 | 欧美高清性xxxxhdvideosex | 国产精品视频一区二区三区 | 九色在线观看 | 一级欧美一级日韩片免费观看 | 91成人 | 久久精品国产99国产 | 日本又色又爽又黄的大片 | 精品国产乱码久久久久久1区2区 | 亚洲社区在线 | 精品国产1区2区3区 一区二区手机在线 | 成人av网站在线观看 | 麻豆一区一区三区四区 | 中文字幕av一区二区三区 | 日本成人在线网址 | 欧美在线观看免费观看视频 | cao在线| 在线免费观看毛片 | 中文字幕精品一区 | 久久高清 | 羞羞视频网站 | 中文字幕日韩三级 | 日韩快播电影 | 久久一二 | 一区二区免费在线观看 | 欧美国产精品久久久 | 国产成人网| 亚洲美女av网站 | 久久久精品一区二区 | 天天草天天干天天 | 日韩精品一区二区三区在线观看 | 国产精品久久久久久久久久久久久 |