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
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
6) Save project file
7) Re-open Solution in VS2005
8) You'll notice that the project is now a Web Application project
9) However, you need to convert all the WebForms and UserControls to the new code-behind model
10) In Solution Explorer, hilight the .aspx and .ascx files (you can select multiple)
11) Right click and select "Convert to Web Application"
12) You should now see that your code behind files have been converted to partial classes and all the control references have been moved to a .designer.cs file.
13) Congratulations, your project has now been converted.
Maybe it is not common, but thats a cool tip.
ReplyDeleteHelped me.
Thanks.