Posts

Showing posts with the label Web Application Project

Convert a Visual Studio 2003 Class Library Project to VS 2005 Web Application Project

This one came about because an asp.net forums user was having difficulty understanding how the Web Site project model works vis-a-vis the Web Application Project model works. Under almost all scenarios, I recommend the Web Application Project model - especially if you intend to deploy the resultant build into production and it is not just a "demo". The OP wanted to have a single assembly - something your Web Site Project simply is not geared to do. I explained that you can put all your class library and control *cs or *vb files into a WAP, and they all get compiled into a single dll. After the OP got my explanatory answer post, another user posted an elegant set of instructions as well, which I reproduce here: How to convert VS2003 Class Library project to VS2005 Web Application project 1) Open 2003 Solution in VS2005 2) Run Conversion Wizard 3) Close VS2005 4) Open Class Library project in Notepad 5) Replace line: <ProjectType>Local</ProjectType> with ...

Web Application Project Issues 101: "Could Not Load Type..."

One *Extremely* common newsgroup and forum post I've seen recently revolves around "double compilation" of stuff that was left in the APP_CODE folder when a project is migrated from WebSite mode to Web Application Project. For starters, I'll quote directly from "Mr. ASP.NET" Scott Guthrie's blog tutorial: "VERY, VERY IMPORTANT: Because ASP.NET 2.0 tries to dynamically compile any classes it finds under the /App_Code directory of an application at runtime, you explictly *DO NOT* want to store classes that you compile as part of your VS 2005 Web Application Project under an "app_code" folder. If you do this, then the class will get compiled twice -- once as part of the VS 2005 Web Application Project assembly, and then again at runtime by ASP.NET. The result will most likely be a "could not load type" runtime exception -- caused because you have duplicate type names in your application. Instead, you should store your class files in...