I have copied .NET framework from my local directory and build an image by using the below Dockerfile
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
ADD setup C:setup
RUN cmd.exe /c start /wait C:setupNDP471DevPack.exe /q
RUN powershell -Command rm C:setup -r -Force
WORKDIR C:\Project
ENTRYPOINT ["C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe"]
Now I want verify that the .NET framework is whether installed or not in the image that was build?
2
Answers
You can run
dotnet --version
to see if there’s a .NET runtime installed and which version it is. Something like thisYou should be able to use:
In Visual Studio I can select my container and click "Open Terminal Window" and paste the above command.