Click here to Skip to main content
15,890,741 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: .Net 4.0 Win Forms Caching? Pin
Pete O'Hanlon16-Feb-12 23:31
mvePete O'Hanlon16-Feb-12 23:31 
AnswerRe: .Net 4.0 Win Forms Caching? Pin
charliezcr18-Feb-12 21:17
charliezcr18-Feb-12 21:17 
GeneralRe: .Net 4.0 Win Forms Caching? Pin
julian@giant19-Feb-12 22:08
julian@giant19-Feb-12 22:08 
QuestionwsHttpBinding using ReliableSession - Maximum retry count has been exceeded with no response from remote point Pin
gunter7915-Feb-12 5:05
gunter7915-Feb-12 5:05 
AnswerRe: wsHttpBinding using ReliableSession - Maximum retry count has been exceeded with no response from remote point Pin
gunter7916-Feb-12 7:38
gunter7916-Feb-12 7:38 
Questionconfiguration managment application blocks 5.0 Pin
Vamshi Krishna Parepalli13-Feb-12 19:30
Vamshi Krishna Parepalli13-Feb-12 19:30 
AnswerRe: configuration managment application blocks 5.0 Pin
Richard MacCutchan14-Feb-12 0:10
mveRichard MacCutchan14-Feb-12 0:10 
QuestionUse newer version of Assembly if it is available. [SOLVED] PinPopular
Shameel10-Feb-12 2:45
professionalShameel10-Feb-12 2:45 
I have a WinForms application that uses an assembly (v1) provided by a Third-party vendor. Now the vendor has released a newer version of the assembly (v2). The newer version is not available on all client machines, some still have only v1 installed while some have both v1 nd v2 installed.

How do I make my app load v2 of the assembly or fallback to v1 if v2 is not available. Assume that v2 is backward compatible with v1, i.e., the type names, contracts, etc, are the same.

Both these assemblies are installed into the GAC and I cannot use any private copies since they're very complex and have a lot of dependencies.

I tried using assembly redirection using application configuration file but that seems to be a permanent redirection. It does not check for existence of the assembly to redirect. So if I set redirection from v1 to v2 (and compile my app against v1), it always tried to load v2 and fails if v2 is not available. Similarly, if I set the redirection from v2 to v1 (and compile my app against v2), it always loads v1 even if v2 is available.

I tried using AppDomain.ResolveAssembly event, but using Assembly.Load inside the event handler keeps raising the ResolveAssembly event that results in a stack overflow.

Is there a better way to do it?

[SOLUTION]
I think I did the ResolveAssembly event in the wrong way. The ResolveAssmbly event is fired only when an Assembly load fails. I compiled my app against v2 and was trying to load v2 thru a Assembly.Load call (it also fails and fires a ResolveAssembly event leading to a Stack Overlfow). The correct way is to just load the v1 thru Assembly.Load and return it.
[/SOLUTION]

modified 10-Feb-12 9:35am.

QuestionEntity Framework 4.0 AddObject() Method Encounter OptimisticConcurrencyException Pin
gujingshui9-Feb-12 16:06
gujingshui9-Feb-12 16:06 
SuggestionDebuging Tips And Memory Read? Pin
creizlein9-Feb-12 2:07
creizlein9-Feb-12 2:07 
GeneralRe: Debuging Tips And Memory Read? Pin
Dave Kreskowiak9-Feb-12 2:13
mveDave Kreskowiak9-Feb-12 2:13 
AnswerRe: Debuging Tips And Memory Read? Pin
Luc Pattyn9-Feb-12 16:04
sitebuilderLuc Pattyn9-Feb-12 16:04 
GeneralRe: Debuging Tips And Memory Read? Pin
creizlein9-Feb-12 18:59
creizlein9-Feb-12 18:59 
GeneralRe: Debuging Tips And Memory Read? Pin
Luc Pattyn9-Feb-12 23:28
sitebuilderLuc Pattyn9-Feb-12 23:28 
QuestionReport not published Pin
fareedulhassan7-Feb-12 8:32
professionalfareedulhassan7-Feb-12 8:32 
AnswerRe: Report not published Pin
thatraja7-Feb-12 10:51
professionalthatraja7-Feb-12 10:51 
Questionexpress checkout keep loading did'tn return to merchant Pin
awakepoh6-Feb-12 21:09
awakepoh6-Feb-12 21:09 
AnswerRe: express checkout keep loading did'tn return to merchant Pin
Richard MacCutchan6-Feb-12 22:48
mveRichard MacCutchan6-Feb-12 22:48 
QuestionKilling the session on click of Brwoser X Pin
hooters_263-Feb-12 1:44
hooters_263-Feb-12 1:44 
AnswerRe: Killing the session on click of Brwoser X Pin
Dave Kreskowiak3-Feb-12 2:30
mveDave Kreskowiak3-Feb-12 2:30 
AnswerRe: Killing the session on click of Brwoser X Pin
sund7wells5-Feb-12 20:05
sund7wells5-Feb-12 20:05 
GeneralRe: Killing the session on click of Brwoser X Pin
Not Active6-Feb-12 1:33
mentorNot Active6-Feb-12 1:33 
QuestionCould I improve my class which contains multiple class references Pin
Simon_Whale2-Feb-12 22:48
Simon_Whale2-Feb-12 22:48 
Question.net GridView error(server tag not well formed) Pin
brindhasudar2-Feb-12 5:21
brindhasudar2-Feb-12 5:21 
GeneralRe: .net GridView error(server tag not well formed) Pin
Manfred Rudolf Bihy2-Feb-12 5:37
professionalManfred Rudolf Bihy2-Feb-12 5:37 

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.