Windows service Upgrade is failing with .net runtime 10.0.10
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
We have a windows service which was targeting to .net 4.7.2. We are now testing on upgrading it to target to .net 10.0.10. But the upgrade is failing. We use wix to install the msi. so on upgrading its uninstalling the exisitng vserion, but not able to install the new version. We see the below error in event viewer. We have added a prerequisites for .net 10 runtime for our service now.
Its working fine when we fresh install the service.
Its also working fine when manually installing the .net 10.0.10 runtime and then try upgrading the service.
But its failing when there is another 10.0.9 or 10.0.8 runtime already present on the machine. In prerequisites We have a check if minor version already present then skip installing to the given .net runtime. But in our service We have no where mentioned that our service should explicty target to 10.0.10. We have only set the targetframework as .net10-windows.
The following frameworks were found:
8.0.28 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
10.0.9 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Learn more:
[Troubleshoot app launch failures - .NET | Microsoft Learn](https://aka.ms/dotnet/app-launch-failed)
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=10.0.10&arch=x64&rid=win-x64&os=win10
Contributor guide
Research direction
Start by reproducing the MSI upgrade with .NET 10.0.9 already installed, then inspect the Windows Event Viewer launch error and the WiX prerequisite check. Compare that case with a fresh install and with .NET 10.0.10 preinstalled; done means the upgrade installs the service and it launches successfully in the existing-runtime case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- devops, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100