Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Include file with "Add as a link"
 

Include file with "Add as a link"

I'm in GAT/GAX-Programming for a few days, so please don't mind about my"stupid questions"...

I want to include a code-file in a project template as like you do with "add as a link".

So the file is stored somewhereoutside the project and I want to link this file from some projects of my solution. To be more concrete: it's a snk-file that contains a strong name key of Visual Studio.

The only way to add files to a template project that I know, is to physically include the file and make needed changes in the vstemplate and xxproj-file.

Is there a way tosolve my problem?

Thanks for your answers.

Greetings from Nuremberg, Germany

marco4  Tuesday, April 03, 2007 12:31 PM

Hi Marco

You have two way to achieve that you want,

the first option (I'm not sure if it's working well) is creating a vstemplate which as a csproj, and set the Link property for the projectitem. Here you've an example

<Compile Include="..\..\Shared\mysnk.key">
<Link>mysnk.key</Link>
</Compile>

The second option is adding the projectitems after that you've unfolded the solution, using the AddFromFile method, specifying whatever path outside the solution, it will set as link automatically.

Jose Escrich  Thursday, June 07, 2007 6:40 PM

Hi Marco

You have two way to achieve that you want,

the first option (I'm not sure if it's working well) is creating a vstemplate which as a csproj, and set the Link property for the projectitem. Here you've an example

<Compile Include="..\..\Shared\mysnk.key">
<Link>mysnk.key</Link>
</Compile>

The second option is adding the projectitems after that you've unfolded the solution, using the AddFromFile method, specifying whatever path outside the solution, it will set as link automatically.

Jose Escrich  Thursday, June 07, 2007 6:40 PM

You can use google to search for other answers

Custom Search

More Threads

• Guidance Automation and TFS
• GAT is VS Solution Centric
• Where to Report GAT Bugs or Suggestions?
• Argument Expansion - Unfold Template
• How to invoke GAT Recipes from XAML conetxt menu
• GAX/GAT Custom Menu won't update after second Build/Registration
• Action type??
• How to set focus on "No" button of the MsgBox in VB.NET
• installation problem in GAX
• Running recipe from another package?