0

i am creating a custom wizard, i want to create a folder inside my project and add some files into this folder. i used this codes

Project project = _dte.Solution.Projects.Item(1);
project.ProjectItems.AddFolder("Common");

but i get a null refrence exception.

can someone tell me how i can create a folder for my project?

Chibako
  • 47
  • 4
  • I have done it in the template (you just create the folder structure you want ahead, when you prepare the template). Is there a reason you are trying to do it programmatically? Also, which object is null? – Nikolay Aug 19 '23 at 18:51
  • @Nikolay i dont know which object is null vs is show a wizard.cs file which is built in class, also i fixed issue with AddToDirectory – Chibako Aug 19 '23 at 19:46
  • You can use debugger, lol. Meaning, you can debug one instance of Visual Studio from another. Including stepping through your wizard in debugger. – Nikolay Aug 20 '23 at 01:11

0 Answers0