sfaust
Posts: 50
Joined: Tue Oct 13, 2015 11:57 pm

Prerequisite for any build of .NET 8?

My question is if there is a way to have a prerequisite for ANY version of .NET 8 to be installed rather than a specific build. My quandary is that I have an application that is an addin to another application, but also has a way to install and run outside of the parent. If the parent is installed (most common) then .NET will be installed with that and the user shouldn't have to install .NET. If they do not have the parent installed, though, and just want to install mine independently then they may not have .NET 8 installed and so I put in a prerequisite in.

I initially released with a prerequisite for .NET 8.0.4 as that was what the parent application was using and is the latest for AI to have. However, now they have released an update to the parent program that uses 8.0.6. When users install my application it's wanting them to install 8.0.4 and the parent app is apparently complaining about that...

So is there a way to tell it to just make sure some version of .NET 8 is installed? Would I be better off just not setting a prerequisite and just telling the minority of users that don't have the parent installed that they need to install .NET 8 on their own?
Catalin
Posts: 7259
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisite for any build of .NET 8?

Hello,
Would I be better off just not setting a prerequisite and just telling the minority of users that don't have the parent installed that they need to install .NET 8 on their own?
That could indeed be an ideea.

However, I admit that I'm not fully sure how to check wheter any version of .NET 8 is installed. I'm guessing we can do a script or something to retrieve the version and then compare it to 8.0.0 and if it's higher, it means a version of .NET 8 is installed.

You can do all this, including the messagebox from the script custom action.

However, there is one question left and that is: do you want to allow your users to install the setup even if .NET 8 is not installed?

If so, then we can try the custom action approach.

If not, then we might need to use the "Launch Condition" (custom launch condition) support which will fail the installation for us.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”