Questions tagged [native-aot]

Native Ahead of Time compilation is a feature introduced in .NET 7. It currently only targets .NET 7 apps, and within .NET 7, really only console apps - it is not supported for ASP.NET Core. Native AOT apps don't use a Just-In-Time (JIT) compiler when the application runs. Native AOT apps can run in restricted environments where a JIT is not allowed. It's benefit is most significant for workloads with a high number of deployed instances, such as cloud infrastructure and hyper-scale services.

16 questions
3
votes
3 answers

Is .NET 7 native AOT supported macOS?

There is no information about the macOS platform. Has AOT supported it, or is there any plan?
Echo
  • 183
  • 2
  • 11
3
votes
0 answers

Difference between Native AOT and AOT in .NET Mobile Android/iOS

.NET 7 brings Native AOT. How's it different than the AOT already available in .NET 6 Android app? 2nd question: Is the Xamarin Android/iOS .NET runtimes replaced by the .NET 6 Android/iOS runtimes?
JamesL
  • 351
  • 2
  • 10
2
votes
1 answer

How to use a dll generated in c# and compiled using Native AOT in other .NET Projects?

Since I first heard about the introduction of Native AOT feature in .NET 7 and that it was usable on console executables and class libraries, I wanted to try out on some library projects I already had. Then, rised a problem I can't seem to…
LRetro
  • 29
  • 2
1
vote
0 answers

Can't compile with Native AOT about JsonSerializer.Deserialize

The framework I am using is .Net7. Here is my code: var Options=new JsonSerializerOptions() { Encoder = System.Text.Encodings.Web.JavaScriptEncoder.Create(UnicodeRanges.All) }; List ThemeList =…
Melon NG
  • 2,568
  • 6
  • 27
  • 52
1
vote
1 answer

Native AOT - possible to generate Map file for use with VMprotect or other tools?

Using Native AOT for some mostly console + MessageBox applications, working well (using suppression option to allow Windows Forms) https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/ However, I need to generate MAP files to use…
JOULTICOA
  • 21
  • 6
0
votes
0 answers

C# Native AOT DLL separated

I have a little question because I'm publishing my app with NativeAOT. My app is using ClearScriptV8 but the final exe doesn't include or compress automatically the ClearScriptV8.win-x64.dll rather it's just separated. How do I add it to single file…
mark12345
  • 233
  • 1
  • 4
  • 10
0
votes
0 answers

Exporting and Importing methods of the same name in C#

I ran into some unexpected behavior when playing around with native AOT in .NET 7 on Windows. It appears that if I export a method using the same name as a method I import from another native library, then trying to call the latter results in…
Kirie
  • 93
  • 6
0
votes
0 answers

How can i load native dll in c# webassembly

When i try use [DLLImport(nativeLib)] in c# WebAssembly and call that extern function i imported from native dll it gives me error in runtime Here is the code and error using System; using System.Runtime.InteropServices.JavaScript; using…
0
votes
1 answer

C# .net core native AOT with reflection Activator.CreateInstance

I am trying to use reflection's Activator.CreateInstance method to generate the required module with parameters like below. public TModule CreateModule(params object[]? parameters) where TModule : ApplicationModule { /* …
Roveldo
  • 47
  • 4
0
votes
0 answers

Rust FFI cross crate linker behavior

I am new to StackOverflow, but i've asked on countless programming discords and filed dozens of Github issues and am still totally lost as to what the problem is. https://github.com/DrewRidley/bepuvy-sys I am compiling this repository with the C#…
Drew
  • 1
  • 1
0
votes
1 answer

Windows application packaging project for native AOT

I have written a small console application in C# which uses native AOT from .NET 7.0. Native AOT works perfectly for .exe deployments and drastically reduces startup times. My project file:
Danitechnik
  • 398
  • 1
  • 3
  • 10
0
votes
1 answer

KiUserExceptionDispatch calls into handler in unloaded NativeAot dll

I have a program that loads a NativeAot compiled dll into a process, I was able to unload the module with some hacky approach. However, I recently discovered a problem, that is, the Window exception dispatcher calls into the handler in the NativeAot…
Sardelka
  • 354
  • 3
  • 9
0
votes
0 answers

Conpiler().compile from the "dart_eval" library failed with the error "Null check operator used on a null value"

I need to write a program that will measure the execution time of various functions. Functions must be entered by the user. I looked at existing libraries for parsing mathematical formulas (expressions, function_tree, math_expressions), but they are…
0
votes
1 answer

Debug C# NativeAOT Lambda Function

I created a .NET 7.0 NativeAOT Lambda function from the AWS Templates. I haven't changed it. I installed the Mock Lambda Test Tool. I believe I have to use the Executable Assembly page to test my function? I can't figure out how to test it though.…
TrinaE
  • 33
  • 6
-1
votes
1 answer

Load Native AOT C# dll with extern

I have a C# DLL that I am compiling to Native AOT. The content of the DLL is as follows: namespace teste { public class Principal { public Principal() { } public void WriteTest() { …
Maicon
  • 51
  • 10
1
2