VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

 May 8th Update: The final release of the VS 2005 Web Application Project is now live.  You can learn more about it here.

This past weekend I posted an updated tutorial for how to migrate a VS 2003 Web Project to VS 2005 using the latest preview refresh of the VS 2005 Web Application Project Model option.

  • The tutorial for upgrading VS 2003 VB Web Projects can be found here.
  • The tutorial for upgrading VS 2003 C# Web Projects can be found here.

Note that with the next refresh the steps defined in the above tutorial will be automatic (when you open up a VS 2003 Web Project in VS 2005 we will prompt you as to whether you want to ugrade it to be a Web Application Project or a Web Site Project -- and then automatically migrate the project file if you choose the web application option).

I also added two new tutorials for migrating existing VS 2005 web projects that are currently using the VS 2005 Web Site Project model to the new VS 2005 Web Application Model option.  There are still some manual steps in the migration process that we'll be smoothing over with future updates, but if you are interested in giving it a try now you can see read the VB Web-Site->Web Application Migration tutorial here, and the C# Web Site->Web Application Migration tutorial here.

I've received a lot of nice success stories using the above tutorials the last few days.  Here is one email that made me smile:

Re: Second release of the VS 2005 Web Application Project Preview

We have just converted our fairly large asp.net 2.0 web application over to the new Web Application Project - and things have gone really well so far.

It took us around half a day to refractor and upgrade our exiting 2005 code, as we had a large amount of code behind files in the app_code directory we wanted to put back in their rightful places (I agree with a previous post suggesting that the upgrade could be performed on a folder rather than a file).

Apart from the warm feeling we get inside knowing that our application is now structured as we'd like it to be, we are most pleased with the performance of our builds.  With the old web project our builds were taking around 1 minute and driving our developers mad - under the new Web Application Project these our builds complete in under 5 seconds (back to 2003 speeds!).

Please pass our thanks on to your team - we truly appreciate the speed that this work made available to us (and believe us, it couldn't have come at a better time).

Many Thanks,

Andi

Hope this helps,

Scott

 

Published Thursday, February 16, 2006 1:02 AM by ScottGu

Comments

# VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Thursday, February 16, 2006 4:15 AM by Chris Denslow
I'd just like to thank Scott and the team for working so hard on the WAP stuff.

I have been converting a small project from Web Site structure to Web Application structure. It's actually the replacement for my existing CSLA Desktop Ref.

I have had a few issues with the conversion (all of them due to me being a doofus!).

Scott has been exceedingly helpful and should feel really pleased at the level of help he provides to us and the speed at awhich he provides it.

Very much appreciated
Chris

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Thursday, February 16, 2006 4:26 AM by Hagay
Yeah ,as mentiond in other earlier comment my project build time went down from 30 seconds to about 3-5 seconds...

after almost a week working with the new web project addon, i made a list of the stuff that should be shared from my experince.

1) the main thing that annoys me (i understand in the final build it will get fixed) that visual studio treats the aspx files as ones with code "inline" , which means it auto creates the events for the controls in the .aspx file and not in the .cs , more ever the switch the code natuarlly doesnt work and just brings up the html source (you need to select the .cs file from the soultion explorer to get to the code).

2) i cant seems to select master page for a new webform, i need to wire it to a master page manually (in web site model, for a new page you can select the master page for the new webform)

3) wonder if you guys noticed it, when deploying the project , master pages requires the .cs file to be deployed with them...

didnt try yet user controls (dont have ones in my project yet), next week my project will have about 4-5 users controls (.ascx) i hope i wont expierce to much problems (if at all) over there.

After mentioning mainly the bad things :) , i must say i cant wait for the final release of the web project addon.

Hagay

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Thursday, February 16, 2006 4:43 AM by scottgu
Hi Hagay,

#1 and #2 are current limitations in the preview and require some manual steps to make happen. These will be fixed with the next release.

#3 though sounds like you have an issue with your project -- my guess from not migrating it cleanly from a VS 2005 Web Site (there is one extra step you need to take to make .master files migrate over -- I document it in the tutorial above). Once you do this extra step then you can build and deploy just the .master file -- there is no need to deploy the .cs code-behind for it.

Hope this helps,

Scott

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Thursday, February 16, 2006 8:59 AM by Anne Marie
I'm wondering what the pros and cons of each option are (web app vs. web site). I know it will put all the code in one assembly and is faster. but what are the drawbacks?

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Thursday, February 16, 2006 9:57 AM by Tyrone
I am totally in agreement with Andi who wrote that email. Build times was just taking too too long. It was a complete dog. It was very fustrating. However, after doing some searching I did stumble across a blog that explained how to cut these build times using the website project model.
Here is the link just for reference:

