in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Michael Hofer - SharePoint Blog

Michael Hofer's blog about adventures in SharePoint land, including tips and tricks for all products and technologies used in Information Worker solutions.

How to convert a class library project type to a SharePoint Solution project type

You might wonder who cares about this - or even what this post is all about.

Imagine that you are developing SharePoint custom web controls. However, since working in the SharePoint environment always takes lots of time for deployment, application pool recycling etc., you would like to try and debug your control in a "clean" asp.net environment before going for the big thing. Of course, you want state-of-the-art deployment, so you decide to go for a SharePoint Solution project type for your web controls library.

Now you add a ASP.NET web application to test your controls. But unfortunately, you cannot run your web app: Visual Studio tells you a nice error message saying the following:

"No SharePoint site exists at the specified url"

This error arises, because one of the projects is of type "SharePoint Solution", which needs a SharePoint enabled-site to be the host of all your debugging attempts - for whatever reason I have not yet really understood (check SharePoint.Tools namespace if you want).

How to overcome this?

 When you examine the Visual Studio Project file, you'll find the following:

Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{0A3B4466-2881-45F8-BF5D-4DEC74AA7EE1}</ProjectGuid>
    <ProjectTypeGuids>{9E5D3E2D-E4E2-418e-8D80-2F0DA9A94F9A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

This means, that this project is of type "SharePoint Solution" and is also a class library:

  • {9E5D3E2D-E4E2-418e-8D80-2F0DA9A94F9A} = SharePoint Solution
  • {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} = Class Library

So, if you want to test your controls or whatever else you've developed outside of the SharePoint environment, just take away the {9E5D3E2D-E4E2-418e-8D80-2F0DA9A94F9A} Guid and you'll be fine. If you want to convert any Class Library to a SharePoint Solution, just add this project type GUID and off you go.

Not really the every-day use tip, but can still help :) 


 

Comments

 

Sharepoint 2007 link love 07-05-2007 at Virtual Generations said:

Pingback from  Sharepoint 2007 link love 07-05-2007 at  Virtual Generations

July 5, 2007 4:30 AM
 

Gilles said:

It did help me! Thanks!

April 30, 2008 1:36 PM
 

ernestovo zákoutí said:

Našel jsem starší rozepsaný článek, třeba bude někomu užitečný Pokud vyvíjíte v SharePointu, tak jste

May 16, 2008 1:54 PM

Leave a Comment

(required )  
(optional )
(required )  
Add

About mhofer1976

For all of my IT carreer, I've been addicted to Microsoft-based software development, starting with VB, but then heading straight towards the .NET Framework in its earliest days. While working in different positions as a lead developer, project manager, pre-sales consultant and most recently a business unit manager, I've always kept beeing a developer and specialized on solutions in the Information Worker area, with an emphasis towards Enterprise Content Management. The Microsoft Office System and especially the SharePoint products and technologies are my favorite "playground", one big reason why I've joined the Microsoft Consulting Services in Switzerland where I'm currently working as Senior Consultant for Information Worker solutions.

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts