1

We started a project as .Net Core (C#), but it's become apparent that Core isn't backwards compatible with some packages we need, so we need to change the Core library to the older Framework library.

Is there a way of doing this easier than simply copying and pasting all the code over to a new project?

silver
  • 1,633
  • 1
  • 20
  • 32
Ranger
  • 1,139
  • 1
  • 13
  • 34
  • "Core isn't backwards compatible with some packages we need"? How? It is strange that you have to do so. – Lex Li Nov 11 '16 at 19:49
  • @LexLi Multiple packages (not all) that were attempted to be added via Nuget complained that they weren't compatible with core. – Ranger Nov 11 '16 at 19:50
  • 2
    That's fair. You tried to add .NET Framework targeted assemblies as references in a .NET Core project, and currently it does fail. .NET team is working on that and hopefully .NET Standard 2.0 can help https://blogs.msdn.microsoft.com/dotnet/2016/09/26/introducing-net-standard/ If you do need to act right now, I can think of nothing than copying the files around projects. – Lex Li Nov 11 '16 at 19:53
  • 2
    I’m voting to close this question because it is 5 years old and the problems noted in the question have since long been handled by the community. – TomTom Nov 07 '21 at 13:37

1 Answers1

0

Net Core is fundamentally different to Net Framework and isnt directly compatible. Net Standard was introduced to try and make this burden smaller, but that has since been cast aside. You need to make a decision between Net Framework or Net Core. If Net Core, older libraries will need to be replaced with Net Core compatible versions. There is no 'work around'

Robert Perry
  • 1,906
  • 1
  • 14
  • 14
  • Given that the question dates 2016 that answer is not correlated to the question. NetStandard has not exactly been cast aside, but whatever - what WAS introduced is multi targeting, which comes with NEW projects and postdates the question significantly. – TomTom Nov 07 '21 at 13:37
  • The date of the question is irrelevant. The answer is still valid and correct. Net Standard is somewhat depreciated from the point of Microsoft in that they dont want to support it going forward, and it was intended merely as a stop-gap to get people over to Net Core – Robert Perry Nov 07 '21 at 13:41