views:

462

answers:

1

I have an assembly Foo, which has reference to assembly Bar(Version X.X.X.2000). In the properties, specific version is set to False. I have both Bar(x.x.x.2000) and Bar(x.x.x.1000) in my local GAC. Everything is fine.

On another machine, where no version of Bar is in the GAC, but Bar(x.x.x.1000) is located in the same directory as Foo, running Foo will fail claiming it can not find Barr(x.x.x.2000) with

 Could not load file or assembly 'Bar, Version=x.x.x.2000,
 Culture=neutral, PublicKeyToken=YXYXYXYXXYX' or one of its
 dependencies. The located assembly's manifest definition does not match the
 assembly reference. (Exception from HRESULT: 0x80131040)

Shouldn't Foo use Bar(x.x.x.1000) since specific version is set to False or am I missing something?

Maybe I didn't get how specific version really works.

There are some other questions about Specific Version References on stackoverflow but none of it was a help to me.

+2  A: 

"Specific Version" is a build-time property directing the compiler to use the available version. At run-time, the framework still looks for the specific version of the assembly that was used at build time.

See this forum discussion: http://forums.asp.net/t/1251728.aspx

NYSystemsAnalyst
Thanks, now it's clear
dkson