blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

Merrick Chaffer's Blog

Accessing area paths created in code in TFS

Looks like if you create area paths in code, then you can’t access them straight away from the item.Project.AreaRootNodes property, but have to go back up to the Store for the item, and look at its Projects collection…

workItem.Project.AreaRootNodes.Count

0

workItem.Store.Projects[item.Project.Name].AreaRootNodes.Count

2

Even though these two statements above you would have thought, would return the same thing.

...a while later... bit of debugging, and discovered...

workItem.Store.RefreshCache();

and

workItem.Store.SyncToCache();

seem to fix the area paths not being available until one is saved, even with the Store.Projects way of accessing the area root nodes.

 ...see this link for more information...

http://msdn2.microsoft.com/en-us/library/bb130325(VS.80).aspx#

Published 13 February 2007 17:44 by merrick.chaffer

Comments

No Comments
Anonymous comments are disabled
Powered by Community Server (Personal Edition), by Telligent Systems