I have a VB.NET project in Visual Studio 2010 for an Excel Add-In.
I use the “My” namespace, and in general it seems that the “My Project” folder contains configuration information about the project.
My problem is that I need to change the name of this folder, because my version manager system won’t accept spaces in file or folder names.
Is it possible? If yes, how?
Edit: There is a hacky way to do it, by renaming the folder and changing all references in the .vbproj file. However, the may work for a command line generation, but it won’t work the next time the project will be opened in Visual Studio. The IDE will create a new “My Project” folder, and complain that it can’t find the settings in it.
I’m looking for a way to rename it so that Visual Studio would accept it correctly.
In fact it is possible, but seems to be undocumented.
Open the project file (*.vbproj) in a text editor, and add the following line inside the first
<PropertyGroup>element:Now when Visual Studio regenerates the folder, it will call it “NewName”, and anything it generates that it would put in My Project (such as AssemblyInfo.vb) will be put there.
You can then move (in Explorer, not Visual Studio) the contents of “My Project” to that folder, delete “My Project”, and everything should work as expected.