for the installed .net 6 to work with your code, it must be in path. so you could just execute
dotnet --list-runtimes
and check the results. you could also just deploy self contained applications and not require an install.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
we have an windows forms app built through .NET 6 and during the installation we need to check whether .NET 6 is installed or not. The installation is built through NSIS Installer. I see couple of places where the version can be checked.
1) Registry
For x64 versions HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.WindowsDesktop.App
For x86 versions HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sharedfx\Microsoft.WindowsDesktop.App
2) .NET installed location - %Programfiles%\dotnet\host\fxr
Are these the right approaches ? Any .NET experts /Microsoft experts can advise on the right approaches?
for the installed .net 6 to work with your code, it must be in path. so you could just execute
dotnet --list-runtimes
and check the results. you could also just deploy self contained applications and not require an install.