2017-09-07 17 views
0

我有一個簡單的「Hello World」mvc web應用程序,我試圖在VSTS中構建。我的步驟是:VSTS msbuild:如何使用參數代替配置文件?錯誤:無法找到__。dll

  1. 獲取源代碼
  2. 運行的MSBuild一個項目
  3. 發佈神器(發佈目錄),每當我用一個配置文件的MSBuild

一切工作正常,但我會而不是僅僅傳遞參數命令。當我這樣做時,我得到以下錯誤:

Error : Copying file bin\WebApp01.dll to obj\Release\Package\PackageTmp\bin\WebApp01.dll failed. Could not find file 'bin\WebApp01.dll'.

我用我的msbuild參數犯了什麼錯誤?如何正確複製簡單的文件系統配置文件?

參數(error'ing):

/p:DeployOnBuild=true /p:Configuration="Release" /p:Platform="Any CPU" /t:WebPublish /p:WebPublishMethod=FileSystem /p:publishUrl=PublishToOctopus 

簡介(作品):

<?xml version="1.0" encoding="utf-8"?> 
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
    <PropertyGroup> 
    <WebPublishMethod>FileSystem</WebPublishMethod> 
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> 
    <LastUsedPlatform>Any CPU</LastUsedPlatform> 
    <SiteUrlToLaunchAfterPublish /> 
    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> 
    <ExcludeApp_Data>False</ExcludeApp_Data> 
    <publishUrl>PublishToOctopus</publishUrl> 
    <DeleteExistingFiles>False</DeleteExistingFiles> 
    </PropertyGroup> 
</Project> 

回答

0

使用/p:DeployOnBuild=true,你可以使用正常的Build目標。您直接調用WebPublish/t:WebPublish),它預計構建已經發生,但由於它沒有,該文件從預期位置丟失。

相關問題