http://weblogs.asp.net/bradleyb/archive/2005/12/06/432441.aspx

My build went from about 1 min to about 10 seconds after applying the tweaks.


# Am I a dumbass?

Thursday, February 16, 2006 10:45 AM by Paul
Scott,

I may be dumb but I've hunted around looking for a WA vs WS comparison but can't see one anywhere. I though WS (file based) were supposed to be the Big New Thing, making building apps easier without the need for a dedicated IIS setup. Now you say we're better off with the olde wurlde WA model.

Lets have some bullet points explaining whats changed?

Cheers, Paul.

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Thursday, February 16, 2006 11:07 AM by scottgu
Hi Anne,

We are working on some whitepapers that will list the pros and cons of each approach. The reality is that there isn't one "best" solution -- it really depends on the type of application you are building and the particular workflow you use. For some apps and workflows the Web Site Project will be clearly superior, for others the Web Application Project will be superiod.

We know this is confusing in the short-term -- which is why we'll have more guidance and whitepaper recommendations later this spring to help you walkthrough the decision tree as to which to use when you start a project.

Hope this helps,

Scott

P.S. Note that the code-behind files for both project models are the same (literally zero changes) -- so the coding knowledge required to use each model is consistent.

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Thursday, February 16, 2006 11:11 AM by scottgu
Hi Paul,

We'll have some more whitepapers out shortly that help describe the differences between the two models and the pros/cons of each.

One thing to note is that we have incorporated some of the benefits of the new Web Site Model into the Web Application Model -- so things like not requiring IIS or FrontPage Server Extensions, not requiring you to switch into design mode to update your field references, etc. can now be taken advantage of there.

There are still a lot of cases where the Web Site Model is often superiod to the Web Application model though (that is after all why we did it <g>).

We'll be posting more whitepapers in the next few weeks that help provide more clarrity and help walk you through the decision tree as to which is best to use.

Hope this helps,

Scott

P.S. As I mentioned to Anne above, the code-behind files for both project models are the same (literally zero changes) -- so the coding knowledge required to use each model is consistent.

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Thursday, February 16, 2006 11:41 AM by Garry
Hi Scott,

I was wondering if you could give us a rough estimate as to when the next refresh might be ready?

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Thursday, February 16, 2006 3:37 PM by Andrew
The Web Application Project is great. I'm not sure how to contact your team, but I wanted to make a suggestion. Can you put in a checkbox somewhere to hide the .designer.cs files in Solution Explorer? They don't do the developer any good, and you're not really supposed to be editing them anyway.

Thanks
Andrew

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Friday, February 17, 2006 4:27 AM by scottgu@microsoft.com
Hi Garry,

We are shooting to have the next refresh the second half of March. This next one will be a major update and probably finish off almost all (if not all) of the feature set.

Hope this helps,

Scott

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Friday, February 17, 2006 4:28 AM by scottgu@microsoft.com
Hi Andrew,

Whether or not the sub-files like .designer.cs are shown in the solution explorer depends on the language of the project and how it is configured. VB hides these files (to bring it up you need to right click on the .aspx file and select the "view code gen" option). C# shows them.

I looked around for a checkbox to change the language behavior for this but couldn't find one in tools->options. I wouldn't be suprised if there was one buried in there somewhere though.

Hope this helps,

Scott

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Friday, February 17, 2006 8:59 AM by Alan
Scott,

I know you folks have taken a boatload of negative feedback from everyone who -- like me -- passionately hated the new web site model.

The new Web Application model works exactly as I would have expected VS2005 to work in the first place, so thanks to you folks for patiently listening to and promptly addressing everyone's feedback.

One question.

I know I can use the Web Development project to fully precompile my site, and this is a good thing.

What I'm wondering is if there a way I can make the .aspx, designer, and code files all compile together into a single class in the class library .dll, instead of having the .aspx file turn into one randomly-named class that inherits from the code-behind class?

This would allow, for example, dynamic adding of user controls using a New constructor instead of the more clumsy LoadControl.

Alan

# Unsuccessful following the C# VS 2003 to VS 2005 Tutorial

Thursday, February 23, 2006 5:43 PM by Gary Davis
I followed the steps and the web project will not load.

My solution is in My Documents with 2 class library projects and a web project which resides in \inetpub\wwwroot. I copied the 2 folders into a Virtual PC setup to work isolated from my development.

