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

  • Home
  • SEARCH
  • 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 4079482
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:48:27+00:00 2026-05-20T17:48:27+00:00

Is there any way possible short of hand-coding the Reference.cs file, to get Visual

  • 0

Is there any way possible short of hand-coding the Reference.cs file, to get Visual Studio to allow multiple service references to share a namespace?

I am developing a client application that makes use of several services that are part of the same solution. Something along the lines of the Project Service Interface (PSI) API Microsoft has for MS-Project Server. Rather than have a different namespace for each individual service reference, such as:

MyProject.ProjectService.ProjectServiceClient
MyProject.ResourceService.ResourceServiceClient
MyProject.TimesheetService.TimesheetServiceClient

it would be nice if we could throw them all into a single namespace, like:

MyProject.Services.ProjectServiceClient
MyProject.Services.ResourceServiceClient
MyProject.Services.TimesheetServiceClient

Along with this comes the ability to share common code. For instance if any of these services exposed the same data contract. Right now, if I want to write code that my client can use I have to create a separate version for each service proxy because the common contract exists in three different namespaces. See where I’m going?

It is possible?

UPDATE

Let’s assume that I don’t have access to the service code (cuz I don’t) which means that a shared class library is not an option. What are my choices in this case?

  • 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-05-20T17:48:28+00:00Added an answer on May 20, 2026 at 5:48 pm

    You can place these common classes into a class library which is shared by both the services and the clients. Then, Visual Studio will not generate classes for each service reference, but will instead use the common class library.

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

Sidebar

Related Questions

Is there any way to check whether a file is locked without using a
Is there any way to apply an attribute to a model file in ASP.NET
Is there any way to have something that looks just like a file on
I'll keep it short, is there any way to define a set of DataGridTemplateColum's
I don't think this is possible, but I'll ask anyway... Is there some way
Is there any way to capture the MouseDown even from the .NET 2.0 TextBox
Is there any way, in any language, to hook my program when a user
Is there any way to include the SVN repository revision number in the version
Is there any way to use inheritance in database (Specifically in SQL Server 2005)?
Is there any way to force a listview control to treat all clicks as

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.