Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9026667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:34:41+00:00 2026-06-16T06:34:41+00:00

Visual Studio and SvcUtil can be used to generate proxy code to integrate with

  • 0

Visual Studio and SvcUtil can be used to generate proxy code to integrate with a service. In VS 2010 and prior there were issues if you wanted to maintain a cross tier reference library of shared types. This forced several workarounds to address the issue of equivalence in the data contract types and the inability to properly use the local types.

URL Reference to Issue: WCF Client Code Generation – Issue with “Reuse types from referenced assemblies”

I am using Visual Studio 2012, ASP.NET 4.5, C# code

My Question: “Has the reuse of types across assemblies been fixed in VS 2012?” I am porting over some code now but am also concerned that this bug may rear its head. I can run test cases, but it would be faster if someone had an answer already. It has been my experience that if you can not seem to find the answer online (googled it and keep getting 2011 – problem still exists) that the a fix may not be in place.

My Goal: Allow my future development team to reuse the same types library across the corporate .Net application tiers and layers [Presentation (Website, Mobile App layer – server side, …), Domain (Services, Business Logic Layer, Data Access Layer)]. I would like to ensure some uniformity and code reuse. Code will be as “loosely coupled” as possible in each layer, but types will be ensured via the reference assembly. Equally, I want the code to support external integration for third parties down the road. Thus my need to construct all proxy types from DataContractAttribute decorated types for outward facing services and maintain referenced types for my server side applications.

Am I going to run into any quagmires here? Is the issue in the link above been addressed? Please advise.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T06:34:42+00:00Added an answer on June 16, 2026 at 6:34 am

    The bug which you report as existing in Reuse types from referenced assemblies option happens because by specifying re-use VS calls svcutil.exe under the hood with the /r flag.

    However, svcutil.exe uses DataContractSerializer to help generate code and unfortunately this has a rather strict set of rules when it comes to parsing your service contracts.

    So unless you service XSDs adhere to this set of rules svcutil.exe will switch to use the XmlSerializer, which doesn’t support the /r flag (or re-use). Hence you will not be able to re-use types.

    If you can reference the actual service contract types (via binary reference) this is a much better solution as you can do away with service references all together. You can also use WSCF.blue to generate your service contracts, as this has it’s own custom serializer and supports re-use of types.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Visual Studio 2010 C# code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using
Visual Studio 2010 - (Windows Forms) in C# I have this code: private void
When i run the following command in the visual studio command prompt: D:\Documents\DEV\SARPilot\Docs\eoschema\schema\OrderSchema>svcutil /t:code
Visual Studio 2010 had a feature with which it was possible to generate a
Visual Studio 2012 (and earlier versions) provide predefined #defines so that source code can
Visual Studio produces the following machine code when _InterlockedIncrement is used: ; 40 :
I need to know how does svcutil and Visual Studio decide which types can
I want to update service references in a Visual Studio 2010 solution by using
C: \ Program Files \ Microsoft Visual Studio 10.0 \ VC> svcutil wsdl.wsdl /
Visual Studio 2010, I was able to view xaml in designer. Now every xaml

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.