Click here to Skip to main content
15,888,803 members
Home / Discussions / C#
   

C#

 
GeneralRe: Lessons learned Pin
Nick Parker14-Jun-03 10:51
protectorNick Parker14-Jun-03 10:51 
GeneralRe: Lessons learned Pin
leppie14-Jun-03 10:56
leppie14-Jun-03 10:56 
GeneralRe: Lessons learned Pin
Nick Parker14-Jun-03 10:58
protectorNick Parker14-Jun-03 10:58 
GeneralRe: Lessons learned Pin
Kant14-Jun-03 15:06
Kant14-Jun-03 15:06 
GeneralRe: Lessons learned Pin
leppie14-Jun-03 16:21
leppie14-Jun-03 16:21 
GeneralRe: Lessons learned Pin
James T. Johnson14-Jun-03 12:09
James T. Johnson14-Jun-03 12:09 
GeneralRe: Lessons learned Pin
Kant14-Jun-03 15:03
Kant14-Jun-03 15:03 
GeneralRe: Lessons learned Pin
James T. Johnson14-Jun-03 17:03
James T. Johnson14-Jun-03 17:03 
Kant wrote:
But they work right if they are loaded in the GAC. Am I correct?

Nope, that is what is happening now.

The problem isn't that the version of the custom control changed, its that the assemblies *it* referenced are of different versions than what are already loaded. When the loader sees that the version already loaded differs from the one requested, it throws the FileNotFoundException.

Come to think of it, you *might* be able to get around the problems (and avoid a .config file if you don't need one) by hooking into the AppDomain.AssemblyResolve event. This puts you in complete control of how all further assemblies are loaded if the original request fails (which it would if the wrong version is already loaded).

It would require some work on your part, but you would need two bits of information...the assembly name and public key token (to ensure that you are being asked to load one of the framework assemblies and not some bogus one). You could then use that information to load the correct assembly or return a reference to the already loaded one.

James

"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him

GeneralNew FXCop released Pin
leppie14-Jun-03 1:55
leppie14-Jun-03 1:55 
GeneralRe: New FXCop released Pin
Rocky Moore14-Jun-03 15:33
Rocky Moore14-Jun-03 15:33 
GeneralRe: New FXCop released Pin
leppie14-Jun-03 16:16
leppie14-Jun-03 16:16 
QuestionBrowseForFolder Dialog settings starting Folder? Pin
STW13-Jun-03 19:48
STW13-Jun-03 19:48 
AnswerRe: BrowseForFolder Dialog settings starting Folder? Pin
dynamic13-Jun-03 23:35
dynamic13-Jun-03 23:35 
QuestionIs params a C# keyword? Pin
monrobot1313-Jun-03 12:54
monrobot1313-Jun-03 12:54 
AnswerRe: Is params a C# keyword? Pin
leppie13-Jun-03 13:14
leppie13-Jun-03 13:14 
GeneralOwner-Drawn Scrollbars Pin
J. Dunlap13-Jun-03 12:28
J. Dunlap13-Jun-03 12:28 
GeneralRe: Owner-Drawn Scrollbars Pin
J. Dunlap13-Jun-03 13:55
J. Dunlap13-Jun-03 13:55 
Generalgui event handling Pin
zuhx13-Jun-03 10:08
zuhx13-Jun-03 10:08 
GeneralRe: gui event handling Pin
Paresh Gheewala13-Jun-03 11:22
Paresh Gheewala13-Jun-03 11:22 
Questiondefault (optional) parameters in a function??? Pin
CherezZaboro13-Jun-03 10:06
CherezZaboro13-Jun-03 10:06 
AnswerRe: default (optional) parameters in a function??? Pin
leppie13-Jun-03 10:50
leppie13-Jun-03 10:50 
GeneralC# Language question for a guru Pin
albean13-Jun-03 9:49
albean13-Jun-03 9:49 
GeneralRe: C# Language question for a guru Pin
J. Dunlap13-Jun-03 10:36
J. Dunlap13-Jun-03 10:36 
GeneralOleDbCommands and OleDbDataAdapter Pin
mindfuck13-Jun-03 4:17
mindfuck13-Jun-03 4:17 
GeneralRe: OleDbCommands and OleDbDataAdapter Pin
Laimis13-Jun-03 5:35
Laimis13-Jun-03 5:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.