0

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!

2
  • 1
    See stackoverflow.com/questions/37778418/…: Your UWP project must reference a Universal Windows Class Library, Portable Library or Windows Runtime Component. Commented Mar 21, 2017 at 15:58
  • Which library were you trying to add? There may be a WinRT compatible version. Commented Mar 22, 2017 at 0:17

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for your answer, it is highly appreciated. Unfortunately, we have decided to leave the UWP app and have a another alternative for it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.