1

My application uses Syncfusion UWP chart control and EF7 Core RC2, with VS2015 preview 2.

I can compile the application fine with just the EF7 Core, but as soon as I add a reference to Syncfusion, I end up with very long compile times that end with ".net native out of memory" exception.

Syncfusion reference does not cause this effect in a different, very simple app. Has anyone encountered this problem before and is it possible for this to be caused by my csProj settings?

Vladimir Akopyan
  • 644
  • 8
  • 16

3 Answers3

3

I work on the .NET Native runtime and compiler team. We've seen cases where combinations of libraries can cause the compiler to run away with memory usage. This typically happens because some set of types in those assemblies causes our analysis of generics usage to explode beyond reason.

One thing that can help is to remove the default runtime directive inside of the Properties\Default.rd.xml file:

    <Assembly Name="*Application*" Dynamic="Required All" /> // REMOVE THIS

This may help avoid the run away condition but also may have other side effects.

We'd be interested in investigating this issue more deeply with you. If you have some time to work with us, please send a mail to dotnetnative@microsoft.com. We'll probably ask for an ilcRepro file for your application so we can investigate more thoroughly.

MattWhilden
  • 1,686
  • 13
  • 18
  • I tried it, the app compiles but I get exception that I do not normally observe. However, I found a workaround: the SyncFusion library contains everything, including the kitchen sink. It is possible to include a reference just to the DLL for sfChart, and then the compiler behaves civil. See this Stackoverflow thread for details: http://stackoverflow.com/questions/37350144/cant-use-syncfusion-assembly-in-project – Vladimir Akopyan Jun 04 '16 at 05:03
  • 2
    That's another reasonable work around @VladimirAkopyan. Anything that can cut the full set of input to the compiler is likely to help things move along. We're tracking cases like this and are continuing to make improvements to be resilient in the face of arbitrary program inputs :-). – MattWhilden Jun 08 '16 at 00:57
1

While run the application with .Net native chain tool in Release mode, it will require more memory space to build the application. Because .NET Native tools are compiled your IL libraries with managed code in native libraries and also "Syncfusion Controls for UWP XAML" SDK contains more number of assemblies. So we suggest to use corresponding assemblies in your application instead of "Syncfusion Controls for UWP XAML" SDK to resolve this issue.

You can refer the individual assemblies from the below location.

Assembly location : C:\Program Files (x86)\Syncfusion\Essential Studio\15.1.0.33\Assemblies for Universal Windows\10.0

Regards, Marimuthu S.

0

Yup. It's Syncfusion or maybe Microsoft, but don't just drag and drop a control from the Syncfusion toolbox onto your UWP app and try to compile it as .NET Native code. It will add a reference to the entire SDK, which will never finish compiling before running out of memory.

You can test this by trying to compile their sample browser as .NET Native if the spirit moves you.

sonofsmog
  • 87
  • 1
  • 2