Friday, December 25, 2009

Visual Studio 2010 SharePoint templates shortcuts to deploy and retract WSP package

I'm a sucker for shortcuts - there I said it :) So what is more obvious then setup shortcuts to deploy and retract WSP package with in Visual Studio.

For setting shortcuts in Visual Studio

Go to Tools -> Options -> in the left menu select "Keyboard"


For deployment

Write "Build.DeploySelection" in the "Show commands containing:"


In the "Press shortcut keys:" press the shortcuts you wish to use. I used Ctrl+Shitf+Alt+B and D - WSPBuilder style!

For retracting the WSP package:


Wednesday, December 23, 2009

Tips to deploying/debugging

Just like when debugging a normal .NET application you need to restart the app domain to load the new code and get the debugger to attach the code. In a normal SharePoint project you need to attach to the w3wp.exe process, the w3wp.exe is the application pool that runs the SharePoint instant, to load the new code, you need to restart the application pool by doing an iisreset or just recycle the application pool e.g. thought IIS manager. The sandbox solution is not run by the w3wp.exe, but a SharePointUserCode worker process (SPUCWorkerProcess.exe). This is managed by the Windows services "Windows SharePoint Services User Code Host V4" (SPUserCodeV4). So by restarting this service the sandbox solution code the now reloading next time the code is requested and ready to get debugged. So how to restart this services? One way is to start services.msc and restart the service that way or use net stop/net start or just use Power Shell.

So by run this Power Shell "restart-service -name spusercodev4" the Services User Code Host gets restarted, but you need to do this manually every time you redeployed your sandbox solution code. So to overcome this, just add a line to the "Pre-build events command line" in your Visual Studio project "powershell restart-service -name spusercodev4" and it will do the trick.

Buld events

Monday, December 21, 2009

Debuging Sandbox Solutions

When debugging a normal SharePoint project, like a Visual Web Part, you will attach Visual Studio debugger to the w3wp.exe but when debugging the sandbox solution you need to attach Visual Studio to an another process. For the sandbox solution code you need to attach to SPUCWorkerProcess.exe and this goes also for the sandbox solution proxy arguments class.


For the sandbox solution proxy operation you need to attach to the SPUCWorkerProcessProxy.exe


Sunday, December 6, 2009

A great ULS Viewer

I found this great ULS Viewer, I use to read the SharePoint log files with. One of the really cool things is the highlight function that’s build in, just by hover over a text the same text is high with a yellow background, soo cool :) But two of the most import features is to hide lines in the log and runtime-feed. Runtime-feed is to setup a "watch" on a directory and all now log (both lines in the current log file and lines in new log files is imbedded into the ULS Viewer view) .




A copy-pasting Microsoft own feature list:

  • Highlight data of importance to the user on the fly
  • Bookmark log entries
  • Append logs to other logs in order to track trends
  • Hide unimportant data
  • Only view critical log entries by sorting data by severity
  • Write rules to prompt the user when certain events occur
  • View your data in a spreadsheet instead of the text file ULS generates
  • Monitor remote machines logs that are running ULS services
  • Open multiple logs at the same time in order to compare log files.
  • Open logs files from multiple machines at the same time.

More screenshots of USL Viewer

Read more about this greater log reading tool at

Thursday, November 19, 2009

Scott Guthrie is coming to Denmark

Scott Guthrie will talk about Windows Azure, .NET 4.0, Silverlight 4, MVC and Visual Studio 2010

Link to registration and more information read here, see you there.

Keyboard shortcuts for Windows SharePoint Services 3.0

Microsoft as writen this greate post about keyboard shortcuts in Microsoft Windows SharePoint Services 3.0, love keyboard shortcuts :) And the 3.0 keyboard shortcuts is working in SharePoint 2010, like the site action and view all site content shortcuts :)

Sunday, November 15, 2009

SharePoint Manager 2010 Release

We are proud to announce the release for the SharePoint Manager 2010, the new release is available on CodePlex There are some smaller bug fix and some new feature in 2010. All new objects in the SharePoint 2010 object model is marked with a grey background, like User Solutions (aka Sandbox Solutions).


Wednesday, November 4, 2009

Connecting list in MOSS 2007

One of the many out-of-the-box functionalities in MOSS 2007 is connect list to Outlook e.g. Contacts list. This is great to have the rich and familiar interface from Outlook and still have a central place to share the information.

So the quick guide to setup a Contacts list in SharePoint and connecting it to Outlook.

  1. First we create a contact list in SharePoint

  2. Populate the list with dummy data

  3. Connecting the list to Outlook


  4. And now the list is connected to Outlook
  5. Create a new contact through Outlooks rich interface

  6. Refresh the list view in SharePoint

Tuesday, November 3, 2009

SharePoint 2010 - List inline editing

How to enable inline editing on list.

1. Go to the list and click on the List in the Ribbon.

2. Click on the "Modify this View"


3. Go to the button and expand "Inline Editing", click the "Allow inline editing" checkbox on. And click on the OK button.


4. Go back to the list (the modified view) and now there is a little 'create new list item' icon at the button of view.


