Click here to Skip to main content
13,145,568 members (45,188 online)
Rate this:
Please Sign up or sign in to vote.
Hello there !

It's been a while that I'm faced to a major problem and Internet doesn't help me for the moment... Hope to find answers here !

I'm working in Visual Studio 2005 for work purpose (especially in VB.NET). I've made a custom editor to edit a special collection in a component object. Objects allowed in this collection must implement the IFoo interface. The user can extend the basic objects that implement this interface by inherit them or simply by implement IFoo in its own classes. I want to make these user classes to be part of possible items in my collection at design time. In fact, I want to reproduce the windows form editor behavior of visual studio that automatically propose to the user to add all the user controls and components (in the toolbox) coded in the edited solution, based on the last correct assemblies building.

I've tried the only way that I can think about : the reflection. I look for the last dll build by the user (mostly in the bin\debug folder) and dynamic load it in my custom editor form. It works but after that, the user can not compile its assembly while visual studio instance stay open because the file remains "used by another process". I can understand that this process is Visual Studio itself, so I've also tried to copy the dll or exe file with another name, then load this copy by reflection but same result. Btw, is there a way to "unload" the dynamic loaded assembly (I don't find it) ?

Impossible to find a similar problem on the net... I certainly not use the correct words, so I hope to find some help here ! Or if someone know how Visual Studio exposes the user controls of the last build in the toolbox of the form editor.

Thanks for all your answers !
Posted 23-Apr-12 4:32am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Well I have to answer myself to my question since I've found the solution.

Go to the very good blog of Daniel Cazzulino at[^]

Thinks become suddently easier !

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170915.1 | Last Updated 23 Apr 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100