TFS 2012 Build Definition for web deployment ignores parameters defined in project files

北城以北 提交于 2019-12-04 13:17:49

I managed to solve this issue myself by removing/recreating all our solution/project configurations from Configuration Manager

Apparently something was wrong with our solution configurations that screwed up attempts to use them from a build definition. My best guess is that when they were created, they were copy/pasted from an existing configuration, but something was missed in the process and they were still somehow pointing to the original source configuration. However I was not the one who originally created them, so I can't be sure exactly what went wrong.

Anyway, I saved backups of the PropertyGroup XML for each configuration from each project file, then completely removed each configuration from the solution and each project via Configuration Manager. I then recreated each configuration, and restored the PropertyGroups in each project from my backups. Now my build definitions are reading the build properties from the correct PropertyGroups, and performing the correct transform on Web.config.

In your build definMsDeployServiceUrltion check that the configuration you are building matches the exact same cpu I.e. "AnyCPU" or "Any CPU". Notice the extra space. Somewhere along line between different vs bersions and tfs versions a mistical space appeared or disappeared. This has caught me out before.

As a test, move the MsDeployServiceUrl property in the .csproj file out of the current propertygroup node. Then do a build. If it builds then it eill prove your concepts work but your still left with the problem tho

I had this problem when merging from one branch to the other. The configuration information is inside the solution (.sln) file. Open that file up and see if the configuration information is correct.

Take a look at the screen-shot below. I was getting an error about PROD2|Any CPU was not correct (in the build log) and it turned out that instead of PROD2|Any CPU, the solution file had Release|Any CPU for that line. A small change and everything worked out fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!