.net-native

Avoid .NET Native bugs

浪子不回头ぞ 提交于 2019-12-05 20:00:24
I spent the last year (part time) to migrate my existing (and successful) Windows 8.1 app to Windows 10 UWP. Now, just before releasing it to the store, I tested the app in the "Release" build mode (which triggers .NET Native). Everything seemed to work until I - by chance - noted a subtle but serious (because data-compromising) bug. It took me two days to reduce it to these three lines of code: var array1 = new int[1, 1]; var array2 = (int[,])array1.Clone(); array2[0, 0] = 666; if (array1[0, 0] != array2[0, 0]) { ApplicationView.GetForCurrentView().Title = "OK."; } else { ApplicationView

Steps to diagnose translated UWP stack trace

社会主义新天地 提交于 2019-12-04 23:52:02
问题 So I have received a stack trace from my UWP windows application in release mode. I've now translated all the addresses to their method names using windbg. I now have this output: System.InvalidOperationException: InvalidOperation_EnumFailedVersion. For more information, visit http://go.microsoft.com/fwlink/?LinkId=623485 at MyApp!<BaseAddress>+0x7710b7 - MyApp!System::Func$4<System::__Canon,System::__Canon,System::__Canon,System::__Canon>.BeginInvoke+0x27 | (00b710c0) MyApp!System::Func$4

Steps to diagnose translated UWP stack trace

半世苍凉 提交于 2019-12-03 15:51:52
So I have received a stack trace from my UWP windows application in release mode. I've now translated all the addresses to their method names using windbg. I now have this output: System.InvalidOperationException: InvalidOperation_EnumFailedVersion. For more information, visit http://go.microsoft.com/fwlink/?LinkId=623485 at MyApp!<BaseAddress>+0x7710b7 - MyApp!System::Func$4<System::__Canon,System::__Canon,System::__Canon,System::__Canon>.BeginInvoke+0x27 | (00b710c0) MyApp!System::Func$4<System::__Canon,System::__Canon,System::__Canon,System::__Canon>.Invoke at MyApp!<BaseAddress>+0x771125 -

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

旧街凉风 提交于 2019-12-03 05:33:44
问题 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. 回答1: As far as I know Ngen still depends on the framework, which .NET Native don't when it hit production according to the faq. Is this just about performance, or does this also allow for building C# code (say) that is natively compiled to Win32/64 and doesn’t require an install of the .NET Framework on the target machine? That is correct: .NET

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

喜夏-厌秋 提交于 2019-12-03 04:52:46
问题 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 with anything useful. Here are a few examples: 1) MyProject.ViewModels.SomeViewModel.<OnLogin>d__69.MoveNext() OnLogin is the name of a method in SomeViewModel , so why is it inside angular brackets? Is the "ClassName".<"MethodName>..." the usual way

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

拥有回忆 提交于 2019-12-02 18:08:40
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 with anything useful. Here are a few examples: 1) MyProject.ViewModels.SomeViewModel.<OnLogin>d__69.MoveNext() OnLogin is the name of a method in SomeViewModel , so why is it inside angular brackets? Is the "ClassName".<"MethodName>..." the usual way to indicate an instance method? I understand that the C# compiler turns every chunk of code between

UWP App Package created with Visual Studio 2015 Update 3 won't install on phone

烂漫一生 提交于 2019-12-02 05:57:59
Release mode appxbundle file created with Visual Studio 2015 Update 3 won't install on windows phone. This was working in Update 2. Installed field medic on phone and eventually found the error: Windows cannot install package 5207311c-9598-4622-9d3d-ff43d5fceb38 because this package depends on another package that could not be found. This package requires minimum version 1.4.24201.0 of framework Microsoft.NET.Native.Runtime.1.4 published by CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US to install. Provide the framework along with this package. How do I get

Dependency on .Net Native

纵然是瞬间 提交于 2019-12-02 00:55:14
问题 I got the following certification error when submitting to the app store. [My App Name] takes a dependency on Microsoft .Net Native Runtime Package 1.x framework but is missing the framework dependency declaration in the manifest. [My App Name] takes a dependency on Microsoft .Net Native Framework Package 1.x framework but is missing the framework dependency declaration in the manifest. How does one provide this dependency in the appxmanifest? What's the syntax? I have this currently:

Dependency on .Net Native

大城市里の小女人 提交于 2019-12-01 21:33:37
I got the following certification error when submitting to the app store. [My App Name] takes a dependency on Microsoft .Net Native Runtime Package 1.x framework but is missing the framework dependency declaration in the manifest. [My App Name] takes a dependency on Microsoft .Net Native Framework Package 1.x framework but is missing the framework dependency declaration in the manifest. How does one provide this dependency in the appxmanifest? What's the syntax? I have this currently: <Dependencies> <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0"

Out of memory error when compiling UWP app in release mode with .Net native

风流意气都作罢 提交于 2019-11-30 19:10:18
问题 I have a solution where my main project is a uwp app, and two other projects referenced by the app : UWP App ---> references 2. Universal Class library ----> references 3. PCL Library 2 --> uses EF7 and SQLight. 3 --> uses PCLCrypto Now, everything works just fine and excellent when I'm on Debug mode x86 targeting local machine. I want to compile the solution in release mode using .Net native tool chain , here's my config : When I launch the compilation, it takes a remarkably long time, and