.net framework forward compatibe?

OSVBNET 1,386 Reputation points
2022-04-25T21:33:44.45+00:00

Hello, my app in .net framework 4.6.1 runs on Windows 8.1 with .net 4.5.1, but why?

On a new Win8.1 setup, .net framework 4.5.1 is pre-installed, but I have set my app to require minimum .net 4.6.1, so why it should run on lower .net versions? Very unexpected behaviors will happen!

OK I know how to detect the installed .net framework version on start-up, my question is that is there any other way to prevent it via Visual Studio itself? and not my coding? Maybe some property I'm not aware of?
Thanks

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,641 questions
{count} votes

Accepted answer
  1. Jiachen Li-MSFT 28,001 Reputation points Microsoft Vendor
    2022-04-26T05:43:17.857+00:00

    Hi @OSVBNET ,
    You can set the .net framework version target to 4.6.1 in 'Launch Condition' in Visual Studio Setup Project.

    1. Select installer project
    2. In Solution Explorer or Solution Navigator click on the icon at the top of the panel "Launch Conditions Editor" (In VS2010 its the icon with binoculars, in VS2015 and VS2017 the icon is a sheet of paper with a filter in front of it.
    3. Under Launch Conditions, Select ".Net framework" on the right in "Properties" Select "Version" you will see a drop down. change the framework to your target framework.
    4. Build and install.

    Best Regards.
    Jiachen Li

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful