Question

When I invoke the Add Reference dialog, I got this: TextTemplating

I have both Visual Studio 2010 and 2012 installed on the computer. What's wrong?

Was it helpful?

Solution 2

This may be a bug of Visual Studio. However, I can directly edit csproj file to include this assembly by adding a simple reference:

<ItemGroup>
<Reference Include="System" />
<Reference Include="Microsoft.VisualStudio.TextTemplating" />
</ItemGroup>

This works because the assembly is already in GAC just like other assemblies (e.g., System, System.Data).

OTHER TIPS

You have to reference it from its file path by using browse:

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.TextTemplating.11.0\v4.0_11.0.0.0__b03f5f7f11d50a3a\

Also, this tripped me up, make sure you:

Reference Microsoft.VisualStudio.TextTemplating.11.0 if your project is targeting .net 4.5.

Reference Microsoft.VisualStudio.TextTemplating.10.0 if your project is targeting .net 4.0.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top