locked
Could not load file or assembly.....The located assembly's manifest definition does not match the assembly reference Eventhough I set the specific version property to false RRS feed

  • Question

  • Hi All,

    I have managed dll(class library dll) which is referenced in asp.net web application. The specific version property is set to false. Still if I use other version of same dll then I see the above mentioned error. e.g. suppose the web application is compiled with dll version 2.0.0.8. Published pages work fine as long as there is dll(2.0.0.8) in bin folder. If I put the dll of version 2.0.0.9 then I got the error(eventhough specific version is set to false). I want web application work regardless the version of dll.

    Any ideas, suggestions will be appreciated

    Thanks,

    Monday, August 1, 2011 7:35 PM

Answers

  • Hi hitesh14,

    Specific version doesn't work this way. By setting this property to true, it will use the specific version when you build your project and shows a warning when the version is not correct. Otherwise it will just grab the current version.

    After your application is build, specific version won't make any difference.

    See this article for more information.

    You can re-build your application after the version of a referenced assembly changes. Otherwise, you need to load the assembly at runtime.

    See here for more information.

    Hope this helps.

    Best regards,


    Min Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, August 5, 2011 8:40 AM