Upon hearing the announcement that Web Application Projects has been released, I wanted to get EZWeb converted
over as soon as possible (I’m close to making another release).
I’d been limping along with the default web site option in Whidbey, and
I didn’t like it at all.
First, you can download the VS 2005 add-in here. There isn’t an automatic port of a VS 2005 website, but it was easy enough to do. Here were my steps:
- Add new web application project to my solution.
- In Win Explorer, copy the entire contents of my web site project to the web application folder.
- Delete my web site folder.
- Remove the website from my solution.
- Show all files in the web application.
- Explicitly include everything except bin and obj
- Add any assembly references necessary to the new project.
- Set any post-build events that you’ve been jerry-rigging up to this point.
- Run a build. You’ll notice it fails on control declarations in code-behind files.
- Right click on the web project and run “Convert to Web Application”. This adds an explicit partial class to your code-behinds that hold your control declarations from the markup file.
- Run the build again. It passed for me at this point. I ran my application, and all was well.
- Run all unit tests and integration tests. They all passed for me.
This project model is so much easier to use for real web applications
(that aren’t just web _sites_). Kudos to the ASP.NET team for
getting this patch out.
If you are using Resharper 2.0 (beta), you’ll notice a slight
difference in navigating to files. CTRL+N will locate the ascx.cs
and ascx.designer.cs files since they are C# code files. To get
to the ascx files, you’ll need to use CTRL+SHIFT+N.