Release Build Fails

Repro steps before installing Syncfusion
Create new blank app targeting 16299 release build succeeds
Install Syncfusion
Create new blank app release build fails with error:
microsoft.net.native.compiler\2.0.3\tools\x64\ilc\Tools\nutc_driver.exe ... Release\ilc\intermediate\MDIL\MyApp.rsp returned exit code 1
Create new Syncfusion Univeral Windows App release build succeeds

We have a very large UWP app. Since adding Syncfusion we can no longer build in release mode. Build in debug mode succeeds.

We do not wish to restart from a new Syncfusion Universal Windows app.

How do we include Syncfusion in an existing app without breaking build in release mode?

11 Replies

SR Sivakumar R Syncfusion Team March 12, 2018 09:30 AM UTC

Hi Mark, 
  
Are you referring Syncfusion UWP SDK in the blank project which causing failure in release mode. If so, please follow below ways to resolve the issues, 
  
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.   
  
  
Way 2: Enable Use64BitCompiler in project 
  
We already reported this issue in visualstudio community and suggestion to use Use64BitCompiler will resolve the issue.  
  
<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> 
  
Please let us know if you are facing issue in some other scenario that will helps to provide better solution.   
  
Thanks, 
Sivakumar 
 



MW Mark Wilson March 13, 2018 12:43 AM UTC

This is a 64bit build.

A new Syncfusion Univeral Windows App has a single reference to Syncfusion Controls for UWP XAML and it builds just fine. Clearly the machine has sufficient resources (i7 8GB RAM SSD with 300GB free).

Why is it that it won't build when we add Synchfusion to an existing project?

EDIT: In case anyone else finds themselves here, don't download syncfusionessentialuniversalwindows.exe. Installing using that exe will give you a configuration that will not build in release mode and therefore you cannot submit to the store.

Install Syncfusion using the Nuget packages for the controls you require eg Syncfusion.SfGrid.UWP.

It appears Syncfusion are aware of this issue; why they make the installer available knowing it will break your solution only they can explain.


DY Deivaselvan Y Syncfusion Team March 14, 2018 05:12 PM UTC

 Hi Mark,

Please follow the link which we shared in our previous update for deploying your application in release mode using latest Syncfusion assemblies in Windows Fall Creators Update. You can get the Syncfusion Universal Windows App assemblies from below mentioned path location.

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

Please let us know if you have any other questions.

Regards,
Deivaselvan 



MA Mahmoud May 24, 2018 06:27 PM UTC

I have the same problem; once I added the SFChart, I can not release my software. It gets compiled in Debug only. I tried all the suggested solution and I am still stuck.


AK Abbas K Syncfusion Team May 27, 2018 07:54 AM UTC

Hi Mahmoud, 
 
We have checked your reported issue for adding the SfChart assembly but we are unable to reproduce the issue. Could you please share the below details, so that we can proceed further on this issue? 
 
  1. Please share which SDK version you have used in your application?
  2. Please share the details of the list of assemblies you have used in your application?
  3. Could you please confirm whether you have tried to use  Use64BitCompiler to resolve this issue as we already said in our previous updates?
 
Regards, 
Abbas K 



MA Mark July 3, 2018 08:32 PM UTC

So, just FYI, I had a similar issue, but it turned out that it was related to a compatability issue between Syncfusion and UWPCommunityToolkit. Adding a reference to the Default.rd.xml file worked for me: <Assembly Name="UWPCommunityToolkit" Dynamic="All" />


SJ Sathiyathanam Jeyakumar Syncfusion Team July 5, 2018 12:48 PM UTC

Hi Mark, 
 
We do not have any compatibility issue between Syncfusion libraries and UWPCommunityToolKit. Could you please try the previous update information’s in your application if you are running the application in release mode with latest UWP SDK. If the issue is still persisting ,kindly share the below details to us it will help us to provide the better solution to you.? 
 
  1. Provide more details about your issue with the replication procedure or provide screenshot/video illustration of the issue
  2. Provide your UWP SDK and Visual Studio Version details.
  3. Please share the details of the list of assemblies you have used in your application?

Regards, 
Sathiyathanam


AP Alexandru Pastor Opris July 18, 2018 12:26 PM UTC

Hello,

We're also having the exact same issue. And we only use the following specified nugets, not the whole package:
  • XlsIO
  • Data
  • SfGrid
  • SfInput
  • SfShared
  • SfChart
  • As a special note, we also use Microsoft.Toolkit.UWP 
We tried the following solutions:
  • Adding <Assembly Name="UWPCommunityToolkit" Dynamic="All" /> to the Default.rd.xml file.
  • Adding <Use64BitCompiler>true</Use64BitCompiler> to the csproj file.
None of them work. The only solution which I found is:
  • Comment out the <Assembly Name="*Application*" Dynamic="Required All" /> in the Default.rd.xml file.
But this solution breaks the complex DataGrids only on Relase mode, so once we open the release installed application from the Store. The data for some reason is not showing up when the Binding is reading from an array, example:
  • {Binding Object[0].Quantity}
  • {Binding Object[1].Quantity}
  • {Binding Object[2].Quantity}
As said before, the issue is only on Relase mode when building with the "Compile with .NET Native tool chain" which is needed for the Store installer. Without the .NET tool chain it works perfectly fine on Debug.

We're using the new version of Syncfusion, 16.2.0.41 and almost all of our machines have an i7 6700HQ, 16Gb of RAM and 512Gb of SSD. Also another interesting thins is that once the Nuget of Syncfusion.Shared is added to the project, the CPU usage while creating the installer goes to ~90%, without the SF Nuget it's sitting at 20-30% only.


SJ Sathiyathanam Jeyakumar Syncfusion Team July 19, 2018 06:21 PM UTC

Hi Alexandru, 
 
Thank you for contacting syncfusion support. 
 
Refer the below KB link to avoid the System out of memory exception while compile the project in release mode. Please ensure the note section from the below article to get the solution of <Use64bitCompiler> is worked as expected. 
 
 
 
 
Regards, 
Sathiaythanam 



AP Alexandru Pastor Opris July 20, 2018 11:28 AM UTC

EDIT: Ok, got it working finally, had to add  to all the groups in the csproj file. As it was failing then in the x86 build and ARM.

Hello Sathiyathanam,

As stated in my reply, none of those two ways work properly, I checked the ilclog and seems to be using the correct compiler, which is the version 64. 

I also tried the first solution of adding only the needed references (Well, I didn't quite try it, as we always use only the needed ones and not the whole SDK):


With Use64BitCompiler
The RAM usage of Visual Studio while creating an installer goes up to ~7Gb (that's the max which I've seen) only with all the other things we have running in the machines our memory usage is about ~12Gb, so there is still plenty of RAM left, we also tried closing all of our applications while creating the installer, that way the system has more available for it, but the max usage is the same and the average used by the system in total is about 9Gb.

Without Use64BitCompiler
Without the 64bit Compiler, we get to a max of ~4Gb which is normal and then it throws the nutc_driver.exe error, which is expected as that's the max.

Let me know if there is any other solution, those two don't work. Also all of our PCs got enough ram (16Gb DDR4), or at least it should be enough.


SJ Sathiyathanam Jeyakumar Syncfusion Team July 23, 2018 06:36 AM UTC

Hi Alexandru, 
 
Query 1: x86, ARM release build fails. 
 
Refer the below links to get the build failures resolved in the X86 configuration. 
Query 2: More Memory consuming problem. 
 
Refer the below link to avoid the more memory consuming problem in your application. 
 
 
 
Regards, 
Sathiyathanam

Loader.
Up arrow icon