how to give a check whether the client machine has .net 6 installed or not if install then is that greater then .net runtime 6.0.0 in wix bootstarper

Aditya Dalai 25 Reputation points
2023-06-26T02:41:25.72+00:00

Here I have created that condition.

<bal:Condition
Message="This setup requires Microsoft .NET 6.0 or above.">
        <![CDATA[NET6VERSION >= 6.0.0]]>
    </bal:Condition>

then I have declared the variable in the wix.

<Variable Name="NET6VERSION" bal:Overridable="yes" Type="numeric" Value="0" />

then the registry search for the .net 6 .

<util:RegistrySearch
        Id="DotNet6RegistrySearch"
        Root="HKLM"
        Key="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.WindowsDesktop.App"
        Value="Version"
        Variable="NET6VERSION"
        Result="value"  />

so I want to give a check that if the client machine installed .net is greater the .net v6.0.0 then the setup should allow to insatll. ,but the variable doesn't carry the .net version of client machine

please help me to find the solution.

Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | .NET | .NET Runtime
0 comments No comments
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.