Skip to content
⌘ NSIS Forum Archive

Migrating from .Net 3.5 to 4.7.1

7 posts

scarleton#

Migrating from .Net 3.5 to 4.7.1

I have been using NSIS for years to distribute my application. I have upgraded the app from .Net 3.5 to .Net 4.7.1 and am having problems getting NSIS to check for the new .Net runtime. I am using the NsisDotNetChecker by Alexei Sitnikov which was just updated yesterday to support .Net 4.7.1. All I did was replace the old line with the new one:

old code:
!include "DotNET35.nsh"
Function .onInit
!insertmacro DOTNET35_CHECK
FunctionEnd
new code:
!include "DotNetChecker.nsh"
Function .onInit
!insertmacro CheckNetFramework 471
FunctionEnd
When I go to run the install on Window 10 without any .Net runtime, it simply installs. Any suggestions on what I should do to trouble shoot this issue?
scarleton#
Windows 10 did have A version of .Net 4.x.x installed, doesn't mean it is new enough, though.

In my case, yes I did uninstall .Net 4, fore I wanted to make sure the install did something to let the user know that .Net 4.7.1 is needed, which it did not.
Anders#
You have not posted any actual code that checks the version AFAIK.

You could of course do some additional research first as well, like looking at the registry keys on your Windows 10 machine and compare it with the keys used by the plug-in ( https://github.com/ReVolly/NsisDotNe.../detectfx.cpp# ). And/or use Process Monitor and look at the keys read by your installer.

Could there be additional issues related to 64 vs 32 bit .NET? Have you removed both?
scarleton#
Originally Posted by Anders View Post
You could of course do some additional research first as well, like looking at the registry keys on your Windows 10 machine and compare it with the keys used by the plug-in ( https://github.com/ReVolly/NsisDotNe.../detectfx.cpp# ). And/or use Process Monitor and look at the keys read by your installer.
Thank you, I had not thought of using Process Monitor to see which registry keys are being looked at.

Originally Posted by Anders View Post
Could there be additional issues related to 64 vs 32 bit .NET? Have you removed both?
It turns out that even though I 'uninstalled' .Net, the registry entries are still present on the machine. Process Monitor is indicating that it is reading the values, so it looks like the plugin is working. Thank you for your help! I am going to go ask Microsoft for more insight on how to test for .Net, I think they are missing something...