Okay, I had this error that I posted about a couple days ago…CCNet was throwing an UnauthorizedAccessException when it was trying to build.  I have solved that problem.

Let me just say, Lutz's Reflector is an awesome tool and a must-have for any developer’s toolbox.  I’ve had it around, but never really done anything with it.  So…at my wit’s end…I loaded the CruiseControl assemblies into Reflector, went to the offending method (ThoughtWorks.CruiseControl.Core.Sourcecontrol.Vss.GetSource()) and looked inside.

The first thing in the method checks for autoGetSource to be true, then it goes and looks for workingDirectory, then it goes and tries to do some directory magic.  Well, I had set in ccnet.config the autoGetSource attribute to true.  But I had not set the workingDirectory.  According to the documentation the workingDirectory setting is optional…and it is…until you set autoGetSource to true…then it appears to be pretty much required.  Or at least the file magic didn’t work on my setup until I set the working directory explicitly.

With that set up, the builds are running again.  Next thing to figure out…why doesn’t ccnet find my changes if I check in a single file, it only finds modifications if I check in the project or solution file.  Is that a sympton of the history command for sourcesafe?  Then I gotta figure out the ccservice credentials issue.  Also, even though I have ccservice set up to run automatic in the service control panel, it does not start automatically.  What’s up with that?


Tags: