Skip to content

Installing .NET Framework 4.8.1 in Windows Server 2022 container image #592

@jagrut-patel

Description

@jagrut-patel

How can I install .NET Framework 4.8.1 runtime inside mcr.microsoft.com/windows/server:ltsc2022-KB5058385 base image?

##Details:

My Dockerfile

FROM mcr.microsoft.com/windows/server:ltsc2022-KB5058385

# Copy .NET Framework 4.8.1 installer to the container
COPY ["./windows/Prerequisites/NDP481-x86-x64-AllOS-ENU.exe", "C:/Install/Files/"]

# Set the working directory inside the container
WORKDIR C:/Install/Files

# Install .NET Framework 4.8.1
RUN powershell.exe -Command \
    $ErrorActionPreference = 'Stop'; \
    Start-Process NDP481-x86-x64-AllOS-ENU.exe -ArgumentList '/quiet /norestart' -Wait ;

# Other instructions removed for brevity

NDP481-x86-x64-AllOS-ENU.exe is the offline installer for .NET Framework 4.8.1

docker build completes without errors.

However, inside the resulting container, the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full keeps showing REG_DWORD 0x81041. (i.e. .NET Framework 4.0)

Please assist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions