#1
|
|||
|
|||
questions using the object model
I am writing a .NET application to interface with Visual Build using its API. I have been looking through the object model reference and it has been slightly helpful. If there is a place that has more details, please let me know.
one issue that i am currently having is that the object model reference says that the Project object has a Steps object. But when i reference the VisBuildSvr library in my .NET app, when i come to the Application.Project object, a Steps object does not exist. All the other objects (such as Scripts) exist, but that doesn't. Any reason why? Application x = new ApplicationClass(); x.Project.Load(@"C:\Working\RealtyTrac\Visual Build Scripts\SEOFactory-Build.bld"); x.Project.Steps[x.Project.FindStep("Get Latest SEOFactory",StepTypeEnum.vbldStepMain,-1)] //This line won't compile. Another issue i am having is building the project. I try the following code, but nothing happens: Application x = new ApplicationClass(); BuilderClass builder = new BuilderClass(); x.Project.Load(@"C:\Working\RealtyTrac\Visual Build Scripts\SEOFactory-Build.bld"); builder.Initialize(x); builder.Start(StepTypeEnum.vbldStepMain,1,0); |
#2
|
|||
|
|||
Regarding the first question:
http://www.kinook.com/Forum/showthread.php?threadid=407 For the second question, the step index is 0-based, so the 2nd parameter should be 0 to start at the first project step. Are you sure that nothing is happening? Do you have file logging enabled? |
#3
|
|||
|
|||
thanks for the quick reply. That first issue is gone thanks to your reference.
As for the second, i turned on logging, and i found the following exception on the first step. Any ideas? <vault> <error> Invalid File or Directory attributes value. </error> <exception> System.ArgumentException: Invalid File or Directory attributes value. at System.IO.File.SetAttributes(String path, FileAttributes fileAttributes) at VaultClientOperationsLib.ClientInstance.ProcessFil e_NonWorkingFolder(String tempFile, VaultClientFile file, VaultResponseGetFile response, String ancestorFullPath, String ancestorDiskPath, SetFileTimeType setFileTime, MakeWritableType makeWritable, MergeType merge, OverwritePrompt PromptData) at VaultClientOperationsLib.ClientInstance.ProcessGet FileRequests(GetFileInfo[] infos, MakeWritableType makeWritable, SetFileTimeType setFileTime, MergeType merge, Boolean updateHiddenFilesOnly, String ancestorFullPath, Boolean flat, String ancestorDiskPath, OverwritePrompt PromptData, Boolean isLabelGet, String currentPathToLabelItem, Int64 labelID, Boolean isRetry) at VaultClientOperationsLib.ClientInstance.GetToNonWo rkingFolder(VaultClientFile[] files, Boolean forceLatest, Boolean overwrite, MakeWritableType makeWritable, SetFileTimeType setFileTime, String ancestorFullPath, String ancestorDiskPath, OverwritePrompt PromptData) at VaultClientOperationsLib.ClientInstance.GetToNonWo rkingFolder(VaultClientFolder folder, Boolean recursive, Boolean forceLatest, Boolean overwrite, MakeWritableType makeWritable, SetFileTimeType setFileTime, String ancestorDiskPath, OverwritePrompt PromptData) at VaultCmdLineClient.VaultCmdLineClient.ProcessComma ndGet(ArrayList strItemArray) at VaultCmdLineClient.VaultCmdLineClient.ProcessComma nd(Args curArg) at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args) </exception> <result success="no" /> </vault> |
#4
|
|||
|
|||
It looks like Vault doesn't like that parameters being passed. Try checking the 'Show command-line...' checkbox on the Options tab and rebuild the step. You could provide that info to SourceGear support if the problem is not obvious.
|
|
|