简体   繁体   English

MSBuild 2015无法从VS2010打包Web应用程序

[英]MSBuild 2015 fails packaging web app from VS2010

I have a build server that until recently had up to .Net 4.5.1 and VS2010/VS2012 installed. 我有一个构建服务器,直到最近才安装了.Net 4.5.1和VS2010 / VS2012。 I ran MSBuild to build and package web apps as follows: 我运行MSBuild来构建和打包Web应用程序,如下所示:

"C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" Hartford.Pace.sln /nologo /v:n /p:Configuration=Release /p:DeployOnBuild=True /p:CreatePackageOnPublish=True /p:AutoParameterizationWebConfigConnectionStrings=False /p:EnableNuGetPackageRestore=True

I recently updated the build server to include Frameworks through 4.6.1 and VS2013/VS2015. 我最近更新了构建服务器,以通过4.6.1和VS2013 / VS2015包括Framework。 Everything was installed in sequence. 一切都按顺序安装。 I updated the build command to: 我将构建命令更新为:

"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" Hartford.Pace.sln /nologo /v:n /p:Configuration=Release /p:DeployOnBuild=True /p:CreatePackageOnPublish=True /p:AutoParameterizationWebConfigConnectionStrings=False /p:EnableNuGetPackageRestore=True /p:VisualStudioVersion=10.0

And now I'm getting the following error only for VS2010 web apps: 现在,我仅对VS2010 Web应用程序遇到以下错误:

"d:\a5\bi_hartsource_pace\Microsoft_Build_Web_App\trunk\Hartford.Pace.sln" (default target) (1) ->
"d:\a5\bi_hartsource_pace\Microsoft_Build_Web_App\trunk\Hartford.Pace.Services\Hartford.Pace.Services.csproj" (default target) (2) ->
(PackageUsingManifest target) -> 
  C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3009,5): error : Web deployment task failed. (Unknown ProviderOption:DefiningProjectFullPath. Known ProviderOptions are:.) [d:\a5\bi_hartsource_pace\Microsoft_Build_Web_App\trunk\Hartford.Pace.Services\Hartford.Pace.Services.csproj]

Which points to a problem with the packaging target files. 这表明打包目标文件存在问题。 I checked them and none of them were changed by the update. 我检查了它们,但更新都没有改变它们。

  1. Does anyone know of side-by-side issues with VS2010 and VS2015? 有谁知道VS2010和VS2015的并行问题? I'd like to upgrade the VS2010 Solutions but it's not my code and I need to build existing apps without modification. 我想升级VS2010解决方案,但这不是我的代码,我需要构建现有应用程序而无需修改。
  2. Is this the best method for packaging an app without having the developers create publishing profiles or running anything at their end? 这是打包应用程序而不让开发人员创建发布配置文件或在其末尾运行任何东西的最佳方法吗? This is supposed to be a fully automated build and deploy process. 这应该是一个完全自动化的构建和部署过程。 It has been working for three years with no issues but I'm open to suggestions that I can implement entirely on my build server without involving changing files in the source code (including csproj or other controlling files). 它已经运行了三年,没有任何问题,但是我建议我可以完全在构建服务器上实现而不涉及更改源代码中的文件(包括csproj或其他控制文件)的建议。

添加/p:VisualStudioVersion=10.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM