开发者

Link against non specific version of an assembly?

开发者 https://www.devze.com 2022-12-16 10:03 出处:网络
I\'m getting an error like this in an application, Could not load file or assembly \'MySql.Data, Version=6.2.2.0,

I'm getting an error like this in an application,

Could not load file or assembly 'MySql.Data, Version=6.2.2.0, Culture=neutral,PublicKeyToken=c5687fc889699c44d' or one of its depedencies. The located assembly's manifest defenition does not match the assembly reference.

Which is expected, as this installation happened to have a prev开发者_如何学Goious version of the .dll installed.

Can I tell(in Vs2008) to link to this MySQL.data.dll and not care about its version ? The MYSQL.data.dll reference within the project has a property named "Specific Version", although setting it to false yields no difference.

I'm well aware of the implication if this .dll is binary incompatible with the one required.


SpecificVersion can't solve your problem, that only works at compile time. You ought to rebuild your program for a minimum of surprises. Or you can use the <bindingRedirect> element in the .exe.config file.


Yes, you can. Select the referenced dll, and in the property windows set 'specific version' to False.

0

精彩评论

暂无评论...
验证码 换一张
取 消