-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ILC doesn't return an error -- docker build keeps on running #89332
Comments
Tagging subscribers to this area: @dotnet/area-meta Issue DetailsI'm experimenting with native aot. I am doing that poorly such that my configuration is returning errors. However, root@869059bb2a82:/source# dotnet publish -a arm64 -o /app releasesapi.csproj -p:ObjCopyName=aarch64-linux-gnu-objcopy
MSBuild version 17.7.0+5785ed5c2 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
/usr/share/dotnet/sdk/8.0.100-preview.6.23330.14/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets(314,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [/source/releasesapi.csproj]
releasesapi -> /source/bin/Release/net8.0/linux-arm64/releasesapi.dll
Generating native code
ILC: Method '[releasesapi]Program.<Main>$(string[])' will always throw because: Failed to load assembly 'Microsoft.AspNetCore'
releasesapi -> /app/
root@869059bb2a82:/source# echo $?
0
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsI'm experimenting with native aot. I am doing that poorly such that my configuration is returning errors. However, root@869059bb2a82:/source# dotnet publish -a arm64 -o /app releasesapi.csproj -p:ObjCopyName=aarch64-linux-gnu-objcopy
MSBuild version 17.7.0+5785ed5c2 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
/usr/share/dotnet/sdk/8.0.100-preview.6.23330.14/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets(314,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [/source/releasesapi.csproj]
releasesapi -> /source/bin/Release/net8.0/linux-arm64/releasesapi.dll
Generating native code
ILC: Method '[releasesapi]Program.<Main>$(string[])' will always throw because: Failed to load assembly 'Microsoft.AspNetCore'
releasesapi -> /app/
root@869059bb2a82:/source# echo $?
0
|
Missing dependencies are only a warning, they are not a hard error. Assemblies with (intentionally) missing dependencies are very common in .NET ecosystem. We make best effort to treat missing dependencies as non-fatal errors and make the AOT binary throw the same exception as the JIT-based runtime would throws. The actual problem is that the ASP.NET framework is not getting referenced by the AOT compilation for some reason. |
I figured out what going wrong. It is due to this: dotnet/sdk#34026. OK. That's a design choice. This particular issue was fatal (the app crashes, obviously). I can see the category is more general, however. |
I'm experimenting with native aot. I am doing that poorly such that my configuration is returning errors. However,
docker build
is happy to keep on building since no error is presented. That seems wrong.The text was updated successfully, but these errors were encountered: