Controls not rendering in UWP Release Mode

Hi, 

I'm using MVVMCross in my Xamarin Forms UWP project and everything works in Debug mode, but when set to Release mode, syncfusion controls are not rendered.

I already included the assemblies like this:

protected override void OnLaunched(LaunchActivatedEventArgs activationArgs)
        {
            base.OnLaunched(activationArgs);

            List<Assembly> assembliesToInclude = new List<Assembly>();

            assembliesToInclude.Add(typeof(Syncfusion.SfDataGrid.XForms.UWP.SfDataGridRenderer).GetTypeInfo().Assembly);
            assembliesToInclude.Add(typeof(Syncfusion.SfChart.XForms.UWP.SfChartRenderer).GetTypeInfo().Assembly);
            assembliesToInclude.Add(typeof(Syncfusion.XForms.UWP.ProgressBar.SfLinearProgressRenderer).GetTypeInfo().Assembly);
            assembliesToInclude.Add(typeof(Syncfusion.XForms.UWP.ProgressBar.SfCircularProgressBarRenderer).GetTypeInfo().Assembly);

            Xamarin.Forms.Forms.Init(activationArgs, assembliesToInclude);

        }

Am i missing something?

I have a similar project that uses Prism and that one works fine, but i can't figure out why it's not working with MVVM Cross.

Thanks in advance for your help.

Best regards,
Diego Roses.

19 Replies 1 reply marked as answer

DD Devakumar Dhanapoosanam Syncfusion Team June 8, 2020 10:45 AM UTC

Hi Diego Roses, 
 
Greetings from Syncfusion. 
 
We have analyzed your query, and can you please ensure us once whether you have used the same code for including the assemblies, as in below link, 
 
Please refer the below link for running app in release mode for more details, 
 
 
If the above does not resolve the reported issue, can you please provide us the following details which will be helpful for us to analyze and to provide the better solution at earlier? 
·       Please ensure us whether the Compile with Native Tool chain is enabled or not when build application in release mode. 
·       Can you please share the Xamarin.Forms version and SfChart version details? 
·       Can you please ensure whether the other Syncfusion control like DataGrid, ProgressBar were too not rendered other than the Chart in release mode? 
·       Please let us know whether you are facing any crash while run in release mode using MVVMCross. 
 
Regards, 
Devakumar D 



DR Diego Roses June 8, 2020 11:30 AM UTC

Hi, 

As you can see in the code I posted in the first message, I use the same code to include the assemblies, except  if (rootFrame == null) as it looks like is not needed in MVVMCross. Anyway, i tried adding the rootFrame stuff with the same result.

Regarding Native Tool chain, it is enabled:

<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>
  </PropertyGroup>

Xamarin Forms version: 4.5.0.657
SfChart version: 18.1.0.45 (also for SfDataGrid and SfProgressBar)

None of the Syncfusion controls are rendering in release mode. All of them shows a blank space instead.

I have all exceptions turned on and everything seems to be running smooth with MVVMCross.

Thank you for your support!

Best regards,
Diego





  


DD Devakumar Dhanapoosanam Syncfusion Team June 9, 2020 02:33 PM UTC

Hi Diego Roses, 
 
Thanks for sharing the required details.   
 
With the provided details, we would like to let you know that we have already updated the same in Xamarin support for custom controls rendering issue with release mode as mentioned in UWP. 
 
 
We have shared the provided solution to resolve it but still you are facing the issue then please ensure it once and please follow-up this for further updates.  
 
Also please ensure us by rebuilding application and share the used VS version and entire UWP project cs file and UWP project properties details to check it further at our end. 
 
Regards, 
Devakumar D 



DR Diego Roses June 9, 2020 03:03 PM UTC

Hi,

I rebuilt App also in x64 with the same results.

The VS version is: 4.8.03752

Attached you can find the UWP project cs file.

Thanks for the support.

Regards,
Diego.






Attachment: Saru.UWP.csproj_77bfbb62.7z


DD Devakumar Dhanapoosanam Syncfusion Team June 11, 2020 02:16 AM UTC

Hi Diego Roses, 
 
Thanks for your update. 
 
Currently we are anlazying the reported issue at our end and we will update you the details on or before June 12, 2020.  
 
Regards, 
Devakumar D 



DD Devakumar Dhanapoosanam Syncfusion Team June 15, 2020 02:48 PM UTC

Hi Diego Roses, 
 
Sorry for the delay. 
 
The provided solution file is not leading us to validate this issue and make it our end to replicate. 
 
So, if possible, could you please share the issue reproducing sample to check it our end or else better to discuss this in web meeting. For further follow-up, we will validate your forum to create an incident for requesting you in web meeting. 
 
The incident information will be provided on tomorrow, meanwhile could you please consider our request to share the sample. 
 
Regards,  
Devakumar D 



DR Diego Roses June 15, 2020 07:36 PM UTC

Hi,

I've prepared a sample project using MVVMCross, where you can see an empty chart that is rendered in debug and not rendered in release.

As this is a public forum, I removed my SyncFusion license text. 

I hope this help to solve the issue. Please let me know if you need something else from my side.

Regards,
Diego

Attachment: Syncfusion_Sample_7d15d22b.7z


HM Hemalatha Marikumar Syncfusion Team June 16, 2020 03:24 PM UTC

Hi Diego, 
 
