Hello,
We have written a VSPackage for providing source control operations on Solutions and Projects in Visual Studio 2005 and Visual Studio 2008 and we are now trying to have this package work for Visual Studio 2010.
When our users create a new project that contains a Solution and the Project, our code requires us to rename the project folder containing the Visual Studio Project by using the System.IO.Directory class method Move(stirng sourceDirName, string destDirName).
However, it seems that once you create the Solution and Project and they are opened in the Visual Studio IDE, Visual Studio locks the project folder so it cannot be renamed. We believe that Visual Studio may be starting a separate or hidden process that
is preventing us from renaming the project folder because it is somehow being used by some separate process. but we are not positive.
We also tried to manually rename the project folder by going to its actual location using Windows Explorer, but we also get an error message box stating "Cannot rename: Access is denied. Make sure the disk is not full or write protected and that the file is
not currently in use.
Does anyone have an idea on why the Project directory can not be renamed in Visual Studio 2010 right after the project is created? If so, is there a way to manipulate it so that folder can be renamed?
I also want to add that these same functionality worked in Visual Studio 2005 and Visual Studio 2008 as in we were able to rename the Project directory after the Solution/Project were created in Visual Studio. I am wondering if something was changed for Visual Studio 2010 regarding this.
Any help would really be appreciated, please? Thanks everyone!