I am using Visual Studio 2013 and the PTVS for developing in pythonic world. My experiences to interact with the generated solutions in VS, are which under aegis of C#, seemingly do not help me in the case of PTVS.
As an important point, I am prone to change the solution name.
In the case of C#, the process is clear... As changing the Assembly property, renaming the solution inside VS, applying required changes into folder names from windows explorer and rest of it.
But the PTVS solutions are different in view of lack of the assembly file and the structure, is not which comparable with .NET solutions. Therefore, one can assert that the previous discussions (like below one) might not fit such case about PTVS.
Proper way to rename solution (and directories) in Visual Studio
I just renamed the solution from VS, closed it and applied the same change regarding the folders, in addition to renaming the python project
file. But the after that process and opening the solution, it is unavailable
in the solution explorer
window and there is a message in the Output
window as:
C:\Users\Matinking\Documents\Visual Studio 2013\Projects\Simulators\NeuroSimulation\Simulators.pyproj : error : The project file could not be loaded. Could not find a part of the path 'C:\Users\Matinking\Documents\Visual Studio 2013\Projects\Simulators\NeuroSimulation\Simulators.pyproj'. C:\Users\Matinking\Documents\Visual Studio 2013\Projects\Simulators\NeuroSimulation\Simulators.pyproj
The previous solution name was NeuroSimulation
and the new one is supposed to be Simulators
... The suspecting case is that, I changed the name of the all folders from NeuroSimulation
to Simulators
... but within the above error-driven message the folder name of the pyproj file is NeuroSimulation
, is not which also along with the name in the windows explorer!!!
Does anybody have any experience in such territory?!...
Kind Regards
I personally figured out how to resolve this problem. Here is the required process, must which be taken into account within the mentioned order:
1- Rename the Project File
, i.e. the .pyproj
file, within the Properties
window of the project
.
2- Rename the project title in the Solution Explorer
.
3- Rename the Solution
.
4- Close the VS
, entirely.
5- Rename the main folder of the Solution
.
6- Rename the Python Project
file.
7- Open the refactored solution, safely.
HINT: if you don't consider the 7th step , the solution will not supposed to be opened and you would be doomed to lose it. So, take that into account, deservedly.
Best