“Missing compiler required member” error being thrown multiple times with almost no changes to code

后端 未结 12 1213
既然无缘
既然无缘 2020-12-13 22:46

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

相关标签:
12条回答
  • 2020-12-13 23:26

    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.

    0 讨论(0)
  • 2020-12-13 23:26

    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.

    0 讨论(0)
  • 2020-12-13 23:34

    NLog.dll 2.0 referenced from a .NET 4.0 project can cause this too.

    0 讨论(0)
  • 2020-12-13 23:37

    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

    0 讨论(0)
  • 2020-12-13 23:39

    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#

    0 讨论(0)
  • 2020-12-13 23:42

    Got this error when trying to use async Tasks against .NET 4.0. Updating Target Framework to 4.5.2 fixed the problem.

    0 讨论(0)
提交回复
热议问题