Note that there are some explanatory texts on larger screens.

plurals
  1. POadding a service reference create duplicated definitions for enums and methods
    primarykey
    data
    text
    <p>I'm adding Navision Web Services to a simple Windows Forms Application using <code>Add Service Reference</code> functionality inside Visual Studio 2010, the reference are generated but inside the code there are duplicated definitions that stop the code from compiling, for example:</p> <p>Error</p> <blockquote> <p>The namespace 'WindowsFormsApplication1.ServiceReference1' already contains a definition for 'Status' C:\Trash\WindowsFormsApplication1\WindowsFormsApplication1\Service References\ServiceReference1\Reference.cs</p> </blockquote> <p>and inside <code>Reference.cs</code> I have</p> <pre class="lang-cs prettyprint-override"><code>[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.1015")] [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:microsoft-dynamics-schemas/page/salesheaderpage")] public enum Status { /// &lt;remarks/&gt; Open, /// &lt;remarks/&gt; Released, /// &lt;remarks/&gt; Pending_Approval, /// &lt;remarks/&gt; Pending_Prepayment, } </code></pre> <p>and</p> <pre class="lang-cs prettyprint-override"><code>[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] [System.Runtime.Serialization.DataContractAttribute(Name="Status", Namespace="urn:microsoft-dynamics-schemas/page/salesheaderpage")] public enum Status : int { [System.Runtime.Serialization.EnumMemberAttribute()] Open = 0, [System.Runtime.Serialization.EnumMemberAttribute()] Released = 1, [System.Runtime.Serialization.EnumMemberAttribute()] Pending_Approval = 2, [System.Runtime.Serialization.EnumMemberAttribute()] Pending_Prepayment = 3, } </code></pre> <p>I already tried to uncheck <code>Reuse types in referenced assemblies</code> but the duplicated definitions are still generated in both cases.</p> <p>any ideas?</p> <p>EDIT: the Page is a custom Page connected to the standard table 36 (Sales Header)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload