Visual Studio
How to: Count the lines of code (project/solution)

If you ever wondered how many lines your code is, you can easily get such information (along with other -arguably more important- bits) by hitting the Calculate Code Metrics. Right click on the project, half way down the pop up window, you will notice the option “Calculate Code Metrics”. This should bring up the window [...]

Read More
Posted on 4th May 2012No Comments
How to: Create a SP2007 Site Collection Template in VS2008 in XML only

So, the other day, I got a curious request. I was to provide a new site collection template, a custom template, that would be using no code whatsoever. The client did not want to deploy custom code to their production server. I had never created a site collection template before. Let alone one that would [...]

Read More
Posted on 21st September 2011No Comments
How to: Debug SharePoint applications (attach to process).

First of all, you will need to turn off the custom errors. If you haven’t already done so, click here to find out how to turn off SharePoint Custom Errors After you’ve done that, you will be able to get more information about your application errors straight from the error page that will be served [...]

Read More
Posted on 15th August 2011No Comments
How to: Troubleshoot “Web Application not found” errors in SharePoint 2010 development

When developing against SharePoint 2010, you might come across the following error: “The web application at [URL] could not be found. Verify that you have typed the url correctly. If the url should be serving existing content, the system administrator may need to add a new request url mapping to the intended application.” What this [...]

Read More
Posted on 1st July 2011No Comments
How to: Programmatically create a new Site Column in SharePoint 2010

As we’ve seen before, site columns can be created in a variety of ways, through the web interface, the SPD10 and the VS2010. We will now take a look at how to create a site column programmatically. That is, through the Visual Studio 2010. The main difference between creating a site column through the SPD10 [...]

Read More
Posted on 4th June 2011No Comments
What is: Site columns, content types and lists

SharePoint 2010, just like its predecessor, supports the fundamental elements that made SharePoint 2007 such an important platform. Content types, site columns and lists. In the sense of SharePoint, everything is a list. A site column is a definition of a reusable -within the specified web site that they’ve been defined in- column. That means [...]

Read More
Posted on 2nd June 20112 Comments
How to: Comment out Visual Studio code (keyboard shortcut)

Most starting developers always ask if there is a quicker method to commenting out a piece of code, than having to select the Comment Selection from the Edit menu. There is in fact a keyboard combination, even if it requires the sequential performance of two keyboard shortcuts. In order to comment out a selection, first [...]

Read More
Posted on 11th December 2010No Comments
How to: Undo “Exclude from Project” in Visual Studio

  OK, so this is truly a silly post but I still remember how anxious I was the first time I mistakenly clicked on the “Exclude from Project” option in Visual Studio. What you need to remember is that “excluding” something from your project is not “deleting” it. It’s not even actually removing it from [...]

Read More
Posted on 9th November 2010No Comments
How to: Testing SharePoint installations and custom code

Testing the products of software development is, or should be, just as important as the development itself. Deploying a solution that does not work, or equally importantly, deploying a solution that worked in the development environment but for some reason, does not work in the production environment, is simply unacceptable. Visual Studio 2010 comes with [...]

Read More
Posted on 15th September 2010No Comments
Explained: the Developer Dashboard

The developer dashboard is a new invaluable tool for the developer. It enables reading through the calls made at any time, so that the developer will know whether it is his/her own code slowing down the system or SharePoint itself. Items displayed in the developer dashboard include web part events, Windows Communication Foundation (WCF) calls, [...]

Read More
Posted on 11th September 20103 Comments