We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Spreadsheet trying to use Xamarin / MonoAndroid framework for Windows Forms project

When attempting to run a simple Windows Forms (C#) application containing only a button, and Syncfusion Spreadsheet for Windows Forms component I receive an error stating "Code generation for property 'DefaultPastOption' failed. Error was: 'Type 'Syncfusion.Windows.Forms.Spreadsheet.PasteOptions' is not available in the target framework.'

My target framework is .Net 4.5.2 in project preferences. I'm attempting to run using the default "Debug" and "Any CPU" settings. I'm concerned about what is appearing in the output window. It would seem as though something is trying to reference Xamarin.Android, and the target framework is MonoAndroid. Granted that I can recreate the error, but I can also go ahead and create a new project of the same type and run it ok as long as there is no Spreadsheet control added, I'm guessing the spreadsheet control has something weird going on. I can also simply delete the spreadsheet control from this project and it compiles fine, with no references to Xamarin or MonoAndroid.

Any ideas on how to fix this?

Screenshots including error, design, code, and output window: here (new window)

2 Replies

SW Simon Webster April 6, 2017 05:35 AM UTC

Additionally - the spreadsheet component will not show up in Visual Studio if the user only installs Windows Forms controls through the Syncfusion installer 15.1.0.33.

Condifmed this issue on a fresh install of Windows 10 Pro 64 bit, Visual Studio Community 2017 - with only .Net desktop environment options installed, and Syncfusion with Just Windows Forms components installed. This was to eliminate any possibility of the Xamarin installs causing issues. It would appear the spreadsheet control is linked to Xamarin somehow, and is not a solely Windows Forms component in its current implementation.


GA Gayathri Arumugam Syncfusion Team April 6, 2017 06:30 PM UTC

Hi Simon,    
 
Sorry for the inconvenience.    
  
 Issue1: Error occurs while drag and drop Spreadsheet  
 
We have Checked the reported issue in the following product versions. 
·       Visual Studio 2017(target Framework .Net 4.5.2)  product version 15.1.0.41 
·       Visual Studio 2017 product version 15.1.0.33. 
 
But we were unable to reproduce any exception when drag and drop Spreadsheet from toolbox into the designer and nothing was referred to Xamarin.Android.  
 
Issue 2: Spreadsheet component not shown in 15.1.0.33 version 
 
We have checked this issue in Visual Studio by installing only Windows Forms controls 15.1.0.33 and we could find spreadsheet component in version 15.1.0.33. For your kind information  we have not implemented spreadsheet in Xamarin platform. 
 
Please let us know if you need further assistance.  
 
Regards,   
Gayathri A   


Loader.
Live Chat Icon For mobile
Up arrow icon