visual-studio 找不到 Microsoft.VisualStudio.TextTemplating 程序集

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/559027/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:10:12  来源:igfitidea点击:

Cannot find Microsoft.VisualStudio.TextTemplating assembly

.netvisual-studiot4

提问by Jeffrey Harrington

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.TextTemplatingassembly and I cannot find it on my system!

我正在使用 T4(文本模板转换工具包)做一些工作,并试图达到可以创建自己的自定义文本模板宿主的程度。但是,所有这些都依赖于Microsoft.VisualStudio.TextTemplating程序集,而我在我的系统上找不到它!

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

我首先尝试在 Visual Studio 中添加对程序集的引用,但Microsoft.VisualStudio.TextTemplating的程序集未在 .NET 选项卡下列出。

I then took a look in the %WINDIR%/Assemblydirectory 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.

然后我查看了%WINDIR%/Assembly目录并找到了Microsoft.VisualStudio.TextTemplating的条目。但是,当我尝试浏览到此位置并在 Visual Studio 中添加程序集时,没有任何反应。

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

有没有其他人遇到过这个问题?根据 MSDN tuts 听起来这个程序集应该包含在 Visual Studio 中(我安装了 VS 2003、2005 和 2008)。

采纳答案by Jeffrey Harrington

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

我安装了 Visual Studio SDK。这是程序集在我的系统上物理安装的位置:

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

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.


它确实会正常显示在“添加引用”对话框中。

回答by Athari

Visual Studio 2012SDK folder is:

Visual Studio 2012SDK 文件夹是:

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

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

回答by obiwanjacobi

In the (new) GAC:

在(新)GAC 中:

VS 2012 (v11.0)

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)

VS 2013 (v12.0)

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.TextTemplating.12.0\v4.0_12.0.0.0__b03f5f7f11d50a3a

回答by White hawk

Theseassemblies have been available for a while now as NuGet packages.

这些程序集作为 NuGet 包已经有一段时间了。

This allows for better dependency management via NuGet.

这允许通过 NuGet 进行更好的依赖管理。

回答by Gary Howlett

Visual Studio 2015folder

Visual Studio 2015文件夹

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

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

回答by Daniel Fortunov

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

我已经安装了 Visual Studio 2008(没有 SDK)并且Microsoft.VisualStudio.TextTemplating.dll在我机器上的以下位置:

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

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