Ever had the need to update a release with a minor change to one dll? These steps allow you to update a single dll in a installation from msi etc. Note that all steps are necessary to avoid problems with mismatch in dll references, manifests etc. Trying to update a single dll without these steps normally results in the following error:
Could not load file or assembly MyAssembly, Version=126.96.36.199, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
To avoid these kind of problems you have to make sure your dll's have the correct versions, and that all references are to the correct versions of all the assemblies (Normal problem whene using "1.0.*" as AssemblyVersion"
- Open you Visual Studio solution for the point of the release or todays date if there are no or few changes in the dll you want to update.
- Add you fix or change to your source code
- Go to references in the project you want to update (called project A)
- Delete all the references to projects in your solution (remember the names)
- Copy the same dll's from step 3 som programfiles or wherever you have the release installed. Copy the dll's to the bin/release folder of project A.
- Re-add the references, but now from the bin/release folder of project A
- Go to program files of wherever you have the release installed. Right click "project A.dll" choose Properties->Details note the version number
- Open AssemblyInfo.cs of project A and set AssemblyVersion you found in step 6.
- Build project A in Visual Studio
- Copy project A.dll from bin/release to the location of your installed release
- There you have it, your release with a single updated dll