Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force a .dll to change it's version?

I got weird problem. I got an asp.net mvc 3 application that uses ninject version 2.0 but I want to upgrade it to version 2.2. but everytime I remove it and add the new .dll it keeps telling I am still using version version 2.0. and I have no clue why.

I don't know where it is getting that number from. I made a blank asp.net mvc application and added the new version and it says it is version 2.2.

So why does my application keep thinking everything I give it is version 2.0?

Another thing.

It's thinks the run time version is v2.0.50727 the one in my test application has v4.0.30319

like image 462
chobo2 Avatar asked Nov 19 '25 23:11

chobo2


1 Answers

Open up the project file in a texteditor and make sure that the reference is correct. Remove any HintPath tag if it's present.

If this do not work, try checking the location of the loaded assembly.

string location = typeof(TypeInNinjectAssembly).Assembly.Location
like image 162
Patrik Svensson Avatar answered Nov 21 '25 11:11

Patrik Svensson