Last post Jun 04, 2012 02:09 AM by jim_rosacena2008
Jun 03, 2012 12:51 AM|jim_rosacena2008|LINK
Dear Guys, at first i create a project as a test (TestWeb.sln), then i constructed it all in a test project. Is there any way to rename it to other Project Name? I'm using VS 2010.
Really appreciated guys. Thanks. Jim.
Jun 03, 2012 01:22 AM|jprochazka|LINK
To rename the solution itself simply right click on the solution and rename it. You can then change the folder name containing the solution to whatever it wont matter.
To change the project name first off right click on the project you wish to change the name of click on rename and name it to whatever you want.
To rename the assembly name and namespace double click on the properties folder for the project and click on the tab Application tab and rename them.
To change the folder name goto the projects directory within the solution and rename the folder to what you want it to be. After which open the solutions .sln file in notepad and edit the path to the .csproj, vbproj, etc. to match the path to the folder
you just renamed.
Jun 03, 2012 04:02 AM|jim_rosacena2008|LINK
Dear jprochazka, i did exactly as per your instructions. but when i build the solution, my table adapters that are giving errors now. how do i resolve this? thanks in advance. jim.
Jun 03, 2012 04:19 AM|jprochazka|LINK
Forgot to add you want have to check the Inherits atribute in your page directive at the top of your .aspx pages make sure the namespace has been changed to the new namespace name you selected.
Change to the new namepace name where it says CHANGETHIS in the line line that looks like so at the top of each .aspx file.
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPages/Default.Master" CodeBehind="Default.aspx.vb" Inherits="CHANGETHIS._Default" %>
Also any referances to the old namespace should be changed in any classes you are refering to but generally these are changed by Visual Studio.
Jun 03, 2012 06:11 AM|jim_rosacena2008|LINK
a million of thanks for your reply. it worked. Whewww! it scares the heck out of me hahaha. it gives me a lot of errors and the solution is only the one you said. thanks a lot again jprochazka. i really appreciate it. what i did now, is i change all of my
pages to my new Project Name as well the code-behinds.
by the way, is there any way to change the namespace at once and all of the existed other pages and code-behind as well will be automatically changed?
thanks a lot in advance. Jim.
Jun 03, 2012 03:03 PM|jprochazka|LINK
Generally the namespaces are changed in code behind files, the apsx.cs files, when you change the namespace in the projects properies. For some reason however I have noticed in the past it does not change the namespace in the .aspx files for some reason.
These you may have to change manually...
Jun 04, 2012 02:09 AM|jim_rosacena2008|LINK
Thanks a lot jprochazka for your generous response and ideas. your reply really helped me a lot.