Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving a project to a new location?
Message
 
 
To
25/06/2010 09:43:07
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01470309
Message ID:
01470569
Views:
18
>>>Hi Dimtry,
>>>
>>>>Tim,
>>>>
>>>>First, thank you for detailed reply. But I am still confused (it is me, I know <g>). Let me describe the current setting I have:
>>>>1. Existing Solution which has just one project. All pages of this solution/project (since it is one) are in the folders:
>>>> c:\inetpub\wwwroot\MyProject
>>>> The solution file (MyProject.sln) is in the c:\MyDocuments\MyName\....\VS2005Projects\MyProject folder.
>>>>
>>>> So the VS2005 points to the solution file (.sln) in the c:\MyDocument\Myname.. ..\MyProject folder
>>>>
>>>>2. I want all project pages and the solution file (.sln) to be moved to a folder on drive d: (e.g. "D:\VS2005\MyProject")
>>>>
>>>>I can copy all pages from the Old Folder to the New Folder (D:\VS2006\MyProject). Do I also need to copy the solution file .sln from the old location to the new one? Or recreate it?
>>>>
>>>>The way I see is that VS relies on the .sln file (MyProject.sln) to find the pages and files of the project/solution. And I am having tough tough understanding how to "move" the solution file from one location to another.
>>>>
>>>>Hopefully you what I am not seeing. Thank you.
>>>>
>>>
>>>Project files know where there files are and the solution file knows where the project is. So if you move the solution files(use windows explorer) (and you can rename it also if you want) and then re-open it; it won't be able to find the projects. In that case you just remove them from the solution and then click add existing and you can re-point to the projects. The project files know where all the files are.
>>>
>>>If you want to move the project, just copy the entire project (website) folder and its content to where you want it.
>>>
>>>It sounds like this is may be a website and not a web application project. If that is the case, there isn't a project file. So when you move the solution file to where you want it and then open it; it won't find the projects. You can move them also at this point. If your project is indeed a website, then you would right click (after you moved it) on the solution and pick "add -> existing website" and navigate to it. All the website files will be added back into the website showing as a project in your solution.
>>>
>>>Steps: (using windows explorer)
>>>1. Rename the solution files to whatever you want them to be.
>>>2. Move the solution files to wherever you want them.
>>>3. Copy or move all the project files to whatever folder you want them in. The folder name makes no difference.
>>> (if this is a website, then naming the folder the files are in is what you will see in the solution explorer.)
>>>4. Open the solution in VS with File | Open Project or Solution and navigate to the solution file.
>>>5. If the project (website) shows up but it won't find it and you will see a warning of this, then right click it in the solution explorer and chose remove.
>>>6. Now right click the solution in solution explorer and pick "Add | Existing Project (or website) " and navigate to where you moved it to. this will add it all back.
>>>7. You are done.
>>
>>Tim,
>>
>>Thanks a million! I will follow your message and steps and it should work.
>
>If you look in c:\inetpub\wwwroot\MyProject and you do not see a file named MyProject.csproj then you have a website with no project file. Just use the add existing website rather than the add existing project. All works the same, but you navigate to the folder for the website instead of the project file.
>Good luck, let me know if you got it done or not.
>Tim

I do have MyProject.csproj file. Thank you for clarifying what is web site and what is a project (this was one thing that I was confused about). So in my case it is a project.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform