It's all about the answers!

Ask a question

How do I programmatically find the UUID for a Workspace

Andrew Soloninka (5511924) | asked Feb 15 '13, 11:03 a.m.
I am creating an extension in which I need to create a new Workspace and then attach that Workspace to a Build Definition. I can create the Workspace but I can't figure out how to find the UUID so it can be added to the Build Definition. 

When I create the Workspace from the Workspace Manager, I get an object that implements IWorkspaceConnection. If I have an object the implements IWorkspace I can get the UUID of the Workspace. However, if I cast the object that I get from the Workspace Manager to IWorkspace I get a Class Cast exception.

Accepted answer

permanent link
Tim Mok (6.6k38) | answered Feb 15 '13, 11:16 a.m.
You can get the IWorkspace by calling #getResolvedWorkspace() on your IWorkspaceConnection.
Andrew Soloninka selected this answer as the correct answer

Andrew Soloninka commented Feb 15 '13, 4:12 p.m.

Tim, Thanks, It worked 

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.