✅ "Platform linker not found." error with NativeAOT (Visual Studio Insiders)
I want to compile with NativeAOT:
* I added
<PublishAot>true</PublishAot> property to my .csproj file
* I am not using reflection or any other feature that would break my app
* I have the "Desktop development with C++" workload installed
* I open "x64 Native Tools Command Prompt for VS Insiders" and where link command does seem to print a correct path
I am using this command on my Windows machine:
However, I get this error in the end:
Why can't it find the linker? What am I missing?
It used to work back when I was using Visual Studio 2022, which might be a coincidence but I suspect it is to do with the IDE itself7 Replies
yes, it's a bug in the way Native AOT finds the tools unfortunately, it won't detect VS 2026
one way to fix is is to target .NET 10 instead
another way to fix it is to wait until next month when the fix will be made available for .NET 9
you can also fix it by going into your NuGet global pakcages cache, and editing this file to remove this line:
.
hey, I actually came across you while searching if this question had already been asked before in this server
https://discord.com/channels/143867839282020352/169726586931773440/1130516073989558352 (year 2023)
I was hoping so much you'd still be active and see my post 😄
reflectronic
you need the Windows SDK and the regular MSVC build tools
Quoted by
<@751125875164053586> from #help-0 (click here)
React with ❌ to remove this embed.
I see, so I wasn't going crazy LOL
I switched to dotnet 10 right now and it works!
guess I'll just upgrade the project and keep it
thank you very much
imma close the post once you're back online
glad it's working :)
$close
If you have no further questions, please use /close to mark the forum thread as answered