I have a project that compiles and runs fine in VS2015 version=14.0.25431.01 Update 3. Everything is great and works perfectly.
I then installed VS2017 version=15.4.2 and the project now refuses to compile with the error:
Error 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, IEnumerable1 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, 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, IEnumerable
1 compilerReferences, String compilerOptions)
at Microsoft.VisualStudio.TextTemplating.TransformationRunner.PrepareTransformation(TemplateProcessingSession session, String source, ITextTemplatingEngineHost host)
I have tried updating the Nuget package Microsoft.CodeDom.Providers.DotNetCompilerPlatform but no luck.
Any help would be appreciated,
Terry