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

使用 msbuild 執(zhí)行文件系統(tǒng)發(fā)布配置文件

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

問題描述

我有一個用 VS2010 創(chuàng)建的 c# .Net 4.0 項(xiàng)目,現(xiàn)在可以用 VS2012 訪問.

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

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

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

我的文件結(jié)構(gòu):./ProjectRoot/MyProject.csproj./ProjectRoot/Properties/PublishProfiles/FileSystemDebug.pubxml

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

我正在通過 MSBuild 運(yùn)行以下命令:

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>

產(chǎn)生的行為是:

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

當(dāng)我通過 Visual Studio 運(yùn)行此發(fā)布配置文件時,會在 *C:uildsMyProject* 處創(chuàng)建一個文件夾,其中包含我想要的確切工件.

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 獲得這個簡單的結(jié)果?

How do I get this simple result from msbuild?

推薦答案

僅供參考:我在使用 Visual Studio 2015 時遇到了同樣的問題.經(jīng)過數(shù)小時的嘗試,我現(xiàn)在可以執(zhí)行 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.)

這篇關(guān)于使用 msbuild 執(zhí)行文件系統(tǒng)發(fā)布配置文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執(zhí)行 Excel NORMINV 函數(shù)的 C# 庫?)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權(quán)列表中選擇 x 個隨機(jī)元素(無需替換))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創(chuàng)建時間表的摘要描述)
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)建一個 IAwaitable 的類)
主站蜘蛛池模板: 国产欧美一区二区三区国产幕精品 | 日韩av一区二区在线观看 | 日韩av最新网址 | 久草久草久草 | 精品一区二区三区免费毛片 | 国产精品久久久久久亚洲调教 | 中文字幕乱码视频32 | 国产大毛片 | 超碰导航 | 人人草人人干 | 99久久婷婷国产亚洲终合精品 | 国产成人福利在线 | 亚洲精品电影在线 | 一区在线视频 | 午夜精品久久久久久久久久久久久 | 久久国产婷婷国产香蕉 | 2020亚洲天堂 | 免费观看一级特黄欧美大片 | 亚洲欧美中文日韩在线v日本 | 亚洲自拍偷拍免费视频 | 欧美一级特黄aaa大片在线观看 | 国产激情片在线观看 | 亚洲成人日韩 | 久久综合久色欧美综合狠狠 | 欧美日韩久久 | 2020国产在线 | 欧美精品在线观看 | 蜜桃av一区二区三区 | 人人精品 | 成人免费xxxxx在线视频 | 中文字幕欧美日韩一区 | av中文字幕在线观看 | 成人av电影免费在线观看 | 欧美日韩综合 | 国产精彩视频 | 国产精品久久久久久婷婷天堂 | 精品国产精品国产偷麻豆 | 久久久性色精品国产免费观看 | 91网站在线看| 亚洲成人一区 | 99中文字幕 |