Hi all, I am getting a strange error that turned out very little through searching the internet. Inside a macro I get a reference to a VS solution folder, to which I need to add a child folder. I then call Project.ProjectItems.Addfolder("my folder name"), which is throwing a NotImplementedException. Even if I call the same method and pass some of the constants it can be provided with (both vsProjectItemKindVirtualFolder and vsProjectItemKindPhysicalFolder) it still fails. The only hits I got on this through Google was: http://www.themssforum.com/Csharp/Create-access-378071/ which doesn't actually have any mention of it when it displayed in my browser. However when I went to view source (maybe an IE issue?) I could see that someone had posted with the same error. Live Search gave me this: http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.package.automation.oanavigableprojectitems.addfolder.aspx but that looks like it was documentation for a beta version of VS or something. I'm using VS2008 and VSTS. Anyone have any ideas? Thanks!
It looks like you're calling AddFolder on a Project. Anways load this up in the debugger and browse around the live objects to see if there is a more appropriate object based on the solution itself. "Bardo" wrote in message news:em3zY3S8IHA.2348@TK2MSFTNGP06.phx.gbl... > Hi all, > > I am getting a strange error that turned out very little through searching > the internet. > Inside a macro I get a reference to a VS solution folder, to which I need > to add a child folder. I then call Project.ProjectItems.Addfolder("my > folder name"), which is throwing a NotImplementedException. > Even if I call the same method and pass some of the constants it can be > provided with (both vsProjectItemKindVirtualFolder and > vsProjectItemKindPhysicalFolder) it still fails. > > The only hits I got on this through Google was: > http://www.themssforum.com/Csharp/Create-access-378071/ > which doesn't actually have any mention of it when it displayed in my > browser. However when I went to view source (maybe an IE issue?) I could > see that someone had posted with the same error. > Live Search gave me this: > http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.package.automation.oanavigableprojectitems.addfolder.aspx > but that looks like it was documentation for a beta version of VS or > something. > > I'm using VS2008 and VSTS. > Anyone have any ideas? > > Thanks!
Same problem, adding the Kind argument stopped the exception: proj.ProjectItems.AddFolder("my folder name", Constants.vsProjectItemKindVirtualFolder) Constants.vsProjectItemKindVirtualFolder evaluates to the exact same key as the default Kind argument, but works... go figure. "Bardo" wrote: > Hi all, > > I am getting a strange error that turned out very little through searching > the internet. > Inside a macro I get a reference to a VS solution folder, to which I need to > add a child folder. I then call Project.ProjectItems.Addfolder("my folder > name"), which is throwing a NotImplementedException. > Even if I call the same method and pass some of the constants it can be > provided with (both vsProjectItemKindVirtualFolder and > vsProjectItemKindPhysicalFolder) it still fails. > > The only hits I got on this through Google was: > http://www.themssforum.com/Csharp/Create-access-378071/ > which doesn't actually have any mention of it when it displayed in my > browser. However when I went to view source (maybe an IE issue?) I could > see that someone had posted with the same error. > Live Search gave me this: > http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.package.automation.oanavigableprojectitems.addfolder.aspx > but that looks like it was documentation for a beta version of VS or > something. > > I'm using VS2008 and VSTS. > Anyone have any ideas? > > Thanks! > >