[.NET Tutorial]: dot net 8 web api aot compilation error #8649
Labels
area-runtime
Issue related to the .NET Core CLR.
area-tutorials
Issues related to getting started tutorials
Milestone
URL
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/aot/native-aot-tutorial?view=aspnetcore-8.0&tabs=netcore-cli
Operating system
windows 10
More information about your system
x64, visual studio 2022 preview with .net 8 preview 6 installed and .net 8 sdk latest preview. Visual Studio 2022 installed with asp.net and c++ options
Description
I am trying to just publish the base code when creating a project using
dotnet new api --aot -o MyFirstAotWebApi && cd MyFirstAotWebApi
the program runs fine in debug mode
then I just do a
dotnet publish
and get this error
MyFirstAotWebApi -> C:\Program Files\no\MyFirstAotWebApi\bin\Release\net8.0\win-x64\MyFirstAotWebApi.dll
Generating native code
C:\Users\M31926.nuget\packages\microsoft.dotnet.ilcompiler\8.0.0-preview.6.23329.7\build\Microsoft.NETCore.Native
.targets(290,5): error MSB3073: The command ""C:\Users\M31926.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\8.0.0-preview.6.23329.7\tools\ilc" @"obj\Release\net8.0\win-x64\native\MyFirstAotWebApi.ilc.rsp"" exited
with code -2147483645. [C:\Program Files\no\MyFirstAotWebApi\MyFirstAotWebApi.csproj]
dotnet --info
.NET SDK:
Version: 8.0.100-preview.6.23330.14
Commit: ba97796b8f
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.100-preview.6.23330.14\
.NET workloads installed:
There are no installed workloads to display.
Host:
Version: 8.0.0-preview.6.23329.7
Architecture: x64
Commit: 5340be2ccc
.NET SDKs installed:
7.0.306 [C:\Program Files\dotnet\sdk]
7.0.400-preview.23330.10 [C:\Program Files\dotnet\sdk]
8.0.100-preview.6.23330.14 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0-preview.6.23329.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0-preview.6.23329.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.0-preview.6.23329.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
The text was updated successfully, but these errors were encountered: