Content dependentupon

Apr 6, 2011 at 2:37 PM

I'm adding some content files in a NuGet package. It is basically a WinForms dialog.

Bascially there are three files. "FacebookLoginDialog.cs", "FacebookLoginDialog.Designer.cs" and "FacebookLoginDialog.resx".

Currently when I add these 3 files using InstallPackage, the layout in the solution explorer is

|
|--- FacebookLoginDialog.cs
|--- FacebookLoginDailog.Designeder.cs
|--- FacebookLoginDialog.resx

But I want it to be

|
|--- FacebookLoginDialog.cs
     |--- FacebookLoginDailog.Designeder.cs
     |--- FacebookLoginDialog.resx

This is done by using <DependentUpon>

<Compile Include="FacebookLoginDialog.Designer.cs">
      <DependentUpon>FacebookLoginDialog.cs</DependentUpon>
</Compile>

 How can I do it using Install.ps1 script?

Thanks.

prabir


Coordinator
Apr 6, 2011 at 4:55 PM

You can probably automate the $dte to do it. I don’t have the code handy to do that. We’re considering a PS function to help with this in this bug: http://nuget.codeplex.com/workitem/435

Phil

Apr 6, 2011 at 5:01 PM

we would need to use dte for it. need to do something with ProjectItems

The PS helper function seems a great idea to ease the development.

thanks.