Hi,
I'm running CruiseControl for my builds, and as part of that I am using NAnt tasks for Vault to checkout, get, checkin files.
Everything works fine when I set the CruiseControl service to login as myself. However, when I set the service to run as a local admin account, I get a NullReferenceException when trying to get a file. The stack trace is as follows:
at VaultClientOperationsLib.WorkingFolder.GetHashedPathName(String path)
at VaultClientOperationsLib.WorkingFolder.HasWorkingFolderData(String diskFolderPath, Boolean lookInWorkingFolder, TreeCache treeCache)
at VaultClientOperationsLib.ClientInstance.CreateGetFileRequests(VaultClientFile[] files, Boolean forceLatest, Boolean forceDisplayVersion, Boolean dontCheckWorkingFolders, MakeWritableType makeWritable, Boolean isLabelGet, String labelSubItemPath, Boolean isLabelGetForSingleFile)
at VaultClientOperationsLib.ClientInstance.Get(VaultClientFile[] files, Boolean forceLatest, MakeWritableType makeWritable, SetFileTimeType setFileTime, MergeType merge, OverwritePrompt PromptData)
at VaultClientOperationsLib.ClientInstance.Get(VaultClientFile file, Boolean forceLatest, MakeWritableType makeWritable, SetFileTimeType setFileTime, MergeType merge, OverwritePrompt PromptData)
at NAnt.Contrib.Tasks.SourceGearVault.VaultCheckOut.CheckOut(String fileName)
Here is the code being run:
VaultClientFile vaultClientFile = ClientInstance.TreeCache.Repository.Root.FindFileRecursive( normalizedPath );
ClientInstance.CheckOut( vaultClientFile, VaultCheckOutType.CheckOut, Comment );
ClientInstance.Get( vaultClientFile, true, MakeWritableType.MakeAllFilesWritable, SetFileTimeType.Current, MergeType.OverwriteWorkingCopy, null );
The ClientInstance.CheckOut works (I see the file checked out in Vault), and the NullReference mentioned above is while running ClientInstance.Get. I'm not sure what is occuring in VaultClientOperationsLib.WorkingFolder.GetHashedPathName that depends on who the CruiseControl.NET service is running as. Any ideas on what the problem might be (or what the method is trying to do to point me in the right direction)?
Any help is appreciated.
Thanks,
Amol
NullReferenceException when using API to Get file
Moderator: SourceGear