When creating a project, the solution holds the same name as the project. You can see their names in the Solution Explorer:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt0J_cmiWx0xElTCm3oTK-gwQ_NvD1A6UyE7zB7E0E2H-lCthustJSwQqODjME_UzgQfHCLgPQCziP0YjAoux_hbNatLD3KlHZh6z6WNM3UgXg76O0AzV-ojg8eSH7O3J_cXKFcu8x4Oo/s320/solexpl3.gif)
The solution and a project can have different names. While working on a project, to rename the solution, in the Solution Explorer, you can click the first node, which is the name of the solution starting with Solution. Then, in the Properties window, click (Name) and type the name of your choice:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPXR1a41aSthT_RnIo06nLm_LRBpXoawgH5aOzk9uVnFIZBAA2bss3tVcb8E0pnJRGWykUA6nv6w4syj9Gbxf-369JVoIO7gSRnStTwhSPV3PYdNj7E4e6rZmS5G_EG9KcWx6uYl6RDxQ/s320/solexpl4.gif)
This name is temporary, especially if you have not yet saved the project. If you want to permanently save a solution for later use, there are two techniques you can use.
If you start saving a project for the first time, it would bring the Save Project dialog box. By default, Microsoft Visual Studio selects your personal directory as the path to the solution. This is called the location. In the location, Microsoft Visual Studio creates a folder as the solution of the project. The solution must have, or must be stored, in its own folder. As mentioned earlier, Microsoft Visual Studio uses the name of the project as the name of the solution. To rename the solution, you can change the string in the Solution Name text box. Remember that you can enter the name of the project in the Name text box. Here is an example:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMb7LSno0Q4xYCa5ytsT8fK1CcLh4LDpng6ZwHQSqlAtx3zSDKx01jD3FTvyYjSDxxKgPUwZyRBfp68Z8O_arN09trFkcygm7ydA1nrkLSkK8V-ubS21wLb35BOFJauuP8Wmk9WEz7L6o/s320/saveproject2.gif)
When you save a project (for the first time), by default, Microsoft Visual C# creates a new folder for it in the My Documents\Visual Studio 2008\Projects folder. It uses the name of the solution to name the folder. It creates some files and stores them in that new folder. Then, it creates a sub-folder, using the name of the project, inside of the folder of the solution. Besides the sub-folder with the name as the project, it creates another folder named debug. It also creates another folder named Debug in the sub-folder of the name of the project. In each folder and some other folders, it creates some files that we will not pay attention to for now.
If the project had already been saved but you want to change the name of the solution, on the main menu, you can click File -> Save solution-name.sln As... This would bring the Save File As dialog box where you can specify the name of the solution and click Save.
No comments:
Post a Comment