4

We've updated our app from 4.6 to 4.8. After some tests I figured out that on the system with only 4.7.1 Framework installed our app starts flawless. However we have no machine with only 4.6 Framework and I have 2 questions:

  1. Can the app compiled with 4.8 be started on 4.6 (without any changes in code)?
  2. What happens than, if a method available only on 4.8 will be called on the system with lower framework?
Dennis Meissel
  • 1,825
  • 1
  • 21
  • 33
  • 1
    You'll have to test this, eg in a VM – Panagiotis Kanavos Nov 18 '20 at 12:49
  • 5
    Honestly, this sounds like a "just don't do that" scenario; if you're targeting a higher platform than exists at runtime, nobody here can guarantee that it will work; might it work by chance? sure... but that doesn't make this a good idea. More recent versions of .NET have self-bundling deployment options, so there is no dependency on a specific runtime being pre-installed (honestly, both net46 and net48 are bad choices for new work without a strong mitigating reason) – Marc Gravell Nov 18 '20 at 12:50
  • 1
    Indeed - why not move to .NET Core/5? You'll have to do this sooner or later, and the self-contained deployment option means you don't need to care about runtimes – Panagiotis Kanavos Nov 18 '20 at 12:53
  • 2
    It will start, [eventually](https://stackoverflow.com/a/10033128/17034). You didn't guess at 4.7.1 correctly, quite hard to find such a machine today. Windows Update got your back. – Hans Passant Nov 18 '20 at 13:20

1 Answers1

2

This guide details changes between .NET Framework 4.6 and 4.8, so if your project uses anything specified on this guide, the application will throw an exception.

Otherwise, it should work I guess ?

Laurent
  • 478
  • 7
  • 15