I have a new laptop with Windows 10. I installed the latest Visual Studio 2017. I opened up the c# solution which I had previously been working on a Windows 7 laptop with an older version of Visual Studio 2017 (i.e. not the latest update). The only difference with the setup is that the new install has .net framework 4.6.1 vs 4.8. when I try to build I get the following error:
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'Microsoft.CodeAnalysis, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The module was expected to contain an assembly manifest. C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Roslyn\Microsoft.CSharp.Core.targets 52
I did try to revert back to 4.6.1. I also tried most of the suggested solutions in any previous questions with "could not load file or assembly"