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
{{ message }}
Repository navigation
windows image (nanoserver, windowsservercore) with Native AOT support #6874
I am trying to publish a console application for windows using native AOT. However when using the nanoserver image it fails with the following:
C:\Users\ContainerUser\.nuget\packages\microsoft.dotnet.ilcompiler\10.0.1\build\Microsoft.NETCore.Native.Windows.targets(142,5): error : Platform linker not found. Ensure you have all the required prerequisites documented at https://aka.ms/nativeaot-prerequisites, in particular the Desktop Development for C++ workload in Visual Studio. For ARM64 development also install C++ ARM64 build tools. [C:\builds\launcher\Launcher.csproj]
Describe the Solution
I think it would be good to have nanoserver image, with native AOT support, like the new linux-aot images.
Im personally not sure how doable this is, since the documentation only states "Visual Studio 2022 or later, including the Desktop development with C++ workload with all default components.". I could not find a workload via the dotnet workload command that would be fitting.
EDIT:
servercore image also fails with the same reason, I previously assumed it would work due to the documentation stating that only the nano image isnt preconfigured for it.
Workaround, use the servercore image and install the build tools manually.
Do note that this uses a lot of disk, I assumed thats why its not included in any of the normal images...
changed the title [-]nanoserver image with Native AOT support[/-][+]windows image (nanoserver, windowsservercore) with Native AOT support[/+]on Dec 11, 2025
Thanks for the feature request. This is probably something we'd like to support.
As far as I know installing VS buildtools on Nano Server isn't supported (it definitely doesn't work - I just tried it).
We'll need to create a proof of concept for including VS Buildtools + those MSVC workloads on the Server Core image. The size increase will inform whether we should offer a windowsservercore-aot image or just bundle them into the existing SDK image.
According to dotnet/versions the 10.0 SDK servercore 2025 image size is ~3.64 GB. From my initial test, the MSVC tools were ~1.5GB (need to confirm though).
Activity
[-]nanoserver image with Native AOT support[/-][+]windows image (nanoserver, windowsservercore) with Native AOT support[/+]lbussell commentedon Dec 17, 2025
Thanks for the feature request. This is probably something we'd like to support.
As far as I know installing VS buildtools on Nano Server isn't supported (it definitely doesn't work - I just tried it).
We'll need to create a proof of concept for including VS Buildtools + those MSVC workloads on the Server Core image. The size increase will inform whether we should offer a
windowsservercore-aotimage or just bundle them into the existing SDK image.According to dotnet/versions the 10.0 SDK servercore 2025 image size is ~3.64 GB. From my initial test, the MSVC tools were ~1.5GB (need to confirm though).
/cc @richlander @baronfel