Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor'

I have a project targeted to .Net 4.0. It used to build till yesterday. I looked at code and referenced assemblies. I can see the Extension attribute defined. Anyone has any clue about it.

I referred following questions but no help - "Missing compiler required member" error being thrown multiple times with almost no changes to code

enter image description here

enter image description here

* UPDATE 1: * I see Npgsql is defining ExtensionAttribute in the same namespace. When I removed and added older version of Npgsql, it built. What should I do to use latest Npgsql?

enter image description here

like image 802
Codie Avatar asked Sep 30 '22 06:09

Codie


1 Answers

This happened to me recently, and my research kept coming back to problems with JSON.Net not targeting the correct version.

If you are using it, I would suggest removing it from your references, and removing the lines from your packages.config that also reference it. Then re-install it through NuGet and compile.

like image 95
Mark Wesley van Oudheusden Avatar answered Oct 06 '22 20:10

Mark Wesley van Oudheusden