You need to sign in to do that
Don't have an account?

Attribute cannot be applied multiple times
Hello. I'm sorry if this is a silly question. I'm using VB .Net WPF and I'm trying to use the Enterprise SOAP API. I'm using this guide: https://developer.salesforce.com/docs/atlas.en-us.224.0.api.meta/api/sforce_api_quickstart_steps_import_wsdl.htm
I'm getting some errors in the autogenerated class. I know that there is a bug but I'm not fully understanding what that fix is for if it applies here. If you need any more information please let me know. Thank you!
I'm getting some errors in the autogenerated class. I know that there is a bug but I'm not fully understanding what that fix is for if it applies here. If you need any more information please let me know. Thank you!
Severity Code Description Project File Line Suppression State Error BC30663 Attribute 'GeneratedCodeAttribute' cannot be applied multiple times. Error BC30663 Attribute 'SerializableAttribute' cannot be applied multiple times. Error BC30663 Attribute 'DebuggerStepThroughAttribute' cannot be applied multiple times. Error BC30663 Attribute 'DesignerCategoryAttribute' cannot be applied multiple times. Error BC30663 Attribute 'XmlTypeAttribute' cannot be applied multiple times. Warning Custom tool warning: Schema could not be validated. Class generation may fail or may produce incorrect results Warning Custom tool warning: Schema validation error: Schema item 'simpleType' named 'FaultCode' from namespace 'urn:fault.enterprise.soap.sforce.com' is invalid. The Enumeration constraining facet is invalid - 'fns' is an undeclared prefix. Warning Custom tool warning: Schema validation error: Schema item 'simpleType' named 'FaultCode' from namespace 'urn:fault.enterprise.soap.sforce.com' is invalid. The Enumeration constraining facet is invalid - 'fns' is an undeclared prefix.
I cannot guarantee that this is the perfect solution but I edited the reference.vb file (Visual Studio 2019 Visual Basic) and deleted the rows that were causing the errors. Under the errors window double click on the error line and it will open the reference.vb file, hightlight the rows and press delete (from <...>)
I had an aditional error "Targetfiled is already declared as 'Private TargetField....' I went to the line and rename the property as TargetField1
I rebuilt the solution and it is working as expected. Anyway I will let you know if I get any update from Salesforce.