Microsoft.VisualStudio.TextTemplating.14.0错误 [英] Microsoft.VisualStudio.TextTemplating.14.0 Error
问题描述
嗨
我有一个github项目 https://github.com/smangelschots/T4Host (创建于vs2013)我想更新tos vs2015,但似乎无法解决我的错误:
I have got a github project https://github.com/smangelschots/T4Host (created in vs2013) I want to update tot vs2015 but I do not seem to get it working my error:
运行转换代码时引发了异常.该过程无法继续.引发了以下异常:
System.IO.FileNotFoundException:无法加载文件或程序集"Microsoft.CodeAnalysis,版本= 1.3.1.0,文化=中性,PublicKeyToken = 31bf3856ad364e35"或其依赖项之一.系统找不到指定的文件.
文件名:"Microsoft.CodeAnalysis,版本= 1..3.1.0,区域性=中性,PublicKeyToken = 31bf3856ad364e35"
在Microsoft.VisualStudio.TextTemplating.CompilerBridge..ctor(字符串源,布尔调试,IEnumerable`1引用,字符串cmdLineArguments)
在Microsoft.VisualStudio.TextTemplating.CompilerBridge.Create(SupportedLanguage语言,字符串源,布尔调试,IEnumerable`1引用,字符串cmdLineArguments)
在Microsoft.VisualStudio.TextTemplating.TransformationRunner.Compile(字符串源,字符串inputFile,IEnumerable`1参考,布尔调试,SupportedLanguage语言,字符串compileOptions)
在Microsoft.VisualStudio.TextTemplating.TransformationRunner.LocateAssembly(Boolean cacheAssemblies,String fullClassName,String源,String inputFile,Boolean调试,SupportedLanguage语言,IEnumerable`1编译器参考,String编译器选项)
在Microsoft.VisualStudio.TextTemplating.TransformationRunner.PrepareTransformation(TemplateProcessingSession会话,字符串源,ITextTemplatingEngineHost主机)上
An Exception was thrown while running the transformation code. The process cannot continue. The following Exception was thrown:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.CodeAnalysis, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.VisualStudio.TextTemplating.CompilerBridge..ctor(String source, Boolean debug, IEnumerable`1 references, String cmdLineArguments)
at Microsoft.VisualStudio.TextTemplating.CompilerBridge.Create(SupportedLanguage language, String source, Boolean debug, IEnumerable`1 references, String cmdLineArguments)
at Microsoft.VisualStudio.TextTemplating.TransformationRunner.Compile(String source, String inputFile, IEnumerable`1 references, Boolean debug, SupportedLanguage language, String compilerOptions)
at Microsoft.VisualStudio.TextTemplating.TransformationRunner.LocateAssembly(Boolean cacheAssemblies, String fullClassName, String source, String inputFile, Boolean debug, SupportedLanguage language, IEnumerable`1 compilerReferences, String compilerOptions)
at Microsoft.VisualStudio.TextTemplating.TransformationRunner.PrepareTransformation(TemplateProcessingSession session, String source, ITextTemplatingEngineHost host)
此外,当我尝试从msdn(下面的URL)重新创建项目时,也会遇到相同的错误.
Also when I try to recreate the project from msdn (url below) I get the same error.
https://msdn.microsoft.com/en-us/library/bb126579.aspx
如果我使用旧的dll,效果很好
It works fine if I use the old dlls
Microsoft.VisualStudio.TextTemplating.12.0.dll
Microsoft.VisualStudio.TextTemplating.VSHost.12.0.dll
Microsoft.VisualStudio.TextTemplating.12.0.dll
Microsoft.VisualStudio.TextTemplating.VSHost.12.0.dll
但是我不需要安装VS2013,所以我不想这样做.
But than i need to install VS2013 and I do not want to do that.
有人知道我的问题了吗
谢谢
推荐答案
您好,史蒂夫·曼格肖特(Steve Mangelschots),
Hi Steve Mangelschots,
在我的VS2015中,我可以打开该项目并构建它而没有任何问题,因为我有
In my VS2015 I could open this project and build it without any problems, because I have
Microsoft.VisualStudio.TextTemplating.12.0.dll
Microsoft.VisualStudio.TextTemplating.12.0.dll
Microsoft.VisualStudio.TextTemplating.VSHost.12.0.dll
Microsoft.VisualStudio.TextTemplating.VSHost.12.0.dll
因为在我的计算机上,我已经安装了VS2013 Update5的测试代理和测试控件,所以我可以打开任何需要引用VS2013 dll的项目.
Because in my computer, I have installed Test Agent and Test Control for VS2013 Update5, so I could open any projects that need to refer VS2013 dlls.
在我的计算机上:
您可以删除它们,并从VS2015添加相同的dll.请参考以下屏幕截图:
You could delete them and add the same dlls from VS2015. Please refer to the following screenshot:
此致
奥斯卡
这篇关于Microsoft.VisualStudio.TextTemplating.14.0错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!