1

I've been trying to update my Ninject not to meet this bug and I wasn't able to figure out what version of Ninject.Web.Common I have.

Here's a line from packages.config

package id="Ninject.Web.Common" version="3.2.3.0" ...

However, the csproj contains the following line

Reference Include="Ninject.Web.Common, Version=3.2.0.0 ..."

What exactly does the reference version here means?

Community
  • 1
  • 1
Vlad Stryapko
  • 1,035
  • 11
  • 29

1 Answers1

2

The version in packages.config is the version nuget will fetch from the server. So when you run nuget restore this will be the version that is downloaded.

The second one is the version that your assembly is searching for at runtime. If you don't load your dependencies from GAC the version will be ignored. Only if your application loads its assemblies from GAC the version will taken into account and the CLR tried to find the assembly with the specified version. Because in the GAC multiple versions of the same assembly can exist.

Have a look at this Question for details about compile time dependencies.

Community
  • 1
  • 1
Kolja
  • 2,307
  • 15
  • 23