0
votes

I create service.cs by slSvcUtile.exe for Xamarin.Forms But I Get Error:

The type name 'DataContractAttributeAttribute' could not be found in the namespace 'System.Runtime.Serialization'. This type has been forwarded to assembly 'System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' Consider adding a reference to that assembly.

Can I use it instead of DataContract of Serializable?

1

1 Answers

2
votes

It seems you are missing the reference to the library. You could try to add System.Runtime.Serialization.dll using /r: System.Runtime.Serialization.dll You might need to specify full path to it.

Details how to do that is here https://msdn.microsoft.com/en-us/library/cc197958(v=vs.95).aspx