简体   繁体   中英

Can't add reference to .NET Portable Class Library

I'm trying to build the OsmSharp latest download from their GIT repo. https://osmsharp.codeplex.com/

The problem is that I try and build and get a load of errors. The main one seems to be

"Error 296 Cannot define a new extension method because the compiler required type 'System.Runtime.CompilerServices.ExtensionAttribute' cannot be found. Are you missing a reference to System.Core.dll?"

This is a Portable Class Library and so I try to add the reference by right-clicking on the project and choosing "Add Reference", choosing .NET and I have nothing to add!

Anyone any ideas on how to get a list of .NET references to add?

在此处输入图片说明

I had this problem because there weren't any Target Frameworks set in the Library section of the project properties. Adding a couple fixed the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM