Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-17-2006, 01:14 PM
realtytrac realtytrac is online now
Registered User
 
Join Date: 04-17-2006
Posts: 16
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);
Reply With Quote
  #2  
Old 04-17-2006, 03:22 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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?
Reply With Quote
  #3  
Old 04-17-2006, 03:47 PM
realtytrac realtytrac is online now
Registered User
 
Join Date: 04-17-2006
Posts: 16
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>
Reply With Quote
  #4  
Old 04-17-2006, 06:20 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 09:34 PM.


Copyright © 1999-2023 Kinook Software, Inc.