TFS构建服务器不能得到发布配置工作:"找不到有效的AspnetCompilerPath" [英] TFS Build Server cannot get publish profile to work: "Can't find the valid AspnetCompilerPath"

查看:1049
本文介绍了TFS构建服务器不能得到发布配置工作:"找不到有效的AspnetCompilerPath"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一堆Web项目的解决方案,我希望我的构建服务器,为每个项目自动创建包。
我能够获得(几乎)一切工作正常。
该版本是罚款和包将在每个版本创建。
但是,只有当我不指定的参数的MSBuild一个PublishProfile。
因此,它只能插入默认值,而不是precompile我的网站和这样的。
(参数是 / P:DeployOnBuild = TRUE / ​​P:IsAutoBuild = TRUE /p:VisualStudioVersion=12.0

I have a Solution with a bunch of Web Projects and i want my build server to automatically create packages for each project. I am able to to get (nearly) everything working. The builds are fine and the packages will be created on each build. But only when i do not specify a PublishProfile in the MSBuild Arguments. So it will only insert default values and not precompile my Web Sites and such. (Arguments are /p:DeployOnBuild=True /p:IsAutoBuild=True /p:VisualStudioVersion=12.0)

不过,我想使用的发布配置文件(.pubxml)我在Visual Studio中创建。
每个项目都有Test.pubxml。
但是,当我指定PublishProfile参数,生成将失败,并出现以下错误消息(参数是 / P:DeployOnBuild = TRUE; PublishProfile =测试/ P:IsAutoBuild = TRUE /p:VisualStudioVersion=12.0

However I want to use the publish profiles (.pubxml) i created in Visual Studio. Each Project has a "Test.pubxml". But when i specify the PublishProfile parameter, the build will fail with the following error message (Arguments are /p:DeployOnBuild=True;PublishProfile=Test /p:IsAutoBuild=True /p:VisualStudioVersion=12.0):

C:\\ Program Files文件(x86)\\MSBuild\\Microsoft\\VisualStudio\\v12.0\\Web\\Transform\\Microsoft.Web.Publishing.AspNetCompileMerge.targets (411):找不到有效的AspnetCompilerPath

是,文件 Microsoft.Web.Publishing.AspNetCompileMerge.targets 确实该文件夹中存在。
我可以我的开发机器就好上部署从Visual Studio中的项目。

Yes, the file Microsoft.Web.Publishing.AspNetCompileMerge.targets does exist in that folder. I can deploy the projects from Visual Studio on my developer machine just fine.

我使用下列内容:
Windows Server 2012中R2
Visual Studio的终极2013更新1(安装生成服务器上)
项目是用于.NET 4.5.1

I am using the following: Windows Server 2012 R2 Visual Studio Ultimate 2013 Update 1 (Installed on build server) Projects are for .Net 4.5.1

推荐答案

我有同样的问题,发现了这个问题,并用略少哈克的解决方案提出了:

I had the same problem, found this question, and came up with a slightly less hacky solution:

只需添加 /P:Framework40Dir=c:\\windows\\microsoft.net\\framework\\v4.0.30319 作为额外的MSBuild参数。

Just add /P:Framework40Dir=c:\windows\microsoft.net\framework\v4.0.30319 as an additional MSBuild parameter.

无需编辑.targets文件或设置其他任何东西。为我工作,所以我只是做:

No need to edit .targets files or set anything else. Worked for me, so I just do:

msbuild MyWebProject.csproj /T:Package /P:PublishProfile=MyProfile /P:Framework40Dir=(as above)

我用它来建立一个Web部署封装成我选择的子文件夹 - 无需配置文件,它进入 OBJ /调试/包。谁在使用 OBJ ? Blergh:)

I use it to build a Web Deploy package into a subfolder of my choosing - without the profile, it goes to obj/debug/package. Who uses obj? Blergh :)

这篇关于TFS构建服务器不能得到发布配置工作:"找不到有效的AspnetCompilerPath"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