Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Dynamic Reference Locations?

Dynamic Reference Locations?

Scheduled Pinned Locked Moved .NET (Core and Framework)
question
3 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eidylon
    wrote on last edited by
    #1

    I know you can make web-references dynamic, which then only need a small change in the web.config file to repoint them to the new location you want to look at. My question is, can you do something aking to this with regular (non-web) references? Perhaps using the web/.config file, or a manifest file or something? We are looking to create a central library directory where we can keep our common libraries for access from any machine which needs them. One consideration was 2K's Distributed File System, but that is an awful lot of complications, especially since it means getting our domain administrators involved. So i was thinking there might be an easier way by being able to just put in a line which tells the app where to look for the reference at run-time. yes?? Thanks in advance.

    A 1 Reply Last reply
    0
    • E eidylon

      I know you can make web-references dynamic, which then only need a small change in the web.config file to repoint them to the new location you want to look at. My question is, can you do something aking to this with regular (non-web) references? Perhaps using the web/.config file, or a manifest file or something? We are looking to create a central library directory where we can keep our common libraries for access from any machine which needs them. One consideration was 2K's Distributed File System, but that is an awful lot of complications, especially since it means getting our domain administrators involved. So i was thinking there might be an easier way by being able to just put in a line which tells the app where to look for the reference at run-time. yes?? Thanks in advance.

      A Offline
      A Offline
      Andy Davey
      wrote on last edited by
      #2

      There is a way of doing this with regular refrences though you are required to use reflection to dynamically load the assembly you are looking for. Have a squizz here http://msdn.microsoft.com/library/en-us/cpguide/html/cpconhowruntimelocatesassemblies.asp[^] It would probably be eaiser to just setup a network share for the library, and add a project reference. I think deciding which asseblies to use at runtime is most suited to situations where you know the interface but you want the freedom to decide which assembly you will use to implement that interface.

      M 1 Reply Last reply
      0
      • A Andy Davey

        There is a way of doing this with regular refrences though you are required to use reflection to dynamically load the assembly you are looking for. Have a squizz here http://msdn.microsoft.com/library/en-us/cpguide/html/cpconhowruntimelocatesassemblies.asp[^] It would probably be eaiser to just setup a network share for the library, and add a project reference. I think deciding which asseblies to use at runtime is most suited to situations where you know the interface but you want the freedom to decide which assembly you will use to implement that interface.

        M Offline
        M Offline
        Mark Smithson
        wrote on last edited by
        #3

        That sounds about right. I would just point out that assemblies run from a network share will have reduced permissions when using the default security settings for .NET. Depending on what your assemblies do, you may need to alter these settings to give your assemblies the necessary permissions. Regards Mark Smithson

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups