So in some cases, like when building WPF windows/user-controls and what not certain file types like .xaml
and .cs
get combined into "one" file (the .cs
file is placed underneath the .xaml
).
The problem is that I know this guy that accidentally unbound the two files from each other, and I'm wondering if there is a way to help him put them back together again (or if there is a way to join files like this in general).
In the project file (.csproj) edit it like
<Content Include="Default.js">
<DependentUpon>Default.aspx</DependentUpon>
</Content>
Eg use the DependentUpon element to nest the file.
See http://davefancher.com/2012/02/23/nesting-files-in-visual-studio/
If you simply want a way to right click on the file in Solution Explorer in Visual Studio and move it under another file there is an easy way to enable this.
Now you can select a group of files in Visual Studio Solution Explorer, right click on them, and "File Nesting" is an option on the menu. It will also enable "auto-nesting" for particular types of files.
I am not associated with Mads but their solution worked will for me.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.