Note that there are some explanatory texts on larger screens.

plurals
  1. POBrowsable(false) and svcutil
    text
    copied!<p>I'm using svcutil to generate service reference code for a client and want to replicate the "add service reference" option in Visual Studio 2010. I've followed advice found <a href="http://geekswithblogs.net/DavidBarrett/archive/2008/06/30/equivalent-svcutil.exe-command-for-vs2008-add-service-reference.aspx" rel="nofollow" title="here">enter link description here</a>. The only issue I face is that it's not marking the ExtensionDataObjects with the Browsable(false) attribute - as is the case when you generate the reference files from Visual Studio.</p> <p>I'm hoping it's just a switch I'm missing as I don't want to go down the route of writing something custom to apply the attribute after svcutil does it's magic.</p> <p>Here's the generated code for reference:</p> <pre><code> public System.Runtime.Serialization.ExtensionDataObject ExtensionData { get { return this.extensionDataField; } set { this.extensionDataField = value; } } </code></pre> <p>This is what VS generates via <em>"Add Service Reference"</em></p> <pre><code> [global::System.ComponentModel.Browsable(false)] public System.Runtime.Serialization.ExtensionDataObject ExtensionData { get { return this.extensionDataField; } set { this.extensionDataField = value; } } </code></pre> <p><strong>Follow up:</strong></p> <p>So I haven't found a solution for this and it's not bothering me too much. Some day I might try to properly replicate Visual Studio's method for generating these classes.</p> <p>I should explain why I asked this question though - I switched from the VS method to the svcutil method. An "Update Service Reference" is now part of my build process. The problem is that I have a few grids / binding sources that now have this visible ExtensionData column. Not ideal.</p>
 

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