I had a similar issue, but I needed the Microsoft.Net.Compilers
installed.
First, I removed the Microsoft.Net.Compilers
, I had version 4.2.0 which is the latest for this date.
Removed it like that:
PM> Uninstall-Package Microsoft.Net.Compilers
This should be enough but you can also unload the project and comment\delete the import tag in the csproj
:
<!-- <Import something about Microsoft.Net.Compilers /> -->
This removed the error completely but I still needed to use Roslyn which required Microsoft.Net.Compilers
. I looked at Microsoft documentation about Roslyn package.
I was using Visual Studio 2017 15.9 and they mentioned the correct version for my version:
2.10.0 Visual Studio 2017 version 15.9
I simply installed the compatible version and now I have it without any errors:
PM> NuGet\Install-Package Microsoft.Net.Compilers -Version 2.10.0