0

I have a .Net 5 web application built on ASP.Net Core. I know this will run on Linux, because .Net 5 is cross platform compatible, just like .Net Core. Previous versions of .Net Core could not reference .Net Framework 4.x dlls, but .Net 5 can.

If I add a reference to a .Net Framework 4.x dll from my .Net 5 application, will the .Net 5 web application still run on Linux? I know this works locally on my Windows machine, but I do not have an easy way to test this on Linux. Does anyone know what would happen? I cannot find any articles that touch on this scenario.

Eric
  • 2,120
  • 1
  • 17
  • 34
  • There is no ".NET 4", did you mean ".NET **Framework** 4"? They are *completely* different things. – Ian Kemp May 20 '21 at 20:50
  • Does this answer your question? [Can I run original MS.Net Framework 4 on Linux someway (with Wine perhaps)?](https://stackoverflow.com/questions/2985788/can-i-run-original-ms-net-framework-4-on-linux-someway-with-wine-perhaps) – Michael Z. May 21 '21 at 21:24

1 Answers1

1

The answer appears to be "Yes". I managed to create a Linux website on Azure and deployed my .Net 5 ASP.Net Core web application to it. This website displays some text that is only contained in a .Net Framework 4.7 dll.

Honestly, I did not expect this to work. If anyone can recommend some reading material to explain why this works, I would appreciate it if you would pass it along.

Eric
  • 2,120
  • 1
  • 17
  • 34