How to get .NET framework 4.8.1 installed on IIS Web Server running Windows Server 2019 via choco?

I've upgraded my .NET Framework website to .NET Framework 4.8.1. In my choco package which installs the website, I've switched the dependency to choco install netfx-4.8.1 --version 4.8.1.20250219 However, it always fails the installation. It doesn't give me much to go on. What do you recommend? I've even ran the windows updates manually and it installed. I am hoping for an automated way vs. just installing the .NET Framework Runtime manually.
PS C:\Windows\system32> choco install netfx-4.8.1
Chocolatey v1.2.0 Business
Installing the following packages:
netfx-4.8.1
By installing, you accept licenses for the packages.

netfx-4.8.1 v4.8.1.20250219
netfx-4.8.1 package files install completed. Performing other installation steps.
Downloading netfx-4.8.1 64 bit
from 'https://download.microsoft.com/download/4/b/2/cd00d4ed-ebdd-49ee-8a33-eabc3d1030e3/NDP481-x86-x64-AllOS-ENU.exe'.

Download of 'NDP481-x86-x64-AllOS-ENU.exe' (74.09 MB) completed.
Virus checking skipped/turned off. Not verifying 'NDP481-x86-x64-AllOS-ENU.exe'
Installing NDP481-x86-x64-AllOS-ENU.exe...
ERROR:
Running ['E:\apps\chocolatey\choco-cache\netfx-4.8.1\4.8.1.20250219\NDP481-x86-x64-AllOS-ENU.exe' /Quiet /NoRestart /Log "E:\apps\chocolatey\choco-cache\netfx-4.8.1_4.8.1_20250403212348.log"] was not successful.
Exit code was '5100' See log for possible error messages..
The install of netfx-4.8.1 was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\netfx-4.8.1\tools\ChocolateyInstall.ps1'.
See log for details.

Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
- netfx-4.8.1 (exited 5100) - Error while running 'C:\ProgramData\chocolatey\lib\netfx-4.8.1\tools\ChocolateyInstall.ps1'.
See log for details.
PS C:\Windows\system32> choco install netfx-4.8.1
Chocolatey v1.2.0 Business
Installing the following packages:
netfx-4.8.1
By installing, you accept licenses for the packages.

netfx-4.8.1 v4.8.1.20250219
netfx-4.8.1 package files install completed. Performing other installation steps.
Downloading netfx-4.8.1 64 bit
from 'https://download.microsoft.com/download/4/b/2/cd00d4ed-ebdd-49ee-8a33-eabc3d1030e3/NDP481-x86-x64-AllOS-ENU.exe'.

Download of 'NDP481-x86-x64-AllOS-ENU.exe' (74.09 MB) completed.
Virus checking skipped/turned off. Not verifying 'NDP481-x86-x64-AllOS-ENU.exe'
Installing NDP481-x86-x64-AllOS-ENU.exe...
ERROR:
Running ['E:\apps\chocolatey\choco-cache\netfx-4.8.1\4.8.1.20250219\NDP481-x86-x64-AllOS-ENU.exe' /Quiet /NoRestart /Log "E:\apps\chocolatey\choco-cache\netfx-4.8.1_4.8.1_20250403212348.log"] was not successful.
Exit code was '5100' See log for possible error messages..
The install of netfx-4.8.1 was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\netfx-4.8.1\tools\ChocolateyInstall.ps1'.
See log for details.

Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
- netfx-4.8.1 (exited 5100) - Error while running 'C:\ProgramData\chocolatey\lib\netfx-4.8.1\tools\ChocolateyInstall.ps1'.
See log for details.
14 Replies
Turn2Jesus2
Turn2Jesus2OP2w ago
E:\apps\chocolatey\choco-cache\netfx-4.8.1_4.8.1_20250403212348.log is empty Okay, so I did a web installer and it says that Windows Server 2019 is not supported for 4.8.1
Bobby Bob
Bobby Bob2w ago
Yeah that really sucks man I've searched it up as well, Windows Server isn't supported for 4.8.1 Are you sure you're using the latest 4.8.x version? I remembered the latest had like a number 6 on it or something @Turn2Jesus2
wasabi
wasabi2w ago
It isn't supported. Server 2019 tops out at 4.8
Bobby Bob
Bobby Bob2w ago
Ah I see So what are his available options?
wasabi
wasabi2w ago
Not to build a 4.8.1 project. Upgrade his OS.
Bobby Bob
Bobby Bob2w ago
He said he's upgrading from an already existing .NET Framework project
wasabi
wasabi2w ago
So either don't, or upgrade the OS as well.
Bobby Bob
Bobby Bob2w ago
How can you tell what OS he is running in?
wasabi
wasabi2w ago
The title bar of this thread.
Bobby Bob
Bobby Bob2w ago
I find it strange that he's installing his package in system32
Turn2Jesus2
Turn2Jesus2OP2w ago
Yeah, we're only using .NET 4.8.1 as a stepping stone to get to .NET 9. I downgraded to .NET 4.8 and checked it in. I think 4.8 is already installed on our servers. I know I have some .NET 9 apps running on these servers, but the ones that come to mind were built to not require the framework. I hope .NET 9 framework is supported as an installer because those apps are ridiculously bloated with all of those individual files that could be handled by a framework runtime. I raised the issue with my team. We're developers, not devops... let me correct myself. I think they expect us to be devops, too, and we've not gotten accustomed to that yet. Last year we had a dedicated team to handle all of that. Now, we have some of that (a lot of it, really), but the lines are a lot more blurred now that we're running on AWS. Last year we were on-prem I'm slightly annoyed that our instances are 6 months old, yet we were given AMIs for Windows Server 2019.
wasabi
wasabi2w ago
.NET 4.8.1 doesn't really count as a stepping stone to NET 9.
Turn2Jesus2
Turn2Jesus2OP2w ago
Some dotnet rockstart old me to upgrade to latest framework as a stepping stone to .NET Okay, so we have a weird case where we built against 4.8.1, but it's apparently running on .NET Framework Runtime 4.8. Does that sound right?
wasabi
wasabi2w ago
Yes. For the most part. There's like only 10 changes in 4.8.1 and they are all of pretty low significance, or bug fixes, or security fixes. And ARM64 support, which doesn't matter. If you try to use any of that it'd fail. But you're not so it probably won't.

Did you find this page helpful?