I originally asked this question here on StackOverflow:
Detecting .NET8 with Inno Setup and InnoDependenciyInstaller
And, it the comments it was suggested that I also reach out here to the author of the NuGet package. So, here goes:
I am looking at using
InnoDependencyInstaller and it has a function that it uses under the hood:
Dependency_AddDotNet80
procedure Dependency_AddDotNet80;
begin
if not Dependency_IsNetCoreInstalled('-n Microsoft.NETCore.App -v 8.0.0') then begin
Dependency_Add('dotnet80' + Dependency_ArchSuffix + '.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'.NET Runtime 8.0.0' + Dependency_ArchTitle,
Dependency_String('https://download.visualstudio.microsoft.com/download/pr/593685c9-7e98-455a-8e34-4b8ad1be9489/6ccf85c6fc244428d61f74ca3aee0645/dotnet-runtime-8.0.0-win-x86.exe', 'https://download.visualstudio.microsoft.com/download/pr/7f4d5cbc-4449-4ea5-9578-c467821f251f/b9b19f89d0642bf78f4b612c6a741637/dotnet-runtime-8.0.0-win-x64.exe'),
'', False, False);
end;
end;
My query is with this test:
if not Dependency_IsNetCoreInstalled('-n Microsoft.NETCore.App -v 8.0.0')
I think the latest installer of .NET8 is greater than 8.0.0. So will this test fail? I would ask on the GitHub repository page but there is no way to create an issue there.
Footnote: Here is a related question on this subject, where it refers to 8.0.3:
Check if .NET 5.0 is installed in Inno Setup
So, I essentially have 2 related queries:
1. How can we ensure that we are checking for (and downloading) the latest .NET8 using this system? Ideally the feedback to the users should state it, eg. 8.0.3.
2. How can we install both the x86 (if required) and x64 versions of the .NET8 runtime? Because, when I tried using Dependency_AddDotNet80; on a test laptop it only installed the x86 version.
It is a pity that this excellent GitHub tool doesn't add any logging into the installation log. The only thing I gleaned is that it it downloaded netcorecheck.exe into the temporary folder for using during installation.
What I have tried:
I have followed the sample code on the GitHub repository but unable to test as I already have the latest .NET8 runtime installed.
Did initial test using a spare laptop that we have.