SHARED ASSEMBLY CONCEPT

Posted by Avdesh under C# on 11/22/2011 | Points: 10 | Views : 889 | Status : [Member] | Replies : 2
I HAVE 2 ASSEMBLIES NAMED CLASSLIBRARY1.DLL VERSIONS 1.0.0.0 & 1.1.0.0.

AND I INSTALLED THESE ASSEMBLIES IN GAC BY GENERATING STRONG NAME KEY THROUGH SN.EXE TOOL

I WANT TO KNOW HOW I CHOSE BETWEEN THESE ASSEMBLIES WHEN I USED THEM IN APPLICATION


THANKS IN ADVANCE

REGARDS
[AVDESH PAL]




Responses

Posted by: muralikrishnasurap-12704 on: 11/25/2011 [Member] Starter | Points: 25

Up
0
Down
HI ,
If you are working on webapplication it very easy to access different versions of assembly using web.config file.. please try with this suggestion if not just let me know i will share you the code with one example.

Best Regards
Murali Krishna.S

Avdesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksingh on: 11/25/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

In case of Web Application it will work fine as Murali mentioned above but in case on winform use assembly redirection as below in app.config file.

<configuration>

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" >
<dependentAssembly>
<assemblyIdentity
name="DevelopMentor.Mandelbrot"
publicKeyToken="be418bc72a93105f" />
<bindingRedirect oldVersion="1.0.0.0"
newVersion="2.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>


Regards,
Sunil

Avdesh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response