Convert web application project to class library

There's no way inside of Visual Studio to convert a web application project to a class library.

However, this is pretty easy done using your favourite text editor of choice by editing the .csproj-file changing two lines.

If you're  not totally confident with what you're about to do, make sure you start with making a backup!

  1. Open your project file (.csproj)
  2. Locate <projectguid> and make a small change to the GUID.
  3. Locate <projecttypeguids> and delete completely.
  4. Save and reload project in Visual Studio. It should load as a class library this time.

Solution originally found here.

Related posts:


comments powered by Disqus