I’m trying to add a file to a Visual Studio “Solution Items” folder, using a Project Template Wizard. I’m able to create the folder itself, but when I add a file, it doesn’t do anything.
My code (executed from ProjectFinishedGenerating) is
fullPath = @"path_to_existing_file";
_solutionFolder.AddFromFile(fullPath);
Where _solutionFolder is a Project instance corresponding the the solution folder.
I hit the same snag. You need to add it to the ProjectItems:
Note, I haven’t tried the above code. I’m adapting it from my code (which runs in an AddIn):