I'm attempting to update a Visual Studio web reference from using the v27.0 Metadata API to the Summer 13 v28.0 API.
This compiles fine, but when running the code an exception is thrown in the MetaDataService (instance of System.Web.Services.Protocols.SoapHttpClientProtocol) constructor.
System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS0030: Cannot convert type
'Foo.SalesforceMetadata.QuickActionLayoutItem[]' to 'Foo.SalesforceMetadata.QuickActionLayoutItem'
StackTrace:
- System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
- System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
- System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
- System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)
- System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
- System.Web.Services.Protocols.SoapClientType..ctor(Type type)
- System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
- Foo.SalesforceMetadata.MetadataService..ctor() in D:\Development\Foo\Web References\SalesforceMetadata\Reference.cs: line 64
Note that this isn't a user permissions issue for the XML serialisation. It works just fine with the v27.0 API.
How can I use the v28.0 Metadata API from .NET?