Manually adding / removing files: EnvDTE vs Microsoft.Build

Topics: General
Aug 12, 2014 at 11:53 AM
I need to manually add and remove some files to the project on package installation / uninstallation.
I can easily add and remove the files using the MSBuild API. Unfortunately this seems not well to sync with changes on the the project object, resulting that Visual Studio asks the user if he wants to reload the project (on uninstallation there are even changes in the vs project and changes on the file, resulting in a conflict).
I tried to reload the project in the visual studio project but there seems to be an open issue with this (https://nuget.codeplex.com/workitem/3925).
Using EnvDTE might be a solution but results in much more complicated code, since I need to add/remove files recursively through a folder structure.

What is the suggested way to handle manual adding / removing of files?