We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

To restrict System out of memory exception while compile the project in Release mode with enable .Net native chain tool

While running the application with .Net native chain tool in Release mode, it requires more memory space to build the application. Because .NET Native tools are compiled IL libraries with managed code in native libraries. And in our "Syncfusion Controls for UWP XAML" SDK contains more number of assemblies. We can resolve this SystemOutofMemory exception using either way listed below,

Way 1: Refer only needed assemblies of Syncfusion instead of referring Syncfusion UWP SDK.

Syncfusion UWP SDK has assemblies for all controls where you can refer assemblies needed only based on the control you are using.

Assembly Location:

$system drive:\ Files\Syncfusion\Essential Studio\$Version # \Assemblies for Universal Windows\[TargetFramework]

Ex: Program Files (x86)\Syncfusion\Essential Studio\15.2.0.40\Assemblies for Universal Windows\10.0

Also, you can find the list which contains assemblies and dependency assemblies of the control from below location.

https://help.syncfusion.com/uwp/control-dependencies

Way 2: Enable Use64BitCompiler in project

We already reported this issue in VisualStudio community forum and they have suggested to use Use64BitCompiler as work-around to solve the issue while compiling the project with Nuget which contains more number of Assemblies. Please find the work-around from below,

 

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">

 

<OutputPath>bin\x86\Release\</OutputPath>

 

<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>

 

<Optimize>true</Optimize>

 

<NoWarn>;2008</NoWarn>

 

<DebugType>pdbonly</DebugType>

 

<PlatformTarget>x86</PlatformTarget>

 

<UseVSHostingProcess>false</UseVSHostingProcess>

 

<ErrorReport>prompt</ErrorReport>

 

<Prefer32Bit>true</Prefer32Bit>

 

<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>

 

<Use64BitCompiler>true</Use64BitCompiler>

 

</PropertyGroup>

 

 

Note: System configuration or requirements for using 64 bit compiler:

64BitCompilation will trigger only if we use UWP tools 2.0 which will support in Visual Studio 2017 15.4 and Windows 10 Fall Creators Update.

https://blogs.msdn.microsoft.com/dotnet/2017/10/10/announcing-uwp-support-for-net-standard-2-0/

We can ensure whether the 64BitCompilation triggered or not by ensuring the reference path of nutc_driver.exe in compilation log file located in object folder.

For example, our UWP application has log file in below folder,

App1\obj\x86\Release\ilc\ilclog.csv

Open the log file and search for nutc_driver.exe, if the path of the nutc_driver.exe has same as the following command line (nutc_driver.exe should refer from the Tools64 folder instead of Tools) we can be sure that the 64BitCompilation is triggered in our project.

C:\Program Files (x86)\Microsoft SDKs\NuGetPackagesFallback\microsoft.net.native.compiler\2.0.2\tools\x86\ilc\Tools64\nutc_driver.exe

Link : https://developercommunity.visualstudio.com/content/problem/187413/cant-build-uwp-app-which-has-more-nuget-references.html

 

Article ID: Published Date: Last Revised Date: Platform: Control:
7665 04/13/2017 07/10/2018 UWP General
Did you find this information helpful?
Comments
sandeep Jul 14, 2018

lk

Reply
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.