This project is read-only.

Error compiling transformation

May 24, 2010 at 11:42 AM


I'm obtaining this error:

Compiling transformation: The type 'T4Toolbox.Generator' exists in both 'c:\Windows\assembly\GAC_32\T4Toolbox\\T4Toolbox.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_32\T4Toolbox.10.0\v4.0_10.3.7.1__7e313accbcce84dc\T4Toolbox.10.0.dll'

I converted the VS2008 project in VS2010 and I installed the last version of T4 Toolbox.

Some one has any idea?



May 24, 2010 at 2:26 PM

It appears that your template somehow references both 3.5 and 4.0 versions of the T4Toolbox assembly. Do you by any chance have an explicit <#@ assembly #> reference to T4Toolbox?


May 24, 2010 at 2:46 PM

I delete <#@ assembly name="T4Toolbox" #> from and now it works, why?

How can I specific the framework version?


May 24, 2010 at 3:44 PM

T4Toolbox assembly has two different binaries, one for Visual Studio 2008 (T4Toolbox.dll) and one for Visual Studio 2010 (T4Toolbox.10.0.dll). This is necessary because the Microsoft assemblies it references also have separate binaries for .NET framework 3.5 and 4.0. You should not reference T4Toolbox assembly explicitly in your template. Instead, include file, which will reference the correct version of the assembly automatically.