I am using EnvDTE to add projects and files to existing solution. I do it like that:
SolutionFolder folder = GetExistingSolutionFolder(folderTree);
if(folder != null)
folder.Parent.ProjectItems.AddFromFile(filePath);
Nevermind the GetExistingSolutionFolder. It all works. But... When I try to add .docx file to solution, it is indeed added, but it is also opened in MsWord. And when I add .rc file to solution, it is checked against files that are provided inside rc file. If there is no file on the disk, a message is thrown.
So, my question is - can I somehow add the files silently? Without automaticaly open docx in MsWord or not checking rc files?