SharePoint 2013 RTM

Microsoft announced yesterday that the Office and SharePoint teams have released the 2013 RTM version.

Availability for Volume Licensing (VL) customers as well as those with an MSDN or Technet account should be available by mid-November (Just in time for the SharePoint Conference). General availability is expected by early December.

Office 365 should also be updated by mid-November to take advantage of the new features.

SharePoint 2010: bug with WebConfigModification

When you want to make changes to the web.config file of your SharePoint 2010 application, you can use two methods:

  • Create a webconfig.<your_name>.xml file that you add to the \CONFIG directory (Source on MSDN)
  • Do it programmatically and use the SPWebConfigModification and SPWebApplication.WebConfigApplication objects (Source on MSDN).

However, when you use the second method and remove the changes from the file using Remove(), the changes are not removed. Even if you use .Update() and .ApplyWebConfigModifications(). This may only result in your modification appearing multiple times in the web.config file, but if you insert more sensitive modifications to uniqueness, such as for an HttpModule, it creates an error that prevents the site from functioning (Error 500).

[Read More]

C# 5.0: Asynchronous Programming

For those who are not aware, you can download the Visual Studio Async CTP to get a preview of what is coming in the asynchronous world! This is just the CTP version, so there may be changes between this version and the official release.

Also, visit Eric Lippert’s blog to learn more about the topic.

Reference Documentation

In the November edition of MSDN Magazine, Peter Gruenbaum explains how to write good reference documentation for APIs in his article titled “A Coder’s Guide to Writing API Documentation”.

My attention was particularly drawn to Figures 2 and 3, which explain how to comment while maintaining consistency throughout the API. I have reproduced them here:

Figure 2: Reference Documentation Style

Type Guideline Examples
Class Start with a word like “Represents” “Represents a user’s photo album.”
Methods and functions Start with a verb “Returns the number of contacts for the specified area.”

“Pauses the video.”
Properties Use a noun or start with verbs such as “Gets” or “Gets and sets” “The user’s tasks.”

“Gets and sets a collection of the user’s tasks.”
Events Start with a phrase such as “Raised when” or “Occurs when” “Raised when the response from server is received.”
XML elements Use a noun-based phrase “The city’s postal code.”
Boolean values For Boolean properties, start with “Indicates whether”; for Boolean return values on methods and functions, start with “Returns whether” “Indicates whether the control is visible.”

“Returns whether two regions intersect.”

Figure 3: Reference Documentation Example

[Read More]

[VS2010 Tips] Multi-line Insertion

While reading the MSDN article on converting VBA applications to C# 4.0, I remembered the famous ALT+[Selection] function that allows you to insert the same text/code on multiple lines at once. So, here is the English version of that part of the article:

Press ALT and select where you want to insert your code (selection in light blue in the image below):
image
Type your code and boom! All the selected lines have been filled with your code:

[Read More]

Visual Studio Power Tools, Code Compare and PowerCommands

Here is a collection of tools/plugins/utilities that allow you to work even more efficiently with VS2010. Here are the three that I install with VS2010. While you’re at it, take a look at the Visual Studio Gallery, you’re sure to find something interesting!

Visual Studio 2010 Pro Power Tools

Newly arrived, the Pro Power Tools offer better tab management (by project, color coding, scrolling, stacking, …) as well as search in the Add Reference menu, which is quite nice, and I even noticed an improvement in the performance of this dialog.

[Read More]