RationalDev

more of an aspiration than a claim

Post Build Install to GAC / Code Not Recompiling

If you are using Sharepoint or something where you need to have DLLs in the GAC for development you can put the following in the “Post-build event command line:” section of Build Events in the project settings:

if NOT $(ConfigurationName) == Release "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe" /u "$(TargetName)"

if NOT $(ConfigurationName) == Release "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe" /i "$(TargetPath)"

If you are changing your code and it is not updating, the reason could be that your development runtime is looking at the GAC version. This will keep them in sync.

Breakpoints will also stop working and step in debugging will stop working if the GAC and your development version are not in sync.