Wednesday, July 30, 2008

How to Debug the Installation of Windows Service

Just setup in your Debug tab of your Visual Studio Windows Service project:

· Select Start external program” and find InstallUtil.exe (usually under <Windows\Microsoft.NET>)

· Then as command line argument put the name of your executable

· As a working directory, select the output folder of your project

It should look like this:


Setup the breakpoints and hit F5. The installation should start and stop at your breakpoint.

The service might be not be completely installed or removed. If that is the case, just use in a command line window installUtil /u <path:filename of your executable>

Tuesday, July 08, 2008

VS 2008 - Designer error - Workflow & IIdentifierCreationService

Today I have come across this error on my Visual Studio 2008 whilst designing new Activities:

The service 'System.Workflow.ComponentModel.Design.IIdentifierCreationService' must be installed for this operation to succeed. Ensure that this service is available.

I found this entry “Making a Custom Activity Work in Your Project (even if you started with a class library) from Rob Bogue's blog.


Basically, I added a “C# class library” project to my Solution and then added classes and make them inherit from “System.Workflow.ComponentModel.Activity”.

I needed to edit the project file and add two things:

1. Some project type GUIDS

      <ProjectTypeGuids>{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

· {14822709-B5A1-4724-98CA-57A101D1B079}: This tells that it is a Workflow type project

· {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}: This tells that it is a “C# Class Library” project

2. An import statement to import .NET 3.5 Workflow code into my project

      <Import Project="$(MSBuildExtensionsPath)\Microsoft\Windows Workflow Foundation\v3.5\Workflow.Targets" />


After that, I could see my activities in the Designer.