.net6 uninstallation has created issue while .net 8 was already present. Application started breaking and was giving 500 error

Raccoon 0 Reputation points
2025-10-09T16:28:11.43+00:00

.net6 uninstallation has created issue while .net 8 was already present in windows server. Application started breaking and was giving 500 error.

We need to upgrade our application build on .net6 to .net8. Now in our lower environment we followed below process

  1. Installed .net 8 in the windows server(server was already having .net6)
  2. Deployed our code pointing to .net8
  3. Uninstalled .net 6 from the windows server.

In our UAT server we had not faced any issue. But we followed the same process in our PROD server and our application stopped working.

So what could be the reason for that? Also when we did analysis we found hosting bundle dll was missing.

But how it got missed? what could be the reason?Why it had not happened in lower environment?

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

1 answer

Sort by: Most helpful
  1. Jack Dang (WICLOUD CORPORATION) 2,400 Reputation points Microsoft External Staff
    2025-10-10T03:46:19.97+00:00

    Hi @Raccoon ,

    Thanks for reaching out.

    This behavior likely occurred because uninstalling the .NET 6 Hosting Bundle removed shared IIS integration components (used by the ASP.NET Core Module) that are still required by the .NET 8 Hosting Bundle.

    Even though .NET runtimes are designed to be installed side by side, the hosting bundle (used for IIS-based deployments) includes common modules such as:

    • aspnetcorev2_inprocess.dll
    • dotnet-hosting-* shared files

    If the .NET 8 Hosting Bundle was installed before .NET 6 was uninstalled, removing .NET 6 could have deleted these shared hosting files - breaking IIS integration and causing the 500 errors you observed.

    That’s why you noticed the missing hosting bundle DLL, and why it didn’t occur in your lower environment - the uninstall process can behave differently depending on update history or which hosting bundle version was installed last.

    Recommended actions

    1. Reinstall the .NET 8 Hosting Bundle on the affected server to restore all shared IIS hosting components.
    2. Restart IIS (iisreset) after installation.
    3. For future upgrades, uninstall older hosting bundles before installing the new one, or reinstall the newer bundle afterward to ensure shared files remain intact.

    For reference: .NET Hosting Bundle installation and upgrade guidance

    Hope this helps! If my answer was helpful - kindly follow the instructions here so others with the same problem can benefit as well.


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.