Visual Studio .NET Macro for nesting project items
tag : Visual studio
comment : 5
This macro enables you to nest project items inside Visual Studio .NET. Until now, there is no easy way to nest project items through the Visual Studio IDE, you can only do it by manipulating the project (.csproj or .vbproj) file and adding the DependentUpon element.

Inside the IStaySharp.vsmacros file there is a macro called ‘Create Dependency’ which allows you to nest two selected items. I have even created a video to illustrate how to configure and use the macro.
Social Share
5 Comments
Leave a Reply
You must be logged in to post a comment.

Hello p0l, a while ago I read the following blog post:
http://extraview.co.uk/blog/PermaLink,guid,689818e8-817e-49d1-a33f-47decffa1700.aspx
Which shows you how to associate a .js file with a .aspx which was very interesting. Does your macro support this is well?
Yes, the macro is not bound to any file extension and/or file structure.
Thanks, I needed this.
I’ve been trying to figure out for months why this doesn’t just work automatically with files named in certain patterns indicating partial class usage (Class1.cs, Class1.Static.cs). At least now I have a way to do it manually.
How would you about doing the reverse?
Removing the dependency using a Macro?
@Michael Norton,
you can use @http://mokosh.co.uk/vscommands/@vscommands addin from http://mokosh.co.uk/vscommands/ to do both nesting and unnesting.