rsdn/nemerle — pull request #349 by ionoy (2012-05-22 07:11:41+00:00)
Title: Fixed visual studio crash, when right clicking on folder in ASP.NET MVC 4 project

Previous implementation of OAFolderItem contained a bug, which caused StackOverflowException when some code tried to access hierarchy from bottom to top. There is a proper explanation here:
http://www.mztools.com/articles/2007/mz2007031.aspx

In our case Microsoft.VisualStudio.Web.Mvc.Extensibility.ProjectFolder.RelativePath caused SOE because it was accessing Node.Collection.Parent recursively. And this Parent was always the same folder i.e. Node.Collection.Parent.Collection.Parent.Collection...

The problem is: I'm still not sure about correct implementation of Collection and ProjectItems properties, because even though original implementation causes a crash, it is widely used in other projects I found in google.

I tested new implementation a little, and seems like ProjectFolder.RelativePath returns correct path now, regardless of hierarchy used.