About Me

If life is all about change, motion and flow, I would be the one cruising past you on a SunDancer.

Monday, July 28, 2008

What is ResolveAssemblyReference.cache ?

WHAT: I am pretty sure everybody has come across scenarios, where you think something should work, based on the code changes you have made in visual studio, but they actually dont work...

Well of the many reasons, we found over the last couple of years, recently, i found one more to add to the list.

DETAILS: there is a file created by visual studio called ResolveAssemblyReference.cache, which is created by the newer versions of MSBUILD. The idea of this new feature is to be able to bind to the assembly version while debugging, without having to deploy/GAC the project at all.

If you are not satisfied with the code changes you made, you just have to roll back your code and need not rollback the assembly version which has been deployed/GACed on your system.

WHY did MS implement this?: Kindof like Debugging webpages from your visual studio without having IIS installed on your machine
or
Debug and run a SQL script from your visual studio without having SQL Server on your machine

Just that this functionality created problems for BTSDeploy command line utility, because it used the older version of the DLL that was manually deployed for the package.

SOLUTION: Withing your script, just ensure this cache file is deleted before you dig deeper on why your changes dont take effect.

NOTE: This file can be created only during Compile time not during deployment.