Saturday, 8 December 2012

Upgrading a TeamCity build from VS2008 to VS2012 and using NuGet

We've recently upgraded to Visual Studio 2012 from VS2008 and switched over to using NuGet rather than direct project references for our third party tools. Everything worked as planned until we checked the solution into source control and the personal build for TeamCity kicked off. Almost straight away the build fell over with the following error message:

D:\TeamCity\buildAgent\work\e6ae794aab32547b\.nuget\nuget.targets(102, 9):
error MSB4067: The element <ParameterGroup> beneath
element <UsingTask> is unrecognized.
Project BJ.Core.sln failed.

Our projects were still targeting .NET 3.5 but to fix the problem we needed to update the visual studio version in the build configuration

Note: we were are using Visual Studio 2012, but our Team City server is currently hosted on a 2003 Server O/S instance so we must select the VS2010 option in our build configuration (VS2012 option only works on 2008 Server and higher due to .NET 4.5 limitation).

No comments:

Post a Comment