App Paths and Assemblies

R

Ron Bremmers

I have a application (.exe) and one assembly (.dll).
When the two files are in de same folder, it works fine.
But I want to create a subfolder called for example "DLLs".
When I move the assembly to the DLLs folder, the exe doesn't work anymore.
So I create a key in de "App Paths" section of the registry
(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths) to
tell the application to look into the DLLs folder.
But that doesn't work. Is that not possible with .NET dll's?? How can I get
it working??
 
N

Nick Malik [Microsoft]

Why do you want to do this?

Shared DLLs should go in the GAC. Are you familiar with the GAC?

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
R

Richard Grimes [MVP]

Ron said:
I have a application (.exe) and one assembly (.dll).
When the two files are in de same folder, it works fine.
But I want to create a subfolder called for example "DLLs".
When I move the assembly to the DLLs folder, the exe doesn't work
anymore. So I create a key in de "App Paths" section of the registry
(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths) to tell the application to look into the DLLs folder.
But that doesn't work. Is that not possible with .NET dll's?? How can
I get it working??

If it is a *private* library, (that is, only used by that single
application) then you can add a <probing> tag to the configuration file.
If the library will be shared by several applications, then put it in
the GAC.

Fusion Tutorial
http://www.grimes.demon.co.uk/workshops/fusionWS.htm

Probing
http://www.grimes.demon.co.uk/workshops/fusWSTwo.htm#Example_2_1

GAC
http://www.grimes.demon.co.uk/workshops/fusWSFour.htm

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top