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

使用 msbuild 執行文件系統發布配置文件

Using msbuild to execute a File System Publish Profile(使用 msbuild 執行文件系統發布配置文件)
本文介紹了使用 msbuild 執行文件系統發布配置文件的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我有一個用 VS2010 創建的 c# .Net 4.0 項目,現在可以用 VS2012 訪問.

I have a c# .Net 4.0 project created with VS2010 and now being accessed with VS2012.

我正在嘗試僅將所需文件從該網站發布到目標位置(C:uildsMyProject[Files])

I'm trying to publish only the needed files from this website to a destination location (C:uildsMyProject[Files])

我的文件結構:./ProjectRoot/MyProject.csproj./ProjectRoot/Properties/PublishProfiles/FileSystemDebug.pubxml

My file structure: ./ProjectRoot/MyProject.csproj ./ProjectRoot/Properties/PublishProfiles/FileSystemDebug.pubxml

我正在通過 MSBuild 運行以下命令:

C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe ./ProjectRoot/MyProject.csproj/p:DeployOnBuild=true/p:PublishProfile=./ProjectRoot/Properties/PublishProfiles/FileSystemDebug.pubxml

C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe ./ProjectRoot/MyProject.csproj /p:DeployOnBuild=true /p:PublishProfile=./ProjectRoot/Properties/PublishProfiles/FileSystemDebug.pubxml

這是 FileSystemDebug.pubxml 中的 xml

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <SiteUrlToLaunchAfterPublish />
    <ExcludeApp_Data>False</ExcludeApp_Data>
    <publishUrl>C:uildsMyProject</publishUrl>
    <DeleteExistingFiles>True</DeleteExistingFiles>
  </PropertyGroup>
</Project>

產生的行為是:

  • 在此處創建一個 zip 文件:./ProjectRoot/obj/Debug/Package/MyProject.zip
  • 沒有部署到 <publishUrl>C:uildsMyProject</publishUrl> WTF
  • 創建的 zip 文件是豬的早餐,其中包含應用程序不需要的文件.

當我通過 Visual Studio 運行此發布配置文件時,會在 *C:uildsMyProject* 處創建一個文件夾,其中包含我想要的確切工件.

When I run this publish profile through visual studio a folder is created at *C:uildsMyProject* and contains the exact artifacts that I want.

如何從 msbuild 獲得這個簡單的結果?

How do I get this simple result from msbuild?

推薦答案

僅供參考:我在使用 Visual Studio 2015 時遇到了同樣的問題.經過數小時的嘗試,我現在可以執行 msbuild myproject.csproj/p:DeployOnBuild=true/p:PublishProfile=myprofile.

FYI: I had the same issue with Visual Studio 2015. After many of hours trying, I can now do msbuild myproject.csproj /p:DeployOnBuild=true /p:PublishProfile=myprofile.

我必須編輯我的 .csproj 文件才能使其正常工作.它包含這樣的一行:

I had to edit my .csproj file to get it working. It contained a line like this:

<Import Project="$(MSBuildExtensionsPath32)MicrosoftVisualStudiov10.0WebApplicationsMicrosoft.WebApplication.targets" 
  Condition="false" />

我把這一行改成如下:

<Import Project="$(MSBuildExtensionsPath32)MicrosoftVisualStudiov14.0WebApplicationsMicrosoft.WebApplication.targets" />

(我把10.0改成了14.0,不知道有沒有必要,但肯定要去掉條件部分.)

(I changed 10.0 to 14.0, not sure whether this was necessary. But I definitely had to remove the condition part.)

這篇關于使用 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 的類)
主站蜘蛛池模板: 日韩在线成人 | 老司机深夜福利网站 | 久久精品欧美一区二区三区不卡 | 亚洲一区中文字幕在线观看 | 国产一区二区三区www | 国产精品99999999 | 欧美成人第一页 | 国产在线中文 | 亚洲第一网站 | 成人性生交大免费 | 午夜国产精品视频 | 国产精品久久久久久久久久久久冷 | 亚洲欧美在线一区 | 日日操操 | 中文字字幕在线中文乱码范文 | 国产精品综合网 | 欧美人妖网站 | 亚洲视频中文字幕 | 精品一区二区三区四区 | 羞羞视频在线观看免费观看 | 在线色网| 国产精品久久久久国产a级 欧美日韩国产免费 | 日韩在线不卡视频 | 日韩精品免费在线 | 隔壁老王国产在线精品 | 久久精品男人的天堂 | 午夜在线视频 | 亚洲综合无码一区二区 | 精品国产1区2区3区 在线国产视频 | av资源在线看 | 日韩av免费在线观看 | 亚洲视频免费在线观看 | 成人综合一区 | 国产精品国产三级国产aⅴ无密码 | 欧美另类视频 | 日产精品久久久一区二区福利 | 国产在线观看不卡一区二区三区 | 亚洲国产欧美精品 | 色橹橹欧美在线观看视频高清 | 国产高清精品一区二区三区 | 日韩电影在线一区 |