views:

366

answers:

2

I need to convert a project started as a Web Application to a Class Libray, is this possible?

Thanks

+1  A: 

No. Your best bet is to create a Class.Library and copy the .cs files into your new project.

A Class Library won't do anything with .aspx pages, it will see those as files in the solution.

David Basarab
I have a main Web Application that loads Controls from another Web Application. It should load them from a Class Library, because right now I have two web.config files and this is boring.
Marco Bettiolo
+1  A: 

The correct answer is yes. Just edit the csproj (msbuild) file and change the ProjectGuid and remove the ProjectTypeGuids:

<ProjectGuid>{9845066A-3C9E-4F51-8F5F-8F513E8D03C1}</ProjectGuid>

It really is that simple.

JarrettV