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
[NativeAOT] EXEC : error : Arithmetic operation resulted in an overflow. "...fsbackup2.msbuildproj" System.OverflowException: Arithmetic operation resulted in an overflow
#66787
Closed
insinfo opened this issue
Mar 17, 2022
· 3 comments
· Fixed by #66972
This failure mode typically means that the project libraries contain exponential generic explosion or infinite generic cycle. Having more than 2GB array elements won't solve that problem.
Retarget the generated project to .NET 6.0 by editing the *.msbuildproj and replacing net5.0 with net6.0.
.NET 5.0 is not supported with NativeAOT. Apparently targeting it leads to disabling trimming on everything, including the entire framework. It's a lot of things to compile. I'll be putting a hard block on this to prevent this.
Description
Error compiling a hello world with Peachpie and NativeAOT
Reproduction Steps
dotnet new -i Peachpie.Templates::*
dotnet new console -lang PHP
dotnet add package Microsoft.DotNet.ILCompiler -v 7.0.0-*
dotnet publish -r win-x64 -c Release
Expected behavior
print "Hello World!" on console
Actual behavior
Regression?
No response
Known Workarounds
No response
Configuration
.NET 7.0
Windows 11 x64
Other information
No response
The text was updated successfully, but these errors were encountered: