【发布时间】:2018-04-15 08:09:48
【问题描述】:
我有一个项目在 VS2015 version=14.0.25431.01 Update 3 中编译和运行良好。一切都很好,运行良好。
然后我安装了 VS2017 version=15.4.2 并且项目现在拒绝编译并出现错误:
错误 运行转换代码时引发异常。该过程无法继续。引发了以下异常:
System.IO.FileNotFoundException:无法加载文件或程序集“Microsoft.CodeAnalysis,Version=1.3.1.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”或其依赖项之一。该系统找不到指定的文件。
文件名:'Microsoft.CodeAnalysis,版本=1.3.1.0,文化=中性,PublicKeyToken=31bf3856ad364e35'
在 Microsoft.VisualStudio.TextTemplating.CompilerBridge..ctor(字符串源,布尔调试,IEnumerable1 references, String cmdLineArguments)
at Microsoft.VisualStudio.TextTemplating.CompilerBridge.Create(SupportedLanguage language, String source, Boolean debug, IEnumerable1 引用,字符串 cmdLineArguments)
在 Microsoft.VisualStudio.TextTemplating.TransformationRunner.Compile(字符串源,字符串输入文件,IEnumerable1 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, IEnumerable1 编译器参考,字符串编译器选项)
在 Microsoft.VisualStudio.TextTemplating.TransformationRunner.PrepareTransformation(TemplateProcessingSession 会话,字符串源,ITextTemplatingEngineHost 主机)
我已尝试更新 Nuget 包 Microsoft.CodeDom.Providers.DotNetCompilerPlatform 但没有成功。
任何帮助将不胜感激,
特里
【问题讨论】:
标签: c# visual-studio