34

I am doing some work with T4 (Text Template Transformation Toolkit) and am trying to get to a point where I can create my own custom text template host. However, all of that relies on the Microsoft.VisualStudio.TextTemplating assembly and I cannot find it on my system!

I first tried adding a reference to the assembly in Visual Studio, but the assembly for Microsoft.VisualStudio.TextTemplating is not listed under the .NET tab.

I then took a look in the %WINDIR%/Assembly directory and found an entry for Microsoft.VisualStudio.TextTemplating. However, when I try and browse to this location and add the assembly in Visual Studio, nothing happens.

Has anybody else had this problem? According to MSDN tuts it sounds like this assembly should be included with Visual Studio (and I have VS 2003, 2005, and 2008 installed).

GEOCHET
  • 21,119
  • 15
  • 74
  • 98
Jeffrey Harrington
  • 1,797
  • 1
  • 15
  • 24

6 Answers6

19

I have the Visual Studio SDK installed. Here is where the assembly is physically installed on my system:

C:\Program Files\Microsoft Visual Studio 2008 SDK\VisualStudioIntegration\Common\Assemblies\Microsoft.VisualStudio.TextTemplating.dll.


It does show up in the Add Reference dialog normally.

Hakan Fıstık
  • 16,800
  • 14
  • 110
  • 131
  • 2
    Thanks, Oleg. I installed the VS2008 SDK and now I can reference the assembly. By the way, your blog has been a great resource to me for T4. I really appreciate all your work! – Jeffrey Harrington Feb 18 '09 at 16:26
  • With VS2010 SP1 installing the SDK is still the solution. They appended 10.0 to the names of the files when adding references but the Namespaces seem to be the same still. – ManiacZX Jan 16 '12 at 21:57
  • I think Visual Studio only shows the compatible assemblies. Change the .NET Framework version if needed. – Bastien Vandamme Apr 11 '15 at 11:41
9

Visual Studio 2012 SDK folder is:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\VSSDK\VisualStudioIntegration\Common\Assemblies\v4.0

Athari
  • 33,702
  • 16
  • 105
  • 146
6

In the (new) GAC:

VS 2012 (v11.0)

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

VS 2013 (v12.0)

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.TextTemplating.12.0\v4.0_12.0.0.0__b03f5f7f11d50a3a
obiwanjacobi
  • 2,413
  • 17
  • 27
4

These assemblies have been available for a while now as NuGet packages.

This allows for better dependency management via NuGet.

NSNoob
  • 5,548
  • 6
  • 41
  • 54
White hawk
  • 1,468
  • 1
  • 15
  • 23
  • 1
    I can't seem to find documentation on how to actually use these - do you have a reference or example? – NStuke Dec 31 '18 at 08:28
  • It's here: https://learn.microsoft.com/en-us/visualstudio/modeling/writing-a-t4-text-template?view=vs-2017 – HackSlash Nov 25 '20 at 18:08
1

Visual Studio 2015 folder

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VSSDK\VisualStudioIntegration\Common\Assemblies\v4.0

Gary Howlett
  • 1,297
  • 1
  • 14
  • 17
0

I have Visual Studio 2008 installed (without the SDK) and Microsoft.VisualStudio.TextTemplating.dll is in the following location on my machine:

C:\Program Files\Common Files\Microsoft Shared\TextTemplating\1.1

Athari
  • 33,702
  • 16
  • 105
  • 146
Daniel Fortunov
  • 43,309
  • 26
  • 81
  • 106