IIS Express Webserver Here - Shell Extension

If you have installed mono, mono comes with a web server called XSP. One of my favorite feature of XSP (or mono) is you can right click on any folder and start a website with that folder as the physical path. And if you are downloading lot of sample code...


How to fix error The target "GatherAllFilesToPublish" does not exist in the project

Today while publishing a web application I got a strange error like this from Visual Web Developer express. The target “GatherAllFilesToPublish” does not exist in the project. Web publishing was working without any problems, only reason was I have installed Windows Azure SDK. Then found the solution, thanks to Google....


How to pause / resume a thread in C#

Here is the code snippet which will help you to pause / resume a thread using ManualResetEvent class. Both Suspend() and Resume() methods are deprecated in .Net Framework. So both of these methods not recommended to use. private ManualResetEvent _manualResetEvent = new ManualResetEvent(true); var thread = new Thread(() => {...


Unexpected error encountered opening Visual Studio project

Today while opening a win-form project, I got an exception message like this from Visual Studio. And then the Visual Studio project was not available in the solution. All the project said was “The project file cannot be loaded.” This error is because the project was under Subversion version control,...


Unit Testing Windows Phone Applications

Recently Microsoft released Update 2 for Visual Studio 2012. If you installed the Update 2, you will get a new project template, under Windows Phone, Windows Phone Unit Test App. This will help you to create unit test project for Windows Phone 8 applications. Once you create the project, necessary...


How to use existing Database in Windows Phone

Normally in Windows Phone apps, we used to create Database in the Application Launch event, like the following if (!dataContext.DatabaseExists()) { dataContext.CreateDatabase(); } And if there is any master tables you can write code to insert after database creation, like this. if (!dataContext.DatabaseExists()) { dataContext.CreateDatabase(); dataContext.Categories.InsertAllOnSubmit( new[] { DefaultCategory });...


Retrieving the COM class factory for component failed due to the following error: 800702e4.

While working on some outlook C# application I got a COM exception like this. Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005. My code was simply straight forward, I was just creating the instance of the outlook application. var oApp =...


Assembly Binding Redirection in .Net

Today I come across an application crash due to version mismatch. The application executable was compiled using version 1.0.x.x, and we were using 6.2.x.x. Due to this version mismatch application was crashing. Unfortunately we don’t have the source code of this application with us. Later I got one solution using...