The following steps describe how to make animation work on release mode for the SfChart control. Step 1: Add the Proguard.cfg file in your Xamarin.Forms Android project, and then add the following code. C# -keepclasseswithmembers class * { void setAnimationValue*(...); } Step 2: Set Build Action of the Proguard.cfg file to ProguardConfiguration. Refer to the following screenshot. ConclusionI hope you enjoyed learning about how to make animation work on Chart in release mode with Android Proguard.You can refer to our Xamarin.Forms Charts feature tour page to know about its other groundbreaking feature representations. You can also explore our Xamarin.Forms Charts documentation to understand how to create and manipulate data.For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!
In general, Syncfusion controls (third party components) cannot be viewed in UWP when the project is built-in release mode with .NET Native tool chain (Project > Build > Compile with Native Tool chain) is enabled. To view the control in release mode, we must pass the custom renderer assemblies to Init method in OnLaunched method of App.Xaml.cs file as shown below. Code Snippet protected override void OnLaunched(LaunchActivatedEventArgs e) { ... if (rootFrame == null) { List<Assembly> assembliesToInclude = new List<Assembly>(); assembliesToInclude.Add(typeof(Syncfusion.RangeNavigator.XForms.UWP. SfRangeNavigatorRenderer).GetTypeInfo().Assembly); Xamarin.Forms.Forms.Init(e, assembliesToInclude); } ... }
Xamarin does not load the renderer assemblies by default in Xamarin.Forms.UWP project in Release mode. So, In order to solve this, You have to manually load it by creating instance of Renderer class in App.cs file. Step 1: Create an instance of SfImageEditorRenderer in App.cs file. Use the below code snippet. protected override void OnLaunched(LaunchActivatedEventArgs e) { List<Assembly> assembliesToInclude = new List<Assembly>(); assembliesToInclude.Add(typeof(Syncfusion.SfImageEditor.XForms.UWP.SfImageEditorRenderer).GetTypeInfo().Assembly); Xamarin.Forms.Forms.Init(e, assembliesToInclude); } Step 2: To support displaying embedded images in release mode on forms Universal Windows Platform, it’s necessary to use the overload of ImageSource.FromResource that specifies the source assembly in which to search for the image. Code Snippet: public MainPage() { InitializeComponent(); imageeditor.Source = ImageSource.FromResource([Namespace.Imagename.Imagetype],typeof(App).GetTypeInfo().Assembly); } Example: imageeditor.Source = ImageSource.FromResource("Filename.png",typeof(MyClass).GetTypeInfo().Assembly);
In general, Syncfusion controls (third party components) cannot be viewed in UWP when the project is built in release mode when the .Net Native tool chain(project->Build ->Compile with Native Tool chain) is enabled. To view the control in release mode, we must pass the custom renderer assemblies to Init method in OnLaunchedmethod of App.Xaml.cs file as shown below,
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 UWP. 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://devblogs.microsoft.com/dotnet/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/t/cant-build-uwp-app-which-has-more-nuget-references/187413 Conclusion I hope you enjoyed learning about how to how to restrict system out of memory exception in UWP. You can refer to our UWP feature tour page to know about its other groundbreaking feature representations documentation and how to quickly get started for configuration specifications. You can also explore our UWP example to understand how to create and manipulate data.For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!
In general, Syncfusion controls (third party components) cannot be viewed in UWP when the project is built-in release mode with .NET Native tool chain (project > Build > Compile with Native Tool chain) is enabled. To view the control in release mode, we must pass the custom renderer assemblies to Init method inOnLaunchedmethod ofApp.Xaml.csfile as shown below. C#: