NotImplemetedException while trying to add a folder to a project in C#.

  • Thread starter rodica via DotNetMonster.com
  • Start date
R

rodica via DotNetMonster.com

Hello,

I have a problem while trying to add a folder to a project in C#.
An exception NotImplementedException is thrown every time I call one of the
function bellow.

Here the code:
DTE.Solution.Projects.Item(1).ProjectItems.AddFromDirectory (@"C:\Perl");

I get the same error with this function as well:
DTE.Solution.Projects.Item(1).ProjectItems.AddFolder("Hello_World", Constants.
vsProjectItemKindPhysicalFolder);

Can someone help?

Thanks!
 
R

rodica via DotNetMonster.com

Does anyone has any idea on how to add a folder to a project in C#?
 
K

Kevin Spencer

Yes, this indicates that the method has been stubbed out but not yet
implemented by the developer. In this case, a Microsoft developer.
Hopefully, by RTM, they will all BE implementd!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
R

rodica via DotNetMonster.com

Kevin,

Thanks for your answer.

I have finally succeded to a add a folder to my project with some tricks.

My project is a VCProject, so I have used this:

VCFilter vcfilter = (VCFilter) vcproj.AddFilter("Hello_World");\

And then I add files in this folder as follows:
vcfilter.AddFile("Hello_World/newfile.h");

Rodica
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top