question

osvbnet avatar image
0 Votes"
osvbnet asked osvbnet commented

.net framework forward compatibe?

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

dotnet-visual-basic
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

to do your test, be sure you did not run any windows updates. the first windows update you run, would upgrade the .net framework in place. also be sure the win8.1 setup is old enough, that it does not have any preinstalled service packs.


1 Vote 1 ·

1 Answer

JiachenLiMFST-9349 avatar image
0 Votes"
JiachenLiMFST-9349 answered osvbnet commented

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 (shout out to Mat and Bob Van de Vijver in the comments).

  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.


· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, thanks dude, but installer project? Not having one! My .net app is stand-alone, I just obfuscate it, a single executable with no installer!

0 Votes 0 ·

Hi @osvbnet ,
In your tests, have you checked all the .net versions installed on the computer? Windows updates may upgrade the .net framework.

0 Votes 0 ·
osvbnet avatar image osvbnet JiachenLiMFST-9349 ·

Hey thanks, do you mean that my app in .net framework 4.6.1 will not run on systems with .net framework 4.5.1 and perhaps my .net framework is updated by WU?

If so, not the case, just installed genuine Win8.1 ISO on offline VirtualBox which only has .net framework 4.5.1 installed, and was able to run my .net app targeting .net framework 4.6.1!
But since my app was using some specific .net framework 4.6.1 new methods, in that areas it's behaving .... :(

0 Votes 0 ·
Show more comments

Hi @osvbnet ,
May I know if you have got any chance to check my reply? I am glad to help if you have any other questions.

0 Votes 0 ·