Cannot find Microsoft.VisualStudio.TextTemplating

2019-01-18 08:30发布

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).

6条回答
看我几分像从前
2楼-- · 2019-01-18 09:05

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.

查看更多
Root(大扎)
3楼-- · 2019-01-18 09:05

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
查看更多
甜甜的少女心
4楼-- · 2019-01-18 09:08

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

查看更多
【Aperson】
5楼-- · 2019-01-18 09:19

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

This allows for better dependency management via NuGet.

查看更多
放我归山
6楼-- · 2019-01-18 09:27

Visual Studio 2015 folder

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

查看更多
Anthone
7楼-- · 2019-01-18 09:32

Visual Studio 2012 SDK folder is:

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

查看更多
登录 后发表回答