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 3603630
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:53:45+00:00 2026-05-18T20:53:45+00:00

What is the best way to reference an existing .NET dll (Class library)? Is

  • 0

What is the best way to reference an existing .NET dll (Class library)? Is there any benefit to expose web services from the class library and reference these as opposed to referencing the actual .dll (Although one benefit of the web service approach is the granularity and thus surface area exposed is up to you at coding time)?

I am thinking with loose coupling in mind, as a criteria.

Thanks

  • 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-18T20:53:46+00:00Added an answer on May 18, 2026 at 8:53 pm

    I don’t believe web services are what you are looking for. Web services are not a blanket decoupling tool, and should not be used as one.

    First and foremost, I would say the first thing to do before referencing an existing .NET class library is ask yourself, how much risk are you taking if you access this directly? Or, what am I going to have to do if the API/functionality of this library changes?

    If you are referencing System.dll, then you know it’s not going to change (.NET Framework upgrades aside) and I would recommended referencing it directly. There’s no real risk here. If the referenced library is highly suspect or changes often, then you want to protect your consuming library from being dependent on it.

    There are many different ways to decouple your library from the library you are consuming. As Adrian K mentions, Dependency Injection and Inversion of Control are a good place to start. They might also be overkill and a simple application of the Adapter pattern may suffice. It really depends on the situation.

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

Sidebar

Related Questions

What is the best way to add a reference to a javascript file from
What's the best way to reference to a dynamically allocated object (particularly interface elements)
What is the best way to reference datastore model attributes without using the four
What is the best way to view the HTTP response headers from a request
What's the best way to handle adding a new (optional) parameter to an existing
In an existing code snippet, I have import sys from code import InteractiveConsole class
What is the best way to invite users to an existing event? We'd like
How do I reference a MS Exchange Server 2007 API via a ASP.NET Web
We have a few existing web services which require some sort of basic security
I added a reference (LinqBridge.dll) to my existing project and the references are conflicted

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.