[Aot publish error]: dot net 9 WinUI 3 publish failed
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Operating system
Windows 11
### Windows SDK
Windows 11 SDK 10.0.26100
### Platform
WinUI 3 .net 9
### Visual Studio version
17.12.4
### Description
Trying to publish our WinUI 3 Application with native Aot fails with error:
C:\Users\User\\.nuget\packages\microsoft.dotnet.ilcompiler\9.0.1\build\Microsoft.NETCore.Native.targets(380,5): error MSB3073: The command ""link" @"obj\Release\net9.0-windows10.0.26100.0\win-x64\native\link.rsp"" exited with Code 9009.
Notice: I also include the C++ Desktopapplication tools with MSVC tools included on Visual Studio.
everything get build correctly in Release x64 mode and in our Pipeline build, when I try to use the command: dotnet publish -r win-x64 --self-contained or pulishing the Application in an folder, I get this error. How can I solve this? I also tried adding a new path to the environment variable Path(**C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\bin\Hostx64\x64**) and installed the latest Windows 11 SDK but still getting this error.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.