Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Unbound reference to a filetype
 

Unbound reference to a filetype

Hi there,

I've created a reference class that returns true for isEnabledFor if the target is a file with a certain extension. What I'm finding though when debugging, is that the my reference class isnt being called when I right click on a file. It only seems to be executed when I right click on a project in my solution explorer. Have I missed something? Do I need to set something somewhere for it to execute my reference class when I right click on something other than a project?


Code Snippet

<Recipe Name="BindingRecipe">
<Types>
<TypeAlias Name="RefCreator" Type="Microsoft.Practices.RecipeFramework.Library.Actions.CreateUnboundReferenceAction, Microsoft.Practices.RecipeFramework.Library"/>
</Types>
<Caption>Creates unbound references to the guidance package</Caption>
<Actions>
<Action Name="UnboundT4Template" Type="RefCreator" AssetName="GenerateClassT4"
ReferenceType="Test.Tester.References.XMLFileReference, myTest" />
</Actions>
</Recipe>



This was just using the recipe that came with the sample guidance solution using a file-chooser, but I'd prefer if they could just right click on the file and have it execute on it.
Ben Scott - Aust  Friday, September 21, 2007 12:39 AM
Ahh, should have kept looking a little longer. I needed to change the actual recipe as well. Works fine now Smile.

Code Snippet

<Recipe Name="GenerateClassT4" Bound="false">
<xi:include href="TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<Caption>Do stuff with XML</Caption>
<HostData>
<Icon ID="689" />
<CommandBar Name="Item" />
</HostData>
...
Ben Scott - Aust  Friday, September 21, 2007 1:29 AM
Ahh, should have kept looking a little longer. I needed to change the actual recipe as well. Works fine now Smile.

Code Snippet

<Recipe Name="GenerateClassT4" Bound="false">
<xi:include href="TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<Caption>Do stuff with XML</Caption>
<HostData>
<Icon ID="689" />
<CommandBar Name="Item" />
</HostData>
...
Ben Scott - Aust  Friday, September 21, 2007 1:29 AM

You can use google to search for other answers

Custom Search

More Threads

• Access Denied error on Install of Feb GAT
• Unable to load type System.Collections.Generic.Dictionary
• Custom Guidance Package - Auto enable WCF Gudiance Package?
• Processing T4 in different languages
• Copy items for BizTalk project fails
• Microsoft.VisualStudio.TextTemplating 8.2
• Binding error (?) using Smart Client Software Factory
• SFT WiX Setup not including custom assemblies used by Guidance Package
• The file cannot be opened with the selected editor
• VSTS 2008 - installed GAX but GAT fails: C# Language is not installed