Teamcity 7.1: VS 2010 Solution fails to deploy after converting to VS 2012 Solution

I have a VS 2010 Solution containing asp.net C# projects, 4.0 Framework. We use Teamcity 7.1.1 (build 24074) as CI and deployment server.
We upgraded to Visual Studio 2012 and converted this solution, also installed Microsoft Visual Studio 2012 Shell (Integrated) Redistributable Package on the build server in order to have all files needed to build visual studio applications including [..]\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets.

After the conversion to 2012, I noticed that the deployment doesn't work anymore, the artifacts are not created (but Teamcity does not complain either!). I only get this on the build log:


[...]
[17:11:58][Providers\Providers.csproj.teamcity] GetCopyToOutputDirectoryItems
[17:11:58][Providers\Providers.csproj.teamcity] _CopyOutOfDateSourceItemsToOutputDirectoryAlways
[17:11:58][_CopyOutOfDateSourceItemsToOutputDirectoryAlways] Copy
[17:11:58][Copy] Copying file from "C:\TeamCity\buildAgent\work\c52628138e1ee4d4\Providers\NLog.config" to "bin\NLog.config".
[17:11:58][Providers\Providers.csproj.teamcity] CopyFilesToOutputDirectory
[17:11:58][CopyFilesToOutputDirectory] Copy
[17:11:58][Copy] Copying file from "obj\Release\Providers.dll" to "bin\Providers.dll".
[17:11:58][CopyFilesToOutputDirectory] Providers.csproj -> C:\TeamCity\buildAgent\work\c52628138e1ee4d4\Providers\bin\Providers.dll
[17:11:58][CopyFilesToOutputDirectory] Copy
[17:11:58][Copy] Copying file from "obj\Release\Providers.pdb" to "bin\Providers.pdb".

==> [17:11:58]Process exited with code 0

[17:11:58]Publishing internal artifacts
[17:11:58][Publishing internal artifacts] Sending build.finish.properties.gz file
[17:11:58]Publishing artifacts
[17:11:58][Publishing artifacts] Collecting files to publish: [Providers\obj\Release\Package]

==> [17:11:58][Publishing artifacts] Artifacts path Providers/obj/Release/Package not found

[17:11:58]Build finished


The only changes made to the solution were in the .sln and .csproj files (by Visual Studio). If I revert to the previous version, teamcity builds and deploys without issues. The changes to the project files were same asexplained in this post (http://sedodream.com/2012/08/19/VisualStudioProjectCompatabilityAndVisualStudioVersion.aspx), I tried the proposed solution (passing VisualStudioVersion=11.0 to MSBuild), it didn't work.
If I deploy from Visual Studio using the Publish link from Solution Explorer it also works as expected. I am going to create a new solution with a base project in VS 2012 and will test whether or not it deploys from Teamcity. Any other ideas? -- update -- Installed Team Explorer for Microsoft Visual Studio 2012 on the build server per one suggestion on a forum: no effect. The only thing I haven't done is install VS 2012 on the build server (!), should I? --- update --- Hopefully, this is NOT the solution: I did the opposite as advised on the above post (http://sedodream.com/2012/08/19/VisualStudioProjectCompatabilityAndVisualStudioVersion.aspx), I set the MSBuild parameter VisualStudioVersion=10.0 and it works!
So, in order to deploy a VS 2012 project I had to treat it as VS 2010 project... What are you doing different? What I am supposed to do in order to be able to deploy without cheating teamcity? Please check related question on http://stackoverflow.com/questions/13185897/teamcity-vs-2010-solution-fails-to-deploy-after-converting-to-vs-2012-solution for extra information like snapshots of my current settings.

1 comment
Comment actions Permalink

I solved the issue by installing VS 2012 on the build server but I still wonder if that is really needed. Seems overkill to me.

0

Please sign in to leave a comment.