473,811 Members | 2,540 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SHFusion API: retrieving codebase of assemblies in GAC

We're using the "Microsoft.CLRA dmin.Fusion" assembly because we want to
retrieve the exact locations of the assemblies in the GAC. The code looks
like this:

// objAssembly is the Microsoft.CLRAd min.AssemInfo assembly.
Type objType = objAssembly.Get Type();
BindingFlags objBinding = (BindingFlags) 1078;
string strCodeBase = (string) objType.InvokeM ember("Codebase ", objBinding,
null, objTarget, null);

Now this works fine for most assemblies, although for some assemblies we're
getting an empty code base path, for example for the Office and SharePoint
assemblies located in the GAC. Does anybody know why this happens and how we
can retrieve the exact locations of the assemblies which return empty code
base paths?

Kind regards,
Nikander & Margriet Bruggeman
Feb 24 '06 #1
0 1433

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
1502
by: bazad | last post by:
Let's say I have plug-in API. A number of assemblies implement plug-in API version 1. Over time plug-in interface changes to version 2. How would you handle assemblies implementing old API?
0
949
by: Ram | last post by:
Hey, I have 2 computers, one has Framework 1.0 and 1.1 installed, and the other has them both And the beta of Framework 2.0. I install a certian Assembly in the GAC using - GacUtil /i, and it worked fine on both computers. BUT, on the first computer, the CodeBase property of the assembly had shown me the location I install the assembly from. And on the computer with the Framework 2.0 Beta, the CodeBase property was empty for ALL the...
7
11105
by: Ruslan Popov | last post by:
Hi, I am trying to prevent an assembly being loaded from GAC and instead want it loaded from the application's base directory. However, the assembly always gets loaded from GAC. How to have it loaded from the application directory? I read about the bindingRedirect trick in the NG, however, specifying bindingRedirect did not work for me. Also, MSDN library states that "Application configuration files can have a codebase setting without...
0
1145
by: Dinesh Upare | last post by:
Hi, I want to deploy my private shared assembly using codebase keeping some of the assemblies in common folder. I am using following tag in web.config <runtime> <assemblyBinding xmlns="urn:schemas-icrosoft-com:asm.v1"> <dependentAsembly>
2
2102
by: BentleyInc | last post by:
I wrote a DownloadRequestHandler to be used in http://server/DownloadDir and I've made the correct IIS settings for DownloadDir. Currently I'm having problem loading up some dependent assemblies. Here's my web.config in the physical directory of DownloadDir. Class myDownloadRequestHandler loads myRequestHandlers successfully but it then complains it couldn't load myLogging. myLogg.dll does exist in c:\inetpub\wwwroot\bin\. Any ideas why...
2
2239
by: Tim | last post by:
I have placed my assemblies in different folders (as per project req.). I am using config file with <codebase> option and registry with codebase option (COM Interop) to enable the runtime to locate the assemblies. Will I face any problems in future versions due to the usage of 'codebase' option? What precautionary measures need to be taken if the 'codebase' option is used?
0
1337
by: Ralf | last post by:
Hi, I have the following problem: we have our application spread over two folders Folder1: main.dll (managed cpp assembly, strong named) ... many many resources for main.dll Folder2: user1.exe (references main.dll, C#) user2.dll (references user1.dll and main.dll, C# class library)
2
2138
by: Tony Johansson | last post by:
Hello! In directory c:\window\assembly(GAC) can you find a lot of global assembly names which is called shared assemblies. If I for example use ILDASM on a file called Accessibility which is a dll that exist in the c:\window\assembly(GAC) nothing happen why? You can use ILDASM on any private assembly but it seems to be impossible on
14
1939
by: Jef Driesen | last post by:
I'm writing a library (to communicate with a number of devices over a serial port) and have some questions about the design. I have now a header and source file like this: /* device.h */ typedef struct device device; int device_open (device **dev, const char *name); int device_close (device *dev); int device_read (device *dev, void *data, unsigned int size);
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10651
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10403
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10136
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6893
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5693
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4341
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3020
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.