A question in the MSDN VSX forum has reminded me that I had pending to write this article about how to add new project items (files) to a project or folder, either from a template or existing (and in turn copied or linked):
HOWTO: Create a project item from a Visual Studio add-in
http://www.mztools.com/articles/2014/MZ2014009.aspx
This article completes a series about using the automation model (EnvDTE) to create solutions, projects, projects inside folders, folders, project items and issues and bugs that you may encounter:
- HOWTO: Create a solution from a Visual Studio add-in
- HOWTO: Create a project from a Visual Studio add-in
- HOWTO: Create a project from a Visual Studio add-in inside a solution folder
- HOWTO: Create a project item from a Visual Studio add-in
- BUG: EnvDTE80.Solution2.GetProjectTemplate returns wrong template for ClassLibrary if Windows Phone SDK installed
- PRB: NotImplementedException adding a solution folder to a solution folder in Visual Studio from a macro or add-in
- PRB: Solution.AddXXX and ProjectItems.AddXXX methods return Nothing (null)