Reputation: 1214
I have a solution with some projects:
I would like to use .net standard projects as much as possible (for the shared projects and preferably for the plugins) because they are more lightweight and can be edited without unloading them in Visual Studio for example.
Referencing .net standard 1.4 libraries FROM an UWP project goes fine, but referencing an UWP project FROM a .net standard 1.4 project results in an error:
Project DeviceSDK is not compatible with netstandard1.4 (.NETStandard,Version=v1.4).
Project DeviceSDK supports: uap10.0.15063 (UAP,Version=v10.0.15063)
Is this is there any workaround for this?
Upvotes: 0
Views: 1037
Reputation: 849
.net standard class library can't reference UWP libs. That would break the whole concept of .net Standard.
The idea is that a class library that targets specific .net standard version can only reference limited set of APIs defined by the standard.
For example, .net standard v1.4 only allows API-s listed within this file: https://github.com/dotnet/standard/blob/master/docs/versions/netstandard1.4_ref.md
This list is frozen and is supposed to remain intact.
Upvotes: 0
Reputation: 1214
I refactored the interfaces and data models of the device SDK out of that project and create a .net standard DeviceSdk.Core project. This project can then be referenced from application logic projects and the DeviceSdk main project.
So the structure becomes roughly:
Upvotes: 0
Reputation: 63143
That's simply impossible. A cross platform library won't be able to reference a platform specific one.
Upvotes: 5