Solve the problem of System. Runtime. CompilerServices. ExtensionAttribute... ctor and 'extensionattribute' is ambiguous in the namespace 'System. Runtime. compilerservice'. ExtensionAttribute

Source: Internet
Author: User

Solve the problem of System. Runtime. CompilerServices. ExtensionAttribute... ctor and 'extensionattribute' is ambiguous in the namespace 'System. Runtime. compilerservice'. ExtensionAttribute

Obtain the previous old project from VSS and compile the project.
System. Runtime. CompilerServices. ExtensionAttribute... ctor

The "delete Newtonsoft. Json. netw.dll and rereference it" written on the Internet does not solve this problem.

 

The original Article was first published on my main blog

Http://anforen.com/wp/2017/07/system-runtime-compilerservices-extensionattribute-ctor-%E4%B8%8E-extensionattribute-is-ambiguous-in-the-namespace-system-runtime-compilerservices/

Use
//// The member "System. Runtime. CompilerServices. ExtensionAttribute... ctor" that lacks the compiler requirements"
Namespace System. Runtime. CompilerServices
{
Public class ExtensionAttribute: Attribute {}
}
If the compilation is successful, the page cannot be opened after it is updated to the old website. This error is reported.
'Extensionattribute' is ambiguous in the namespace 'System. Runtime. compilerservice'
It does not work with the latest Newtonsoft. json.

The three lines of code added above conflict with the existing ones.
Therefore, delete the three lines of code added above. Deleting these three lines of code will return to the initial issue. The compilation times System. Runtime. CompilerServices. ExtensionAttribute.. ctor

 

Finally, select the target framework to the latest version. Like this


That's all.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.