Thanks for sharing the sample.  
 
We were able to reproduce the same and validating the reported issue with high priority since it is occurred in our controls. Hence, we will share the validated status of this or before June 18,2020. 
 
Regards,
Hemalatha M. 
 



DR Diego Roses June 17, 2020 11:05 AM UTC

Great! thanks for your help.

Regards,
Diego.


SJ Suyamburaja Jayakumar Syncfusion Team June 19, 2020 12:55 AM UTC

Hi Diego Roses, 
 
Sorry for the delay. 
   
We need some more time to validate this at our end and analyzing the root cause of this is issue. Hence, we will update the complete details on or before June 22,2020. 
 
Regards, 
Suyamburaja  



AS Anandraj Selvam Syncfusion Team June 19, 2020 01:59 PM UTC

Hi Diego,  
   
Due to complexity in finding the root cause, still we are validating the reported issue and we will come back with more details on or before Jun 24, 2020. 
  
We appreciate your patience until then. 
    
Regards,    
Anand Raj S. 



DR Diego Roses June 19, 2020 02:52 PM UTC

Ok, I'll wait. Thank you!

Regards,
Diego


DD Devakumar Dhanapoosanam Syncfusion Team June 22, 2020 01:22 PM UTC

Hi Diego Roses, 
 
Thanks for your update. 
 
We will update you the details on June 24, 2020 as promised earlier.  
 
Regards, 
Devakumar D 



DD Devakumar Dhanapoosanam Syncfusion Team June 25, 2020 04:16 AM UTC

Hi Diego Roses, 
 
Sorry for the continuous delay. We were facing some technical difficulties at our end and we are working on this with high priority and update you the details on June 26, 2020. 
 
We appreciate your patience until then. 
 
Regards, 
Devakumar D 



HM Hemalatha Marikumar Syncfusion Team June 25, 2020 05:12 PM UTC

Hi Diego Roses, 
 
We are really appreciating your patience.  
 
In order to render the syncfusion controls with MVVMCross 6.1.2 and above version, please refer the Syncfusion control renderer as per in below code snippet 
 
[C#] 
 
namespace Syncfusion_Sample.UWP 
{ 
    public abstract class UWPApplication : MvxWindowsApplication<Setup, Core.App, FormsUI.App, MainPage> 
    { 
 
    } 
 
    public class Setup : MvxFormsWindowsSetup<Core.App, FormsUI.App> 
    { 
        public override IEnumerable<Assembly> GetViewAssemblies() 
        { 
            var customAssemblies = new List<Assembly>() 
        { 
            typeof(Syncfusion.SfChart.XForms.UWP.SfChartRenderer).GetTypeInfo().Assembly 
        }; 
            customAssemblies.AddRange(base.GetViewAssemblies()); 
            return customAssemblies; 
        } 
    } 
} 
 
Instead of applying that in  
 
  protected override void OnLaunched(LaunchActivatedEventArgs activationArgs) 
        { 
            base.OnLaunched(activationArgs); 
 
 
            List<Assembly> assembliesToInclude = new List<Assembly>(); 
 
            //assembliesToInclude.Add(typeof(Syncfusion.SfDataGrid.XForms.UWP.SfDataGridRenderer).GetTypeInfo().Assembly); 
            assembliesToInclude.Add(typeof(Syncfusion.SfChart.XForms.UWP.SfChartRenderer).GetTypeInfo().Assembly); 
            //assembliesToInclude.Add(typeof(Syncfusion.XForms.UWP.ProgressBar.SfLinearProgressRenderer).GetTypeInfo().Assembly); 
            //assembliesToInclude.Add(typeof(Syncfusion.XForms.UWP.ProgressBar.SfCircularProgressBarRenderer).GetTypeInfo().Assembly); 
 
            Xamarin.Forms.Forms.Init(activationArgs, assembliesToInclude); 
 
        } 
 
 
 
Release mode update
 
 
 
Regards, 
Hemalatha M. 
 


Marked as answer

DR Diego Roses June 25, 2020 06:36 PM UTC

Hi,

I've made the changes and now it renders properly in release mode.

Thank you very much for the support!

Best regards,
Diego Roses


HM Hemalatha Marikumar Syncfusion Team June 26, 2020 07:39 AM UTC

Hi Diego Roses, 
 
Thanks for your valuable feedback.  
 
Please let us know if you need any further assistance, don’t hesistate to contact us. 
 
Regards,
Hemalatha M. 



ZU Zulu September 15, 2021 09:01 AM UTC

Is there some solution for a UWP C# desktop app? Not Xamarin



YP Yuvaraj Palanisamy Syncfusion Team September 16, 2021 02:27 PM UTC

Hi Zulu, 
 
Greetings from Syncfusion. 
 
We have analyzed your query and we have checked the reported problem “Chart does not rendered in release mode” it was working fine at our end. Also, we have attached the test sample for your reference, please find the test sample from the below link. 
 
 
Could you please check the above sample and if still you are facing the problem, please share us the following details. 
·       Syncfusion package version  
·       Machine configuration details(Visual studio version, Deployment target version) 
·       Additional project settings like enable Native tool chain 
·       Chart code snippet 
 
If possible, please share the modified sample with issue reproduced state, which will be helpful for us to provide the better solution at the earliest. 
 
Regards, 
Yuvaraj. 


Loader.
Up arrow icon