Quick Deploy - Copy to GAC

Sep 29, 2011 at 1:20 PM

I love CKSDev tools.  Just putting that out there right off the bat.  I'm wondering why we can't use a key combo to Package and copy to Gac in one step.  Sometimes, once I've waited for my package to finish compiling, I forget to "copy to Gac" with CKSdev. 

Can CKSdev determine if any compilable (vb/cs/whatev) files have changed since last time the dll was compiled and if they have, package the project before copying to the gac/bin ?

I would think it'd be easy enough to determine, using file dates, the age of the compilable files in the project.  Look at the date of the /bin/debug or release/namedProjectPackage.dll   and just see if any compilable files in the project are newer... if so, compile the package before doing the copy to gac/bin.

Whaddya say?

Nov 2, 2011 at 10:03 PM

An interesting idea....

Copy to GAC takes the current dll from the output directory and pushes it into the GAC so how often is the combination of 'build' and GAC used? And also combining the actions could hinder those who don't have compiling code but still want to GAC the last working copy.

So interested to see if having a new option that does both rather than changing the existing is the better option?

As far as the internals here's an overview of what it would be doing:

  • Traverse every file in the project
  • Compare the time stamp to the output dll
  • First one found newer invokes the build of the dll
  • On successful build the copy to GAC/Bin is invoked

Let me know what you think.




Nov 3, 2011 at 11:52 AM

Thanks for the reply and for further fleshing out the idea.  I agree it's a bit assumptive that our code is in a compilable state when we want to push a dll to the GAC, so splitting this option off into a new function could be an option.  It does bloat the menu a bit, since "Copy Both" and "Copy to GAC" would both need the "Build and" sibling.

Another option is to create a setting in the project properties panel like "Ensure Latest Build on Copy to GAC" - (Yes/No).  which can do the same logic we're talking about, but then limits the context menu by not needing the "Build and..." items there as well.

Nov 3, 2011 at 9:41 PM

We already have a project setting which will copy the dll to GAC on successful build. Check the properties window with the project selected (the small one not the tabbed pages)