Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Parse referenced assemblies
 

Parse referenced assemblies

Hi,

I need to parse the referenced assemblies of a project (in order to find certain types that have to be written in a configuration file). I can work on the list of references, load the respective assembly and reflect over the types.

However this will block the DLL files and the next build will fail. Using ITypeResolutionService didn't help either.

Visual Studio loads those Assemblies as well, yet it does not lock them (probably shadow copying or some other special handling). Does anyone know how to get hold of the assembly loaded by VS?

Regards,
Alexander

AlexanderJ  Thursday, November 16, 2006 2:47 PM

You should be able to use the ReflectionOnly APIs, AFAIK this won't lock the assembly.

-Victor.

vga  Thursday, November 16, 2006 3:45 PM

Can you share more info, like the details of the exception you're getting? I know for instance that Reflector (the .Net decompiler) uses ReflectionOnly APIs in order to not locking assemblies. It's weird that is not working for you...

-Victor.

vga  Wednesday, November 22, 2006 3:36 PM

You should be able to use the ReflectionOnly APIs, AFAIK this won't lock the assembly.

-Victor.

vga  Thursday, November 16, 2006 3:45 PM

After Assembly.ReflectionOnlyLoadFrom, GetType throws a ReflectionTypeLoadException...

Anyway, I'll find a way to avoid the parsing.

Alexander

AlexanderJ  Tuesday, November 21, 2006 7:41 AM

Can you share more info, like the details of the exception you're getting? I know for instance that Reflector (the .Net decompiler) uses ReflectionOnly APIs in order to not locking assemblies. It's weird that is not working for you...

-Victor.

vga  Wednesday, November 22, 2006 3:36 PM

You can use google to search for other answers

Custom Search

More Threads

• Approches for Copying files in solution folder
• Creating a Project with a Static Project Folder Name.
• Adding Solution items
• Using Experimental Hive
• Exception: Unabe to et installer types in the C:\Program Files....\MetaGuidancePackageInstaller.dll assembly
• Error "System.ArgumentNullException: Key cannot be null" when i add twice same project item
• What makes guidance package show up in "New Project" dialog box?
• What's the best way to programatically call an action from within another action?
• GAT & GAX Install Error
• Problem installing GAT