I am developing an add-in.
So far it is working, but a small improvement is proving elusive.
The add-in basically creates special class/struct files from SQL server table definitions, this is working well.
But right now it adds the files to the project root, and they appear and work fine.
But I want organize this a bit better and put these files into a project sub folder "Data Defintions".
Obvioulsy it that exists already I want to use it, if not then I want to create it and use it.
Well I create the folder OK, but the files
still appear within the project root itself and
not the new sub folder.
I create the folder using:
sub_folder = active_project.ProjectItems.AddFolder("Data Definitions",Constants.vsProjectItemKindPhysicalFolder );
and I (try to) add the files with
sub_folder.ProjectItems.AddFromFile(file_dir + @"\" + names[X]); // Give the full path of file's contents.
After all this, I see a physical folder on disk, a folder icon in the project itself but the files are still written to the project root folder on disk and the project root folder in the IDE.
So the folder is there, but empty both the physical one and the IDE one.
Can anyone shed light on this behaviour?
Thx
Cap'n