views:

251

answers:

1

I am trying to rid my team's Visual Studio projects of "My Project" folders. None of my team is using custom settings or anything that would need to be stored in the "My Project" folder for any of our projects.

I have edited our .vbproj files with a text editor to remove any reference to "My Project", deleted "My Project" from disk, and ensured that no one has checked "My Project" or any of its files into version control. But when any of these projects is compiled, Visual Studio insists on autogenerating "My Project", re-creating the folder (just the folder, without any files inside) on disk and inserting a reference to that folder into the project.

(To clarify, when I say "a reference to that folder into the project", I mean that the .vbproj file contains the following text:

<ItemGroup>
  <Folder Include="My Project\" />
</ItemGroup>

and that text will not die no matter how many times I kill it.)

I suspect that the chain of events is that VS modifies the project to include the reference to the folder; then after the project is compiled the folder is generated because it is referenced. How then can I prevent Visual Studio from modifying project files to refer to this infernal folder?

A: 

Off the top of my head (this may be wrong though), are you guys possibly checking in the .suo file in the source control? Maybe there's a value in the .suo file that then makes the proj file update. Generally, try to kill all .suo files and see if this problem persists.

Shnitzel
A good suggestion, but there are no .suo files checked in and our SVN ignore pattern already includes *.suo.
Jerry Federspiel
maybe do a full text search in all files in your solution for 'My Project' it's gotta be something that's triggering it to act that way...
Shnitzel
However (facepalm) I do have a .suo locally. When I have time I'll check to see if this is it.
Jerry Federspiel