2017-11-02 1 views
1

VS2015 버전 = 14.0.25431.01 업데이트 3으로 컴파일되고 실행되는 프로젝트가 있습니다. 모든 것이 훌륭하고 완벽하게 작동합니다.프로젝트를 VS2015에서 VS2017로 바꾸면 CodeAnalysis 오류가 발생합니다.

그때 VS2017 버전 = 15.4.2 설치 프로젝트가 이제 오류와 함께 컴파일을 거부 : 변환 코드를 실행하는 동안

오류 예외가 발생했습니다. 과정을 계속할 수 없습니다. 다음 예외가 throw되었습니다. System.IO.FileNotFoundException : 파일 또는 어셈블리 'Microsoft.CodeAnalysis, Version = 1.3.1.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35'또는 해당 종속성 중 하나를로드 할 수 없습니다. 시스템이 지정된 파일을 찾을 수 없습니다. Microsoft.VisualStudio.TextTemplating.CompilerBridge..ctor (String source, Boolean 디버그, IEnumerable 1 references, String cmdLineArguments) at Microsoft.VisualStudio.TextTemplating.CompilerBridge.Create(SupportedLanguage language, String source, Boolean debug, IEnumerable 참조, String cmdLineArguments)에서 파일 이름 : 'Microsoft.CodeAnalysis, 버전 = 1.3.1.0, 문화 = 중립, PublicKeyToken = 31bf3856ad364e35'

Microsoft.VisualStudio.TextTemplating.TransformationRunner.PrepareTransformation (TemplateProcessingSession 세션 문자열 소스 ITextTemplatingEngineHost 호스트)에 Microsoft.VisualStudio.TextTemplating.TransformationRunner.Compile (문자열 소스 입력 _ 문자열, 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 문자열 compilerOptions) 에서

Nuget 패키지 Microsoft.CodeDom.Providers.DotNetCompilerPlatform을 업데이트하려고했지만 운이 없습니다.

어떤 도움을 주시면 감사하겠습니다,

테리

답변

0

우리는 우리가 사용했던 T4 템플릿 텍스트 변성 코드를 제거 결국이 문제를 해결했습니다.

이상적인 솔루션은 아니지만 충분히 좋습니다.

MSBuild support for T4 templates in Visual Studio 2017 RTM

https://social.msdn.microsoft.com/Forums/en-US/424885d8-8247-4632-ba3f-da75cd18d304/upgrading-project-from-vs2015-to-vs2017-leads-to-codeanalysis-error?forum=visualstudiogeneral&prof=required

이 문제가 발생하는 다른 사람에 대한 몇 가지 제안을했다 두 개의 스레드가있다
관련 문제