Strange Behaviour: Console Application doesn't loads the updated assembly

M

MaverickAmit

Dear All,

I am having a console application which calls a function in a class
library.
The class library assembly is in GAC.Its version is 1.0.0.0
I now make some changes to the class library and build it with version
1.0.0.1 and install it in GAC. Now i have two assemblies with versions
1.0.0.0 and 1.0.0.1 installed in GAC
Now if i run my Console application without rebuilding, it is giving
the result according to the assembly with version 1.0.0.0
I think it should give results according to the latest assembly i.e
with version 1.0.0.1
Am i missing something here?

Moreover, if i rebuild the console application and run it, a
System.MissingMethodException is coming.
However, if i remove the assembly reference from the console
application and again add it and rebuild, then the results are
according to the latest assembly i.e with version 1.0.0.1

Please let me know what to do so the application loads the latest
assembly without requiring to rebuild it.

Regards,
MaverickAmit
 
S

Softwaremaker

Now if i run my Console application without rebuilding, it is giving
the result according to the assembly with version 1.0.0.0
I think it should give results according to the latest assembly i.e
with version 1.0.0.1
Am i missing something here?
</Quote>

If you built your app to use the first version in the first place, it will
always use the same version, no matter how many newer versions you have in
GAC. This is to solve the backward compatibility of the previous DLL HELL
where the newer versions take root and you have contractual interface
problems.

--
Thank you very much

Warmest Regards,
Softwaremaker (WilliamT)
Software Architect
+++++++++++++++++++
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top