You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following error is generated by Chocolatey when upgrading dotnet-aspnetcoremodule-v2
- dotnet-aspnetcoremodule-v2 (exited 1) - dotnet-aspnetcoremodule-v2 not upgraded. An error occurred during installation:
Updating 'dotnet-aspnetcoremodule-v2 15.0.21297' to 'dotnet-aspnetcoremodule-v2 16.0.21299' failed. Unable to find a version of 'dotnet-5.0-windowshosting' that is compatible with 'dotnet-aspnetcoremodule-v2 16.0.21299'
Uninstalling both packages and re-installing manually (first dotnet-aspnetcoremodule-v2, followed by dotnet-5.0-windowshosting) corrected the issue, but this may affect automated updates for users until fixed.
The text was updated successfully, but these errors were encountered:
This is correct behavior, even if perhaps surprising.
The ASP.NET Core Module (ANCM) is a single, ever-evolving component, shared by all .NET major.minor versions. All .NET major.minor runtime versions (such as 3.1, 5.0, 6.0) can be installed side-by-side on the same machine, but there is only one ANCM. A given .NET major.minor release corresponds to a range of ANCM versions (e.g. .NET 3.1 has ANCM 13.1., .NET 5.0 has ANCM 15.0.). However, A given ANCM version supports also all earlier .NETs.
Now, the -windowshosting packages (e.g. dotnet-5.0-windowshosting) are metapackages designed so that installing that package ensures that you have all hosting components specifically for .NET 5.0. This means, in particular, that the ANCM is restricted to the .NET 5.0 version range (15.0.*) and its package cannot be upgraded to a version outside of this range (this is the behavior you are seeing), because it would break the promise made by the dotnet-5.0-windowshosting package (the ANCM would not be from .NET 5.0 anymore).
But, being metapackages, the -windowshosting packages do not install anything by themselves; they simply depend on the packages which do the actual installing, in this case: dotnet-5.0-runtime, dotnet-5.0-aspnetruntime and dotnet-aspnetcoremodule-v2 (with version range limit). If you want to have a mix of runtimes, you should not install any -windowshosting package, but the more granular packages.
In other words, if a machine should support multiple .NET versions in IIS, then these packages should be installed:
dotnet-X.Y-runtime (or dotnetcore-X.Y-runtime) for each desired .NET X.Y
dotnet-X.Y-aspnetruntime (or dotnetcore-X.Y-aspnetruntime) for each desired .NET X.Y
dotnet-aspnetcoremodule-v2 (either simply the globally latest version or the version corresponding to the highest .NET X.Y installed on the machine)
The following error is generated by Chocolatey when upgrading
dotnet-aspnetcoremodule-v2
Uninstalling both packages and re-installing manually (first
dotnet-aspnetcoremodule-v2
, followed bydotnet-5.0-windowshosting
) corrected the issue, but this may affect automated updates for users until fixed.The text was updated successfully, but these errors were encountered: