Lorenz
Lorenz

Reputation: 159

Referencing .Net class library running under .Net 4.5.x in a UWP app

I am currently working on a UWP app (which automatically has reference to Microsoft.NETCore.UniversalWindowsPlatform when I added it). Now I want to reference a class library (contains the models for code reuse) running under .Net Framework 4.5.x into the UWP app but when I try to add the dll it throws this error

" could not be added. The project targets '.NETCore' while file reference targets '.NETFramework'. This is not a supported scenario."

Is there any work around for this?

Any answers/tips are highly appreciated!

Upvotes: 0

Views: 657

Answers (1)

Ivan  Chepikov
Ivan Chepikov

Reputation: 825

Because as the error says UWP doesn't support .Net libraries. Possible solution is to extract and port needed code so you can use it in .Net and UWP projects. There are several options: .Net Standart or Portable class library

Upvotes: 1

Related Questions