久久久久久久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 的類)
主站蜘蛛池模板: 亚洲91av| 成人精品一区亚洲午夜久久久 | 精品国产乱码久久久久久图片 | 一级免费看 | 天天操天天操 | 日韩一区二区三区在线看 | 欧美成人精品一区二区三区 | 欧美中文字幕 | 午夜精品导航 | 国产综合精品一区二区三区 | 国产激情偷乱视频一区二区三区 | 亚洲一区二区三区久久 | 国产99久久精品一区二区永久免费 | 不卡av电影在线播放 | 成人一级毛片 | 天天久久 | 一级毛片视频 | 国产亚洲网站 | 亚洲综合久久久 | 日韩高清中文字幕 | 一区二区在线 | 国产在线成人 | www中文字幕 | 久久国产精品99久久久久久丝袜 | 欧美福利三区 | 日本中文字幕一区 | 欧美高清性xxxxhdvideosex | 亚洲精品aⅴ | 免费看一区二区三区 | 毛片在线看片 | 午夜精品久久久久久久久久久久久 | 在线免费91 | 日韩欧美一区二区三区四区 | 国产精品极品美女在线观看免费 | 欧美 视频| 国产韩国精品一区二区三区 | 欧美日本在线观看 | 性做久久久久久免费观看欧美 | 国产91综合| 成人欧美一区二区三区黑人孕妇 | 伊人99|