0

I have an assembly of a library project, That Had the dll version number 2.0.0 and I changed it to 2.1.0.0 by clicking right over project -> properties -> application -> Assembly Information ... here I've changed Assembly Version and File Version.

Now, the problem is That after the modification, when i try to reference this dll in another solution, i get the error: Can not load file or assembly 'MyAssembly, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = 78ffe0bb48d8c173'

Anyone knows why is it Asking for version = 2.0.0.0 if I changed it to 2.1.0.0?

Thanks

Bo Persson
  • 90,663
  • 31
  • 146
  • 203

1 Answers1

0

Your project file saves the version of the dll you're referencing:

<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
    <HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
    <Private>True</Private>
</Reference>

If you don't want it to use a specific version, you can set the 'Specific Version' to false in Visual Studio (in the properties section of the dll in the reference list)

You also might want to look at this to decide if you actually want to increment your assembly version.

Community
  • 1
  • 1
Howwie
  • 275
  • 1
  • 7