index > Visual Studio Guidance Automation Toolkit > Get Full Path for Project Item...

Get Full Path for Project Item...

I am trying to write a reference that specifies (among other things) that an item can only be added to either a very particular folder (i got this part by checking the ProjectItem.Name property) OR any folder contained within it. Im having a hard time getting this second part to work. I tried using the Path.GetFullPath() on the ProjectItem to be able to analyze the string returned to see if I am nested inside my particular folder, but this doesnt seem to work as the Path.GetFullPath() call returns back a path to the debug folder....

probably a simple enough question, but Im sick of fighting with it so please help!

thanks in advance.



samm
smartindale
ProjectItem.Properties.Item("FullPath") I believe.
Then you just need to check that the item full path starts with the directory you want to ensure is the parent.



Daniel Cazzulino [Solutions Architect MVP]
kzu
cool... thank you.





samm
smartindale
Actually, Im sorry... took me a day or two to get around to coming back to put this back in (i was using get_FileNames(0) just to get it working until i got a response).

putting in your code, i get the error that Properties threw a 'NotImplementedException'

please advise.

thanks



samm
smartindale
If get_FileNames(1) gives you a valid value, then it should be OK.
Note that all DTE collections indexes start at 1 :S



Daniel Cazzulino [Solutions Architect MVP]
kzu
reply 5

You can use google to search for other answers

 

More Articles

• Project templates do not appear in VS 2005 Pro after installing G...
• Can instal GAT (and MobileClient! ;( )
• Building a first Guidance Package
• Reality Check?
• Can we checkout file under ClearCase as SourceControl programmact...
• configured attribute T3 - no property on action
• TechEd excercise Improving Code Quality of a Code Template
• Can't download GAT, GAX?
• Download not available
• Added project reference not reflected
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Can you build a guidance package in VB?
• Reality Check?
• Declaratively determining if an action r
• How is GAT Package information persisted?
• Tom, I see what has been keeping you bus
• Can't Drag Controls onto CustomWizPages
• Can we checkout file under ClearCase as
• Type of Document objects retrieved from
• How can you skip the UI when you run a r
• Conditional Branching of Recipe Actions
• GAT fails to install, claims GAX is miss
• Error installing GAX
• Another installation error
• How to get SysListView32 of hiding objec
• Can instal GAT (and MobileClient! ;( )

Hot Articles

• Multiple Project Creation Template
• IExtenderProvider the GAT way...
• Code Snippets not uninstalling
• Error install GAX
• Exception thrown on Register SCSF
• configured attribute T3 - no property o
• CommandBars
• Alter Name of Solution
• Calling a recipe inside another recipe???
• How can I Organize templates in the &quo
• Minor bug in VszWizard.FindAddItem
• Custom UnfoldTemplate
• TechEd excercise Improving Code Quality
• GAT breaking changes
• RegexMatchStringConverter

Recommend Articles

• Not able to create a new Guidance Packag
• How to add template menu item to custom
• How to execute actions after solution te
• Guidance Automation Extensions and Toolk
• Cannot install GAX/GAT June 2006 CTP
• Using IAssetReferenceService
• Problem with Specifying Command Bars
• How to generate class file from t4 templ
• uninstall of HoLPackageSetup.msi failed
• New Editor or Not?
• Getting the project object after Add New
• how begin?.. please help, I'm lost
• Fail to register Guidance Package from S
• Cannot install GAT or any other guidance
• Error installing GAX