Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Custom Item Template Dependent Upon

I'm writing my own custom item template for use within visual studio. All is well except I need to find a way to get one of the files in the template to be dependent upon another.

In a csproj file it would look like this

<Compile Include="Class1.cs">
    <DependentUpon>Class1.xml</DependentUpon>
</Compile>

Does anybody have any idea how I would define this in the vstemplate file?

Thanks

like image 893
mat-mcloughlin Avatar asked Nov 11 '10 12:11

mat-mcloughlin


1 Answers

<ProjectItem SubType="Code" TargetFileName="$fileinputname$.cs" ReplaceParameters="true">Test.cs</ProjectItem>
<ProjectItem SubType="Code" TargetFileName="$fileinputname$.cs\$fileinputname$Dependent.cs" ReplaceParameters="true">TestDependent.cs</ProjectItem>
like image 188
Yasin Kilicdere Avatar answered Sep 20 '22 00:09

Yasin Kilicdere