2

I have some rather large .NET Framework applications I want to upgrade to .NET 5, but it would be cumbersome to upgrade them all at once. I was thinking of doing this gradually, by starting with the most "core" of the projects in the applications and working out from there. However this doesn't seem to work; when I try to reference a .NET 5 project from a .NET Framework project, I get all sorts of errors saying things like the type Object is undefined and I need to add a reference to System.Runtime version 5.0.0.0. Is this impossible, or am I just doing it wrong?

1
  • 2
    TL;DR: no, it's not possible. Long answer would need to explain the differences between .NET Framework and .NET Core (renamed to just .NET in version 5). The best you can do is move code to .NET Standard 2.0 libraries which can be targeted by both .NET Framework and .NET/.NET Core Commented Jan 21, 2021 at 21:28

1 Answer 1

2

No. And if you forced it by taking out all the checks, bad things happen.

The intermediate stepwise solution is to port every dll that can to netstandard2.0, which can be referenced by both. If your systems are like mine, most of the dlls will switch from NET Framework to NET Standard without major difficulty. Then you move the executables and/or websites to net 5, and then you can change the dlls to net 5.

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.