5. Click on the create new list item icon and a inline form is show. Fill out the required fields and click on the save icon.


6. And vola, you just create a list item through inline editing :)

Change this settings through API

Find the view (SPView) you wish to change and update the InlineEdit property with the text string TRUE

Remember to .Update() the SPView after updating the property.

Saturday, October 31, 2009

SPBG Code Camp

The first SPBG Code camp is a reality :D

• Carsten Keutmann: Web Part, delegate control and more.
• Anders Dissing: Development in SharePoint 2010.
• Per Jakobsen: Code access security.
• Allan Hvam Petersen: Integration test in SharePoint.



Ohh yeah good time coding :)

Thursday, October 29, 2009

Scott Hanselman is coming to Denmark

Scott Hanselman will talk about ASP.NET 4.0 and MVC! YEAH! :D

Link to registration and more information read here, see you there.

PowerShell and SPFeature Properties

I was playing a bit around with some PowerShell. More precise “PS C:\Users\Administrator> Get-SPFeature -id 14173c38-5e2d-4887-8134-60f9df889bad | fl” and I got is list of properties out.


: FeatureDefinition/14173c38-5e2d-4887-8134-60f9df889bad


: 14173c38-5e2d-4887-8134-60f9df889bad


: PageConverters


: 00000000-0000-0000-0000-000000000000












: {}






: False


: True


: C:\Program Files\CommonFiles\Microsoft Shared\Web Server Extensions\14\Template\Features\PageConverters


: True


: {}


: False


: False


: core


: Microsoft.SharePoint.Administration.SPFeatureDefinition


: Online


: SPFarm Name=SharePoint_Config_d914eed3-48bf-4d2b-939d-60279b8b14bd


: SPFarm Name=SharePoint_Config_d914eed3-48bf-4d2b-939d-60279b8b14bd


: {}


Cool! But what is even cooler is some of the new properties on the SPFeatureDefinition object like SolutionId, UpgradeReceiverClass and Version.

Taking a closer look of the members on the SPFeatureDefinition in the SharePoint 2010 SDK:


I’m really looking forward to make some nice IT governance with these new properties!

Tuesday, October 27, 2009

What's New in Visual Studio 2010

I just install the new version of Visual Studio 2010 (beta 2) link to download – yeah!!! 2010 splash screen

But it is not only the splash screen and the logo that has changed. On MSDN is there a whole brunch of articles about what’s new in Visual Studio 2010. To make a quick highlight of what I find interesting:

What's New in Visual Studio 2010 -,classic).aspx

What's New in Visual C# 2010 -

  • Dynamic Support
    Visual C# 2010 provides support for late binding to dynamic types by introducing a new type, dynamic. This addition enables many new scenarios, including simplified access to COM APIs such as the Office Automation APIs, to dynamic APIs such as IronPython libraries, and to the HTML Document Object Model (DOM). For more information, see Using Type dynamic (C# Programming Guide) and dynamic (C# Reference).
  • Highlighting References
    This enhancement enables you to highlight all instances of a particular symbol in a document by clicking that symbol. To navigate between references, you can use CTRL+SHIFT+DOWN ARROW or CTRL+SHIFT+UP ARROW. For more information, see How to: Use Reference Highlighting.

What's New in the .NET Framework Version 4 -

Managing Visual Studio Extensions -

  • Microsoft Visual Studio 2010 uses a new feature called the Extension Manager to add, remove, enable, and disable Visual Studio extensions. The Extension manager has a UI similar to that of the Windows Control Panel, and can be opened from the Tools menu in Visual Studio by selecting Extension Manager…

Extension Manager

Monday, October 26, 2009

Danish SharePoint User Group (SPBG) CodeCamp!

The 31 of October will the Danish SharePoint User Group (SPBG) arrange the first SharePoint Code Camp. Peoplenet has been so kind to facilitate the premises and sponsor food and beverages.

For more detail and registration go to (full link in Danish)

SharePoint 2010 - Developer dashboard

What is Developer dashboard?

Developer dashboard is a feature that allows you as a developer or an administrator to view trace information about the current request.

What can I use it for?

To debug the current SharePoint request and get an overview of where the pain-point on the request is.

How to turn developer dashboard on?

Turn developer dashboard always on: stsadm -o setproperty -pn developer-dashboard -pv on

Turn developer dashboard ondemand (click on the icon): stsadm -o setproperty -pn developer-dashboard -pv ondemand

Turn off developer dashboard: stsadm -o setproperty -pn developer-dashboard -pv off


Turn on developer dashboard ondemand by running "stsadm -o setproperty -pn developer-dashboard -pv ondemand"

Go to you site and on the top right corner the developer dash icon is showed, click on it



Then the site is finish loading go to the bottom of the screen and there you see the developer dashboard output.


In the left on the screen a quick trace information is showed and on the right is information about the web server and database requests.


If you click on a database request a popup window comes up with information about the query and the callstack.


By clicking on the quick trace information link a more detailed view of the trace is showed on the right site. E.g. The parse CAML query or the specific database request.


At the button of the developer dashboard is there a link "Show or hide additional tracing information . . ." this link will show the full trace view.