samedi 26 décembre 2015

How to resolve assembly version references conflict easily and what are the best practices

I know this has been discussed for individual scenarios, but as a novice to web development I feel it is ok to ask. I started learn web in .Net platform, then I felt that it is a nightmare to resolve conflicts related to assembly references if you are using old applications.

For example when I try to learn through an online course which had sample files, but most of them had old version numbers for assemblies used (eg - Web.Mvc, Web. System.Web.WebPages, System.Web.WebPages.Razor). So I had to go and load the newest assemblies first from Nuget ( I do not know how to load an old version with nuget gui client. maybe have to try in command prompt) and then correct each and every place in .config files (web.config) to use those versions.

I think this is not a good approach when migrating a large application or try to use old applications in a new VS IDE.

I have few questions

  1. I would like to know what are the ways of resolving assembly version mismatches?

  2. What is the use of public key token specified in references. Although I changed version no I did not change the public key. But they worked. What is the connection between each assembly and public keys?

  3. What are the best practices when using such assembly information .config files where we can easily move the application between different machines/servers with different versions(probably a higher version).




Aucun commentaire:

Enregistrer un commentaire