Click here to Skip to main content
15,905,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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:


procedure Dependency_AddDotNet80;
  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('', ''),
      '', False, False);

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.
Updated 6-Apr-24 7:13am
Dave Kreskowiak 6-Apr-24 13:09pm    
If you're trying to get in touch with the author of a component, you're going to have to contact that author directly. Just posting your message in the public forum is just relying on whoever that person is to stumble across your post, which is extremely unlikely.

If you're talking about an article here on CP, there is a forum at the bottom of the article in which the author is notified of every post.
Andrew Truckle 6-Apr-24 14:18pm    
Ah, got it:
Andrew Truckle 6-Apr-24 13:28pm    
I just posted a comment on his article, but it is in moderation:
Pete O'Hanlon 6-Apr-24 14:01pm    
I have unblocked your question on that forum.
Andrew Truckle 6-Apr-24 14:18pm    
Thank you! I just fixed a typo and it has gone into moderation again. 🤭

1 solution

As this appears to use netcorecheck, it means that the version check is an exact version, so passing 8.0.0 inside looks to see if that version is installed, so if you need 8.0.3, this would have to be passed in.
Share this answer
Maciej Los 8-Apr-24 16:24pm    
Pete O'Hanlon 8-Apr-24 16:59pm    
Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900