Error when using extension methods in C#

后端 未结 16 2774
夕颜
夕颜 2020-12-13 01:31

I came across an issue that makes me think there is bug in the 3.0 framework. When I try to use extension methods I get the following error:

Missing compile         


        
16条回答
  •  我在风中等你
    2020-12-13 02:14

    For ongoing reference:

    I have battled this exact same error message for the last two hours in the .Net 4.0 framework and finally tracked it down to a corrupted reference to the Microsoft.CSharp dll. It was such a frustratingly simple issue. I deleted the offending reference and added a "new" reference to that dll which was located at:

    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Microsoft.CSharp.dll
    

    Hopefully this will save someone else the time and aggravation of tracking down a solution to this error message.

提交回复
热议问题