Not long ago I decided to start using Nuget for managing 3rd party libraries. However, since I started using Nuget, Teamcity was no longer able to build the solution.
So, I have a WindowsPhone project where I use a t4 template for the configuration file. I followed Oleg Sych's instruction for integrating MSBuild and T4. This project was building just fine on my TeamCity build server. Well, fine until I started using Nuget. Added some packages and set RestorePackaged to true, after that I no longer was able to build the solution in TeamCity.
The error I get in TeamCity is the following:
C:\Program Files\MSBuild\Microsoft\VisualStudio\TextTemplating\v10.0\Microsoft.TextTemplating.targets(396, 5):
Compiling transformation: Invalid token 'this' in class, struct, or interface member declaration. Line=1, Column=1
C:\Program Files\MSBuild\Microsoft\VisualStudio\TextTemplating\v10.0\Microsoft.TextTemplating.targets(396, 5):
Compiling transformation: Method must have a return type. Line=1, Column=6
C:\Program Files\MSBuild\Microsoft\VisualStudio\TextTemplating\v10.0\Microsoft.TextTemplating.targets(396, 5):
Compiling transformation: Type expected. Line=1, Column=12
The output file for the T4 templates contains the following message: ErrorGeneratingOutput
On my local machine using VS2010 the solution also fails to build. However, the problem is that MSBuild does process the T4 template and generates an output file, but it does not add it to the project file. So, build fails because it cannot find the specific class.
Did anyone experience a similar issue? Are there any fixes? Or can somebody tell me where should I look for a fix?
I would really appreciate any help on fixing this issue.
Thank you!