Questions tagged [.net-native]

Use this tag for questions about .NET Native, a set of tools that enable applications targetting the .NET Framework to be compiled to native machine code. Depending on the specifics of your question it may also be appropriate to tag it [.net] and/or with a programming-language tag.

.NET Native is a set of tools that enable .NET applications to be compiled to native machine code.

149 questions
36
votes
1 answer

How to read/interpret a raw C# stack trace correctly?

I'm reading some crash reports from a UWP application (C#, compiled with .NET Native) and I'm having a hard time understanding the exact syntax/format used in the stack traces. I tried looking for some guides on the internet but I didn't come up…
Sergio0694
  • 4,447
  • 3
  • 31
  • 58
31
votes
2 answers

What is the difference between .NET Native and Ngen.exe?

The title says it all. I was hoping somebody could explain to me what .NET Native brings to the table that we didn't already have with Ngen.exe.
Levi Botelho
  • 24,626
  • 5
  • 61
  • 96
21
votes
1 answer

Very poor performance of async task run on threadpool in .Net native

I've observed a strange difference in managed vs .Net native code. I've a heavy job redirected to threadpool. When running the app in managed code, everything works smooth but as soon as I switch on native compilation - the task run few times slower…
Romasz
  • 29,662
  • 13
  • 79
  • 154
14
votes
2 answers

Compiling .net core app with CoreRT / another AOT

I'm building an REST API on ASP.NET CORE 1.0. In production it'd be IMHO very useful NOT to use JIT because the docker containers with the app are scaling up and down, redeploying during CI over and over, so the just-in-time compilation for every…
rudolfdobias
  • 1,778
  • 3
  • 17
  • 40
14
votes
1 answer

Is this a possible bug in .Net Native compilation and optimization?

I discovered an issue with (what might be) over-optimization in .Net Native and structs. I'm not sure if the compiler is too aggressive, or I'm too blind to see what I've done wrong. To reproduce this, follow these steps: Step 1: Create a new Blank…
Laith
  • 6,071
  • 1
  • 33
  • 60
10
votes
2 answers

Code in filtered exception handler throws NullReferenceException when accessing exception

When I compile a UWP app with the .NET Native compiler and turn on code optimizations (essentially release mode), then I get a NullReferenceException when I try to access the actual exception in the catch block. Code Sample: try { throw new…
FUR10N
  • 750
  • 6
  • 18
10
votes
1 answer

How do I follow .Net Native cryptic stack-trace?

Since UWP requires .Net Native (which is very welcome), I'm getting cryptic stack-traces now. This is the exception reported by people using my app: System.InvalidCastException: InvalidCast_Com at SharedLibrary!+0x429e9d at…
Laith
  • 6,071
  • 1
  • 33
  • 60
10
votes
2 answers

.net-native enum.GetValues trouble

I'm trying to make my app (for Windows 10) working under .NET native. I got stuck with the following issue: Enum.GetValues fails at runtime with metadata is missing. I managed to simplify test case for this problem (in real life my code looks…
Access Denied
  • 8,723
  • 4
  • 42
  • 72
10
votes
2 answers

Where's the .NET native?

I was excited about the idea to compile C# code to native machine code downloaded the .NET native and intalled it. But I can't configure my build to compile to neither x86 nor x64. In fact, no other than "any CPU" arch is available: Here's the VS…
Jack
  • 16,276
  • 55
  • 159
  • 284
9
votes
1 answer

Using Vector for SIMD in Universal Windows Platform

I'm trying to use System.Numerics.Vector(T) to vectorize an algorithm and take advantage of SIMD operations of the CPU. However, my vector implementation was substantially slower than my original implementation. Is there any trick to using Vectors…
Nick Bauer
  • 1,027
  • 8
  • 13
8
votes
2 answers

Can .NET Core be used to build native Linux binaries?

Apologies if the question seems basic, but I did some Googling and couldn't find a clear answer (Perhaps I don't know the right keywords). Can .NET Core be used to build native command-line Linux binaries from C# / F# sources? (I'm aware of Mono)
MWB
  • 11,740
  • 6
  • 46
  • 91
8
votes
1 answer

Protobuf-net on UWP/.NET Native and iOS

I have a Xamarin.Forms App based on .NET Standard 1.4 that uses protobuf-net to store objects in the database that will be sent to a WCF service at a later time. On Android and UWP "managed" everything works fine but - after searching through…
EaranMaleasi
  • 895
  • 1
  • 13
  • 32
8
votes
0 answers

UWP App Crashes instantly when compiled with .net native

I have a UWP App who targets the FCU both as minimal and target version. When I debug everything is fine. Also when I compile in release mode. But when I activate .net native compiling the app crashes on startup with this message in the log: The…
NPadrutt
  • 3,619
  • 5
  • 24
  • 60
8
votes
5 answers

Why do we need/use managed code (over native)?

I'm missing something basic here. What's the use of compiling from a source language into bytecode (java) or intermediate language (.NET) and then running them from inside the JVM or CLR ? There's the decrease in performance (however slight or…
Arctic Vowel
  • 1,492
  • 1
  • 22
  • 34
7
votes
0 answers

How to debug a nutc_driver.exe Error : ILT0005 when building a UWP app in Release Mode with Net Native tool chain

When building my UWP in Release mode with .Net Native tool chain I have the Following error: Error : ILT0005: nutc_driver.exe […] returned exit code -1073741819 There is no other error message whatsoever so I feel clueless to try and solve that…
François
  • 3,164
  • 25
  • 58
1
2 3
9 10