Adding Namespaces To Converted Web Site

Last post 06-27-2008 4:00 AM by Thomas Sun – MSFT. 1 replies.

Sort Posts:

  • Adding Namespaces To Converted Web Site

    06-24-2008, 9:00 AM
    • Loading...
    • ajalexander
    • Joined on 06-23-2008, 5:40 PM
    • Posts 2

    I have a somewhat large website that was initially created as a Web Site project in Visual Studio 2005.  The site has since been converted to a Web Application Project in Visual Studio 2008.

    I would like to add namespaces to all of the classes and pages in the project.  I want to use the default naming scheme (Folder1.SubFolder1.MyPage instead of Folder1_SubFolder1_MyPage).  Given that the site contains more than a hundred pages and controls, manually using the Surround With option to add namespaces one page at a time isn't really a good choice.  Is there a more automated solution to retroactively apply namespaces for a Web Application Project?

    Thanks.

    (I initially posted this question into the Configuration and Deployment forum as I didn't see this one when I first looked through the available forums).

  • Re: Adding Namespaces To Converted Web Site

    06-27-2008, 4:00 AM
    Answer

    Hi,

    There is not such built-in function in Visual Studio, as far as I know.

    But you can try to use Rplace (Ctrl+Shift+F) to replace "Folder1_SubFolder1_MyPage" with "Folder1.SubFolder1.MyPage" in the "Entire Solution".

     

    I hope this helps.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (2 items)
Microsoft Communities
Page view counter