Today after deploying some changes to a C# MVC site that I run, I went back to make some more modifications and came across this error:
Missing compil
In my case it was because the project was not referencing Microsoft.CSharp
. Once I added a reference to that assembly, it compiled just fine.
Probably you use dynamic
keyword In .NetStandard Class library project. If so, you need to add a reference to Microsoft.CSharp
library in the project. Hope it will resolve your problem.
NLog.dll 2.0 referenced from a .NET 4.0 project can cause this too.
I hit the same set of exceptions after I added some async methods to a winforms project. I needed to bump my .NET version from 4 to 4.5
This error usually means either your project is compiling against .NET 2.0 or you aren't referencing the correct version of System.Core.dll
For a near duplicate question, see Error when using extension methods in C#
Got this error when trying to use async Tasks against .NET 4.0. Updating Target Framework to 4.5.2 fixed the problem.