Visual Studio 2013 – Clean Solution

I recently upgraded a project from Visual Studio 2010 / .NET4.0 to Visual Studio 2013 (update 4) / .NET 4.5.
Code that was working for weeks, didn’t work anymore (exceptions in Caliburn.Micro).

I reinstalled all my Nuget packages, verified the public key tokens of the libraries via the Strong Name Tool (SN.exe -T my.dll), did “Clean Solution”, “Rebuild Solution”, rewritten code, etc…

In a desperate action I manually cleaned every bin and obj folder in my Workspace.
After this action the code started to work again.

Then I was wondering: Does the “Clean Solution” in Visual Studio 2013 work different compared to Visual Studio 2010.
An internet stranger gave me a good hint:

“Sorry, but this is simply not true. It does not delete the contents of /obj which are the root of the problem. At least this is the situation with VS 2013 update 3.”

After searching some more, I was happy that I was not the only one who had problems with Visual Studio 2013 and the Clean Solution:

“However, once I’ve converted my projects to Visual Studio 2013 I star receiving error on build or deploy:”

Conclusion: if you upgrade to Visual Studio 2013 and receive strange exceptions, clean the obj directories manually or change your project file to remove the obj directory before each build via the BaseIntermediateOutputPath property/parameter.

By default the BeforeBuild and AfterBuild are not used. You can see this by unloading your project in Visual Studio and then right-mouse click it and select Edit:

<!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  <Target Name="AfterBuild">

Uncomment the BeforeBuild.
Your project file should now contain this:

<!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets. -->
  <Target Name="BeforeBuild">
    <RemoveDir Directories="$(BaseIntermediateOutputPath)" />
  <!--<Target Name="AfterBuild">

Information on the BaseIntermediateOutputPath property/parameter:

 “The top-level folder where all configuration-specific intermediate output folders are created. The default value is obj\. The following code is an example:  <BaseIntermediateOutputPath>c:\xyz\obj\</BaseIntermediateOutputPath>”

If you receive the Error after changing the project:

 Unable to remove directory “obj\”. The directory is not empty

Go have a look at this url:
It might also be related to Visual Studio 2013…


Fixing comctl32.dll WIN32Exception

A C# project was recently upgraded from .NET 3.5 to .NET 4.0.
The program worked fine, except on a Windows 8 Pro x64 machine where this error was given:

Win32Exception: Cannot load the “comctl32.dll” DLL into memory.

The solution that worked for us (after a long search) was removing CorFlags to set the application to 32-bits mode. When a new build was created without CorFlags and setting Visual Studio to build the project to x86 instead of x64 solved the problem.

It looks like CorFlags is not reliable…

TowTruck: a service for websites to collaborate in real-time

TowTruck is a service for your website that makes it surprisingly easy to collaborate in real-time.

TowTruck is incredibly easy to set up on your site.  All you need to do is include a couple lines of JavaScript and your site has TowTruck tools enabled.

When a user comes to your site, they’ll be able to activate the TowTruck tool and send a link to a friend to start collaborating on the web site.

TowTruck has collaboration features like cursor-mirroring (allowing you to see your friend’s cursor on the screen in real time), collaboratively editing forms and text, browsing through the site, and both text and real-time voice chat.

More info at:

Disable the Toggle Completion Mode in Visual Studio

When writing code in Visual Studio, the shortkey Ctrl+Alt+Space toggles the completion mode of IntelliSense in the Text Editor.
The completion mode can be manually changed by going to this menu in VS2012:
EDIT > IntelliSense > Toggle Completion Mode

However the shortkey can be annoying while coding, depending on your keyboard configuration and language.

To disable this shortkey command in Visual Studio 2012 follow these steps:

  • Go to TOOLS
  • Select Options…
  • Go to Environment > Keyboard
  • Below the Show commands containing: type the word completion and hit the TAB-key
  • The filtered listbox should now contain a command called Edit.ToggleCompletionMode
  • Select it and hit the button Remove
  • Click OK to close the Options form

visual studio 2012 keyboard command options

These steps are very similar to Visual Studio 2010.

SharePoint service not working after changing password and installing updates.

These steps will guide you in case you recently changed a password in Active Directory of an account that is used by SharePoint 2010 and you notice that your services are not working anymore.

For example, my search service stopped working:

“The search request was unable to connect to the Search Service.”

  1. Log in to the SharePoint 2010 Central Administration
  2. Under “System Settings” go to “Manage services on server”.
    Here you will find services that have stopped, because the password is wrong.
  3. If you try to start a service it is possible that you will receive a message that it doesn’t work,   because the passwords are different.

It is easy to fix this. Start the SharePoint 2010 Management Shell. Type in this command:

Set-SPManagedAccount -UseExistingPassword

It will ask for your identity (= username) and it will ask for the password of that account.

More information can be found here:

If you receive an error similar to

"Set-SPManagedAccount : Microsoft.SharePoint is not supported with version 4. of the Microsoft .Net Runtime. ..."

after entering the command. You might receive this message after installing recent Windows Updates.

  1. Go to the Windows start menu
  2. in the “Search programs and files” textbox from the Windows start menu search for SharePoint
  3. right mouse click on the “SharePoint 2010 Management Shell” and select “Properties”
  4. In the Target input box change this:
    C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe -NoExit  " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' "

to (add -v 2 or -version 2)

C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe -v 2 -NoExit  " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' "

Now your SharePoint will start with another powershell version.

After changing your password you can go back to the SharePoint 2010 Central Adminitration and start your services with the new password (it is possible that you will have to enter your password again when starting the SharePoint service).

Rx (Reactive Extensions)

Reactive Extensions (Rx) was added to

The project is actively developed by the Microsoft Open Technologies, inc., in collaboration with a community of open source developers.

The Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators. Using Rx, developersrepresent asynchronous data streams with Observables , query asynchronous data streams usingLINQ operators, and parameterize the concurrency in the asynchronous data streams usingSchedulers. Simply put, Rx = Observables + LINQ + Schedulers.

Find out more on: