2013-10-31 92 views
0

我有一個TeamCity。我已經安裝建立我的web項目(的csproj)用的MSBuild, 命令行參數看上去像TeamCity錯誤MSB3021:無法複製文件

/p:Configuration=%env.Configuration% /p:outputpath=bin2 /p:DeployOnBuild=True /p:IsDesktopBuild=false /p:DeployTarget=MSDeployPublish /p:MsDeployServiceUrl=httppath /p:AllowUntrustedCertificate=True /p:MSDeployPublishMethod=WMSVC /p:UserName=xxx /p:Password=xxx

但建立zhcon失敗所有的時間與錯誤:

Step 1/1: MSBuild (7s) 
pathxxx\MyPortal.csproj.teamcity: Build target: Build (4s) 
[pathxxx\MyPortal.csproj.teamcity] _CopyWebApplicationLegacy 
[_CopyWebApplicationLegacy] Copy 
[Copy] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets(178, 5): error MSB3021: Unable to copy file "Bin\MyPortal.dll" to "bin2\_PublishedWebsites\MyPortal.csproj\Bin\MyPortal.dll". Could not find a part of the path 'Bin\MyPortal.dll'. 
[Copy] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets(178, 5): error MSB3021: Unable to copy file "Bin\MyPortal.pdb" to "bin2\_PublishedWebsites\MyPortal.csproj\Bin\MyPortal.pdb". Could not find a part of the path 'Bin\MyPortal.pdb'. 
[pathxxx\MyPortal.csproj.teamcity] Project pathxxx\MyPortal.csproj.teamcity failed. 
[Step 1/1] Step MSBuild failed 

如果我刪除/ P: outputpath = BIN2參數我看到錯誤的其他國王,

The OutputPath property is not set for project 'MyPortal.csproj.teamcity'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='TestEnv' Platform='Any CPU'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.

我使用XML轉換,我必須讓舒爾說TestEnv是在內部解決方案的所有項目中存在。

它可能是什麼?以及如何解決它?

謝謝。

回答

1

您是否已將配置testenv添加到所有項目中?因爲它缺少OutputPath屬性。或者,您可以將該屬性添加到您的初始命令中,例如/p:OutputPath=..\output

相關問題