Get location of project at design time

  • Thread starter Thread starter Jack Jackson
  • Start date Start date
J

Jack Jackson

Is there a way at design time (from within a UITypeConverter) to get
the location of the project?
 
I dont think thats possible. Why do you want the project location?

---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
 
In a UITypeConverter I want to use reflection to get some information
from a .dll. If I can get the project directory I can find the .dll.
 
For that you can use the Assembly.GetExecutingAssembly.CodeBase property.

---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
 
Thanks.

In my case the CodeBase property returns "file:///C:/Documents and
Settings/jfj/Local Settings/Application
Data/Microsoft/VisualStudio/8.0/ProjectAssemblies/xydic25m01/DbAccess.dll"

That is the .dll that the executing code is in. Each of the .dlls
referenced in the current project is in a different directory under
the ProjectAssemblies directory.

By adding the .dll I want to examine to the project, and by recursing
into all of the subdirectories of the parent directory returned by
CodeBase, I will be able to find the .dll. I would have preferred to
find the actual Bin directory, and not have to add a reference to the
..dll I want to examine, but I can use this. Actually the Location
property is slightly better, as it returns a file system name rather
than a URL.

Thank you.
 
Back
Top