The first attempt failed (in Step #5) because I had the path to the web (Step #3, paragraph #2)relative to My Docs instead of to the \inetpub\wwwroot. The class projects converted but not the web.

I fixed the path and re-opened the sln and the migration ran again and said it completed but the project failed to load (said unavailable and not converted in solution explorer).

Maybe this in the conversion report helps:

Project converted successfully
Warning: The project file is being backed up to a relative path that differs from the original solution relative path. The difference in folder hierarchy may create problems in opening or building the backed up solution and project.

Thanks for any help,
Gary

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Saturday, February 25, 2006 12:13 PM by scottgu
Hi Gary,

Any chance you could send me email (scottgu@microsoft.com) with more details. I can then help you fix this.

Thanks,

Scott

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Monday, February 27, 2006 12:09 PM by Gary Davis
Sure. I will put together some additional details and send an email.

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Tuesday, March 14, 2006 3:28 AM by Leong
Scott,

I'm currently converting several applications to .NET 2.0. The web application project type is a real lifesaver.

But I ran into 2 issues, which I guess are related.

When I open the solution with the converted web application projects, VS 2005 gives the following message:

The following Web projects must be converted to the new Web Site format. The conversion process will remove all source control bindings and the project will not be under source control after migration.

After pressing "OK" I get another message:

Some of the properties associated with the solution could not be read.

And after pressing "OK" again everything just works fine.

Now I started creating an MSBUILD script to compile the solution on a buildserver, but MSBUILD won't build the converted projects.
The message it returns states that the projects should be converted to the web site project model first.

Greetings,
Leon

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Tuesday, March 14, 2006 1:37 PM by scottgu
hi Leon,

Any chance you could send me email (scottgu@microsoft.com) with the error you mentioned above? I can then loop you in with folks on my team and we can help figure out what is going on.

Thanks,

Scott

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Friday, March 17, 2006 5:38 PM by Nalaka
Scott,
Thanks for the new vs 2005 Web Application Project and web deployment project models.
We have migrated farely large web application (with several sub folder hierarchies and aspx pages refer user controls in child and parent folders.) to vs 2005 web application project model successfully.It can build and run successfully as a web application.

When it comes to deployment unfortunately we did not find Publish web site feature for vs2005 Web application type projects.This causesd us lot of troubles in separating the content files and dll's from vss files and code behind files.

Finally we found vs 2005 web deployment project model.We added a added a web deployment project to our successfully buiding web application project. But when we try to build the web deployment project the MSbuild process fails with a compilation error ".ascx user control reference paths cannot be found" from each and every aspx pages. We are using IIS rather than Cassini for development purposes. what could be the reason for a web deployment project build being failed when web application project build successful.Any help on this issue is highly appreciated.




# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Friday, March 17, 2006 6:50 PM by scottgu
Hi Nalaka,

The new refresh of the Web Application Project option that will come out later this month includes publish support (this was a feature missing from the last public refresh).

If you want to send me email directly (scottgu@microsoft.com), I'd be happy to give you access to a recent internal drop that has this feature. That might be the easiest way to get what you are after.

Hope this helps,

Scott

# re: VS 2003-&gt;VS 2005 Web Application and VS 2005 Web Site-&gt;Web Application Migration Tutorials Live

Thursday, June 01, 2006 6:25 PM by Sonali
Hi Scott,

I am facing the same problem as listed by
Leong on Tuesday, March 14, 2006 3:28 AM.

We have successfully converted our entire web application using the steps listed on http://webproject.scottgu.com/. There have been no issues for the existing solution. We are seeing this issue only when a new project is added (any project type)

When we add new project to the solution with the converted web application projects, VS 2005 gives the following message:

The following Web projects must be converted to the new Web Site format. The conversion process will remove all source control bindings and the project will not be under source control after migration.

After pressing "OK" I get another message:

Some of the properties associated with the solution could not be read.

And after pressing "OK" again everything just works fine.

We would really appreciate any tips on this as we can't move forward with our development.

Thanks,
Sonali

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Tuesday, June 06, 2006 11:26 AM by ScottGu
Hi Sonali,

I've seen this occur when there source control bindings we're updated corectly.  Can you try removing the projects from source control, saving the project files and reloading the solution (better yet if you can open the projct files in notepad to make sure the source control bindings were removed).  You can then re-open the solution and add them back to source control and you should be fine.

Feel free to send me email (scottgu@microsoft.com) if this doesn't fix it.

Thanks,

Scott

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Wednesday, September 06, 2006 11:15 AM by Farzin Davari

Hi Scott,

I just want to thank you and your team for a great effort you’ve done on WAP. And also thanks for really quick answers to my emails.

According to the tutorials and your emails, we could convert all of our web site projects to web application projects. We could go back to the previous build process that we had in VS 2003 and we reduced the compile time which made the life of our development team much easier.

By using WAP, we could successfully close and certify the current realease of our product.

Thanks

Farzin

# re: VS 2003->VS 2005 Web Application and VS 2005 Web Site->Web Application Migration Tutorials Live

Friday, February 02, 2007 1:17 PM by Jason Camp

Did you ever find a solution to this problem? I'm having the same issue.