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. Deploying Assembly and Loading

Deploying Assembly and Loading

Scheduled Pinned Locked Moved .NET (Core and Framework)
helpdotnetworkspace
3 Posts 2 Posters 0 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.
  • S Offline
    S Offline
    Subby Dev
    wrote on last edited by
    #1

    Hi there, Well, I am facing some problems while loading an assembly dynamically from a subdirectory located in ApplicationBase. The code works just fine when this dll is located in the application directory but when I tried to load it from one of the application's subdirectory it is not working even when I tried following options: First, I created a "test" subdirectory for my test.dll(As far as my understanding of deploying a private assembly goes I believe runtime locates dll in application directory then it looks for a subdirectory having dll's name e.g. temp in this case and finally it goes to GAC.) Second, I get following error log from fusion LOG: Private path hint found in configuration file: test. LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). where test is the subdirectory I am putting this dll. I have included in app.config but it doesn't seem to work. Also I have tried to use tags and made this assembly strong named and unfortunately that didn't work either. Additionally, I have tried both LoadFrom() and Load() methods but no help. As far as my understanding goes I think I do not need to create a strong named assembly when I am using probing element in config. Any suggestions would be greatly appreciated. Thanks in advance. -Subby:) -- modified at 13:55 Sunday 26th March, 2006

    T 1 Reply Last reply
    0
    • S Subby Dev

      Hi there, Well, I am facing some problems while loading an assembly dynamically from a subdirectory located in ApplicationBase. The code works just fine when this dll is located in the application directory but when I tried to load it from one of the application's subdirectory it is not working even when I tried following options: First, I created a "test" subdirectory for my test.dll(As far as my understanding of deploying a private assembly goes I believe runtime locates dll in application directory then it looks for a subdirectory having dll's name e.g. temp in this case and finally it goes to GAC.) Second, I get following error log from fusion LOG: Private path hint found in configuration file: test. LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). where test is the subdirectory I am putting this dll. I have included in app.config but it doesn't seem to work. Also I have tried to use tags and made this assembly strong named and unfortunately that didn't work either. Additionally, I have tried both LoadFrom() and Load() methods but no help. As far as my understanding goes I think I do not need to create a strong named assembly when I am using probing element in config. Any suggestions would be greatly appreciated. Thanks in advance. -Subby:) -- modified at 13:55 Sunday 26th March, 2006

      T Offline
      T Offline
      Tim Paaschen
      wrote on last edited by
      #2

      Hi, I usually use this method AppDomain.CurrentDomain.AppendPrivatePath( path ) to add a directory (e.g. for plugins) that the assembly resolver should include in its probing. Hope this helps, Tim

      S 1 Reply Last reply
      0
      • T Tim Paaschen

        Hi, I usually use this method AppDomain.CurrentDomain.AppendPrivatePath( path ) to add a directory (e.g. for plugins) that the assembly resolver should include in its probing. Hope this helps, Tim

        S Offline
        S Offline
        Subby Dev
        wrote on last edited by
        #3

        Thanks, I tried the AppendPrivatePath method and had the similar problem. I finally figured out the problem. It is little silly but I didn't know that the problem was because of changing method from LoadFrom(which requires complete filename) to Load. In the load method I was giving the complete dll name e.g. test.dll so the runtime was looking for directories library test.dll.dll :) Thanks Anyway.

        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