Attached is an example project showing the problem. It uses your GoldDemand example from your sfChart documentation.
The code that seems to result in a conflict, is LINQ based and I've copy/pasted it below. Ignore the rationale behind doing this, in my app I have a string that I need to parse into 3 different fields for loading into a database. That code isn't even attached to a list that the chart uses. In fact, I can delete all the charts and just have the code adding to the list, with your sfChart.dll in the references and it crashes. Take out the sfChart.dll reference and it runs fine. Add the Syncfusion Controls for UWP XAML full reference to your toolset, and it runs fine. Use sfChart.dll instead, again crashes.
Dim x = "Test1998.02361.2"
Demands.Add(New GoldDemand() With {.Demand = getDemand(x), .Year2010 = getValue1(x), .Year2011 = getValue2(x)})
There must be something in your specific dll's that conflicts with System.LinQ or something when 'optimize' & 'Native Toolchain' on compile is selected... both required for store apps.
So here are the troubleshooting procedures to replicate the problem. Keep in mind, Test Case 1 is the GOAL of this test project. This whole thread is focused on using just the sfChart.dll in a Release, to reduce size of store apps by not including your entire library.
Test Case 1 Release, Optimize compile, Native Tool Chain compile, sfChart.dll
Result - crashes
Test Case 2 Release, Optimize compile, Native Tool Chain compile, Syncfusion Controls for UWP XAML reference
Result - runs fine
Test Case 3 Debug, uncheck Optimize compile, uncheck Native Tool Chain compile, sfChart.dll
Result - runs fine
Test Case 4 Debug, Optimize compile, Native Tool Chain compile, Syncfusion Controls for UWP XAML reference
Result - runs fine
Test Case 5 Release, Optimize compile, Native Tool Chain compile,
Delete the charts, delete all chart code, delete reference to any Syncfusion products. In other words, not using Syncfusion at all.
Results - runs fine.
Test Case 6 Same as Test Case 5 but add a reference to sfChart.dll even though we aren't using it at this point.
Result - crash
Test Case 7 Same as Test Case 5 but use reference to your full library instead of sfChart.dll. Again, we aren't using it but this shows there is some conflict that arises when using the dll vs the full library.
Result - Runs fine.
Hope you can help!
Attachment:
sfChartVBCodeBehind_c6de7986.zip