Web Site Project to WAP – App_Code directory conversion issue

Last post 11-13-2008 12:05 PM by MNF. 8 replies.

Sort Posts:

  • Web Site Project to WAP – App_Code directory conversion issue

    01-19-2007, 11:10 AM
    • Member
      157 point Member
    • Claude Maxim
    • Member since 03-20-2006, 2:58 PM
    • Posts 61

    Hi All,

     

    I am trying to convert a Web Site Project to a Web Application Project. When I convert the project files, one of the steps renames the App_Code directory to Old_App_Code. I have used the App_code directory to hold all of my .cs files for classes, utilities, and enumerations, etc. Then when I build the solution all of the classes I have defined can not be found in the calling aspx pages. So, how do I specify that these files are in the Old_App_Code directory now? Do I have to make some kind of change to each aspx page that calls them (lots!) or is there some global setting that I can specify to now look in the Old_App_code directory?

     

    Thanks for your help,

     

    Claude.

  • Re: Web Site Project to WAP – App_Code directory conversion issue

    01-23-2007, 4:01 PM
    Answer
    • Participant
      1,975 point Participant
    • ASPSmith
    • Member since 06-10-2002, 10:17 PM
    • Kent, OH, USA
    • Posts 218
    • ASPInsiders
      TrustedFriends-MVPs

    I just ran into this issue myself.  The conversion tool doesn't properly mark the code for compilation - it marks its Build Action as Content.  Click on each .cs file in Old_App_Code (or highlight a bunch of them at a time) and in the Properties dialog, change Build Action from Content to Compile.

     

    Steven A Smith
    AspAlliance.com - The #1 ASP.NET Community
    DevAdvice.com - Answers to Questions
    Filed under: ,
  • Re: Web Site Project to WAP – App_Code directory conversion issue

    01-24-2007, 9:23 AM
    • Member
      157 point Member
    • Claude Maxim
    • Member since 03-20-2006, 2:58 PM
    • Posts 61

    Hi Steven,

    Thanks for the tip, I had actually created a class library to hold the contents of Old_App_Code and it worked fine. I have tried your solution and it works as I had hoped in the first place. Now I have two ways to make it go. Thanks again for your help.

    Claude.

  • Re: Web Site Project to WAP – App_Code directory conversion issue

    01-24-2007, 9:42 AM
    • Participant
      1,975 point Participant
    • ASPSmith
    • Member since 06-10-2002, 10:17 PM
    • Kent, OH, USA
    • Posts 218
    • ASPInsiders
      TrustedFriends-MVPs

    You're welcome.  I actually had a few other tips in the course of my own real-life project upgrade, which I added to my blog:

    Web Application Project Conversion Tips

    Steven A Smith
    AspAlliance.com - The #1 ASP.NET Community
    DevAdvice.com - Answers to Questions
    Filed under: ,
  • Re: Web Site Project to WAP – App_Code directory conversion issue

    01-24-2007, 6:24 PM
    • Member
      157 point Member
    • Claude Maxim
    • Member since 03-20-2006, 2:58 PM
    • Posts 61

    Hi Steven,

    A good read. My experience was very similar, and I concur that the builds are MUCH faster. Thanks again for your help and all the best!

    Claude.

  • Re: Web Site Project to WAP – App_Code directory conversion issue

    06-06-2007, 2:39 PM
    • Member
      152 point Member
    • saintperez
    • Member since 02-08-2006, 9:20 PM
    • Boca Raton, FL.
    • Posts 90

    How do you go about converting a web Site to a WEB APP Using VS2005?

     

    Santiago Perez
    Systems Architect

    Florida's Turnpike Enterprise
  • Re: Web Site Project to WAP – App_Code directory conversion issue

    06-07-2007, 9:15 AM
    • Participant
      1,975 point Participant
    • ASPSmith
    • Member since 06-10-2002, 10:17 PM
    • Kent, OH, USA
    • Posts 218
    • ASPInsiders
      TrustedFriends-MVPs

    After creating the web project and copying your files into it, you right click on any given folder (or the whole project) and select "Convert To Web Application" (or something very close to this exact text) in Solution Explorer.

    Steven A Smith
    AspAlliance.com - The #1 ASP.NET Community
    DevAdvice.com - Answers to Questions
    Filed under:
  • Re: Web Site Project to WAP – App_Code directory conversion issue

    11-10-2008, 9:24 PM
    • Member
      259 point Member
    • MNF
    • Member since 07-24-2005, 8:15 PM
    • Posts 72

    Files in OLD_APP_CODE have Build Action as Content. It's not expected and not mentioned in http://webproject.scottgu.com/CSharp/migration2/migration2.aspx

    Is it described in some other documention? I am not sure is it fixed in VS 2008.

    I've posted a suggestion in MS feedback https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=381149

  • Re: Web Site Project to WAP – App_Code directory conversion issue

    11-13-2008, 12:05 PM
    • Member
      259 point Member
    • MNF
    • Member since 07-24-2005, 8:15 PM
    • Posts 72

    According to Rick Strahl ,VS 2008 doesn't have conversion wizard at all. The process has become fully manual-see From ASP Stock Projects to Web Application Projects in VS 2008

Page 1 of 1 (9 items)