Friday, September 16, 2011 4:50 AM
We've recently changed our build server and the T4 MSBuild now seems to fail.
I'm out of ideas, here is the log:
(ExecuteTransformations target) -> ...\Microsoft.TextTemplating.targets(396,5):
error : An Exception was thrown while processing the template.
The following Exception was thrown:
System.Runtime.Serialization.SerializationException: Type is not resolved for member 'Microsoft.VisualStudio.TextTemplating.AssemblyResolver,Microsoft.VisualStudio.TextTemplating.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at System.AppDomain.add_AssemblyResolve(ResolveEventHandler value)
at Microsoft.VisualStudio.TextTemplating.Engine.CompileAndRunCode(String generatorCode, ITextTemplatingEngineHost host, TemplateProcessingSession session)
at Microsoft.VisualStudio.TextTemplating.Engine.ProcessTemplateImplementation(TemplateProcessingSession session, String content, ITextTemplatingEngineHost host, String className, String classNamespace)
Line=-1, Column=-1 There was a problem getting an AppDomain to run the transformation from the host. The process cannot continue.
Any ideas ?
Friday, September 16, 2011 6:33 PM
The Microsoft.VisualStudio.TextTemplating assembly is installed by Visual Studio. So there are a few options; I'm not sure if you've done one of these yet:
Copy the assemblies from a machine with VS: http://msdn.microsoft.com/en-us/library/ee847423.aspx#buildserver
Install the SDK on your machine: http://archive.msdn.microsoft.com/vsvmsdk
Adi Unnithan | Software Design Engineer | SQL Server Developer Tools | Please mark the post as answered if it sufficiently answers your question
Friday, September 16, 2011 9:27 PMYes, I forgot to mention that the Visual studio SDK (SP1) and the Visual Studio Visualization and Modeling SDK are already installed.
Tuesday, September 20, 2011 8:08 AMModerator
>>We've recently changed our build server and the T4 MSBuild now seems to fail.
What did you changed? Could you show us more information about your changing actions?
By the way, as Adi suggested, did you copy the mentioned files into the server or install the Visual Studio on your server?
Yi Feng Li [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Tuesday, September 20, 2011 9:32 AMThanks all we ended up fixing the issue by putting the t4 assemblies in the GAC. Not ideal but that worked...
- Marked As Answer by Clement Gutel Tuesday, September 20, 2011 9:32 AM
Monday, October 31, 2011 5:19 PM
Which specific assemblies did you move into the GAC?
Monday, October 31, 2011 6:07 PM
The following ones worked for us (gacutil -i ?):
Also had to make sure it was using the 4.0 gacutil from the SDK, which on our server was at:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\x64
The .Net 4.0 SDK is at:
- Edited by Johan Botha Monday, October 31, 2011 6:07 PM
Friday, June 22, 2012 10:27 AM
I have also had the same problem:
There was a problem getting an AppDomain to run the transformation from the host. The process cannot continue.
, the solution was to uninstall CodeSmith for Visual Studio, it does not work with T4.