ASP.NET without web projects: the Project becomes a class library, and with a few minor VisualStudio configuration changes the source-control integration becomes a LOT easier.
But what happens when you want to migrate to ASP.NET 2.0? Do you:
- keep using the 'class library hack', but maybe forgo VisualStudio 2005's cool new features for ASP.NET Designer Support
- convert back to a Web Project in 1.1 then migrate to 2.0 (ie undo/reverse these instructions)
- migrate the 'class library' project to 2.0 first, then convert it to the new (ie post Visual Studio 2005 released add-in) Web Application Project/li>
- create a Web Site Project and copy all the existing pages into it
- or something else...
If your website is part of a larger solution (ie other projects such as Business Objects), or you have more than one developer, or you are actually using source-control, let me save you some time and recommend number 3.
- First open the Visual Studio 2003 Solution using 2005 and follow the steps to migrate to Framework 2.0.
- Then make any code changes to get it to compile
- Now for the tricky bit, open the <WebApplication>.csproj in NOTEPAD
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplication.targets" />near whatever other Import elements exist near the end of the file
- Add this to the end of the file (you may need to update some settings)
- If you left the Solution open while editing, Visual Studio will detect the changes and offer to re-load. The first thing you should notice is the little 'world' in the Project icon (instead of the class-library square). The Project-Properties will also have a [Web] item, and all the benefits of ASP.NET Design-time, etc should be available.
Oh, and don't forget, if IIS is still pointing at the site's directory, you need to map the Framework 2.0 Handlers to it, using the Command Prompt...
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -s W3SVC/1/ROOT