0

I am having trouble while adding System.Data.dll in Windows Phone 8.1 Application. Following compile time error show after adding System.Data.dll in project reference and adding following class:

public class EntityResponse
{
    public DataSet[] EntityDataSet { get; set; }
}

The base class or interface 'System.ComponentModel.MarshalByValueComponent' in assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' referenced by type 'System.Data.DataSet' could not be resolved c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Data.dll

Please let me know what is problem and how we can solve this problem with other replacement class or dll.

Ankush Madankar
  • 3,689
  • 4
  • 40
  • 74
  • Well you just can't use System.Data in Windows Phone 8 applications because it's not supported on WinRT. There are other options (a middle tier if you're running on desktop or Local Database if you're running on RT) but you need to explain what you need it for. If you need Entities...well you can't. You have a basic ORM support in Microsoft.Phone.Data.Linq.Mapping (and _friends_) but nothing like EF. – Adriano Repetti Oct 07 '14 at 07:20
  • @AdrianoRepetti I like to use `DataSet`, `DataTable`.. ADO.net component in project. – Ankush Madankar Oct 07 '14 at 07:22
  • Sorry you can't. All that stuff isn't supported, see MSDN: http://msdn.microsoft.com/en-us/library/windows/apps/ff402541(v=vs.105).aspx (and sub-topics). Well _"you can't"_ actually means you can't use those objects but you can do more or less same things in another way. – Adriano Repetti Oct 07 '14 at 07:24
  • @AdrianoRepetti I like parse Json object response which might having DataSet property, how can I parse same object in alternate way in windows phone 8.1? – Ankush Madankar Oct 07 '14 at 07:29
  • Do you have a DataSet object **serialized** in JSON? – Adriano Repetti Oct 07 '14 at 07:32
  • @AdrianoRepetti Yes, DataSet object serialized in JSON. – Ankush Madankar Oct 07 '14 at 09:22
  • Well you still can deserialize it (it depends what you used to do it) but you won't have its methods nor controls to use it... – Adriano Repetti Oct 07 '14 at 09:35
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/62581/discussion-between-ankush-madankar-and-adriano-repetti). – Ankush Madankar Oct 07 '14 at 09:59

0 Answers0