Sunday, December 6, 2009

Intro Programming Book - now for C#

An year ago we introduced our book - "Intro programming in Java". The project was very successful and helped many students to many their first step into the world of programming. Now I am happy to announce that its version in C# has started. All examples will be created with the latest Microsoft products - Visual Studio 2010 and .net 4.0 The book will again introduce some of the basic aspects of the programming that every young programmer need to know. The project will be with open license again and available for download directly from the repository located in I hope you'll like it.

Saturday, September 5, 2009

Visual Studio 2010 with multi-monitor support

I have recently got familiar with the news that Visual Studio 2010 will now support multi - monitor support. In the new version of the .NET IDE we will be able the utilize the room on all screens. VS 2010 offers us ability to position any toolbox or window outside the main container giving us flexible workspace. I am sure that I am going to this most of the development time. Below is an example of how we can get advantage of this ability.

Wednesday, September 2, 2009

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered error

I have recently worked on system that used access 2007. As we know it uses oledb driver to connect. If we do not have access 2007 installed we need to install Data Connectivity Components provided by Microsoft. Well, everything went fine on the developer machine until we tried to deploy to the server. At first it started throwing exception "Microsoft.ACE.OLEDB.12.0' provider is not registered", which was normal - Data Connectivity Components were not installed. But despite we installed the driver it continue throw the same error. It turned out that the problem is located in the x64 architecture of the server. Microsoft.ACE.OLEDB.12.0 does not work in x64 environment. So, our solution was to target the application to x86 platform. This will force the application to run in 32bit environment. This can be accomplished using configuration manager section in Visual Studio.

Tuesday, September 1, 2009

AnkhSVN or How to make life easier

I have recently rediscovered AnkhSVN - Adding for Visual Studio allowing easy and painless SVN intergaration directly in your IDE. Previously I used TortoiseSVN, but it has one main problem - it integrated in the Windows explorer. So why not use SVN directly from Visual Studio. We only need TortoiseSVN installed and install the AnkhSVN plug-in. After that we need to configure VS source control plug-in in Options menu. And the best of all is that AnkhSVN inherits all the settings of the TortoiseSVN. Now it is available even for VS 2010 beta. Enjoy!

Java2Days Conference - Coming

I am very exited to present you the very new conference Java2Days is officially annonced. Here in NASD with the cooperation of Insight_Technologies we have gave life to the new tradition - one of the few Java events in Eastern Europe.

On the 8-9 October we excpect more than 600 people to become part of this event.

The speakers will be some of the most famous people in the IT industry. I am eager to hear the sessions of Reza Rahman, Rop Harrop, Bruno Bossola and many others. Stay in touch for the latest information about the conference on

Thursday, August 20, 2009

WebAII 2.0 - Web autmation testing, now easier than ever

When we start testing Web we have to deal with many variables - different Browsers, different technologies used.

You remember the Selemium IDE and its recorder that simplify the way we create tests. Recently I found one new great product which will make .NET system testing even easier.

ArtofTest has released new web testing framework WebAII which gives great abilities for testing different browsers by creating complicated tests right into our visual studio IDE. It can even test Silverlight. I am very exited to go forward with it and post more detail review about this great technology. Meanwhile you can download it from and watch video tutorials here

Sunday, April 26, 2009

Fck editor and ASP.NET

In this article we will look how fck editor can be integrated in our ASP.NET applications. To get it work we need to do the following:

Download and compile the fck editor for .net project.
Dowlnload and place the scripts folder fckeditor in the root directory. If you want to place it in subfolder you need to change the path to resources (config file).

After that you need to reference the FCK assembly and you can use it on the page:

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<fckeditorv2:fckeditor id="FCKeditorExample" runat="server"/>

And we are ready to go:

Enjoy the Power of FCKEditor.

Tuesday, March 24, 2009

Creating installer for Java application using Visual Studio Setup project

In this article we will get familiar how to create custom installer for non .NET based application using Visual Studio Setup project technology.

It is known that Setup project in VS 2005/2008 gives way to easy creation of msi installer for your .NET application, automatically detect decencies, execute custom actions, etc. In this post I will show one unusual case where this technology can be used – creating installer for Java application. There are steps in this task:

  1. Ensure that correct version of Java is installed on the machine and install Java if needed
  2. Copy the application in the chosen folder and create shortcut to the desktop.

  1. Check the target machine for Java installed and install Java if needed – way 1

First we need to check if our machine has installed the correct version of JRE. In our case we will check if Java version 1.6 is installed on the machine. To do this we will check target machine registry records. First let’s see what .NET offers us. We can use the Section Launch conditions in our Setup project to check the registry:

Go to launch condition section, right click on the Search Target Machine and add Search registry node. Then set its properties to search the current Java version. The key we are looking for is HKEY_LOCAL_MACHINE\SOFTWARE\JAVASOFT\JAVA RUNTIME ENVIRONMENT /CURRENTVERSION.

Next we can add Launch condition. We add condition for java version based on the found registry entry. We are looking for Java 1.6 or higher. We specify the error message and the installation URL.

This is some way to deal with the situation but it does not actually installs JRE rather than preventing program install if the requirement are not satisfied. If you run this installer on machine without Java you will need to manually install the JRE after its installation is complete.

  1. Check the target machine for Java installed and install Java if needed – way 2

The second way is to use one of the benefits of the setup projects – creating custom action. It allows you to trigger event during installation. Here we can call the installer directly by selecting the path to the .exe. We can add condition to start this exe and again we will use search result from registry search “JAVAVERSION” from the previous example.

We can add the desired file in our project through the file system editor and then executed it as a custom action. Everything seems quite simple, but wait, there is a catch – JRE 1.6 is MSI installer. That means that you cannot run it while our MSI is running. As a result we can use this approach when we are running non-MSI installers. So what to do then?

  1. Check the target machine for Java installed and install Java if needed – way 3

What if we have MSI installer, containing software that is vital for our program? The decision is called prerequisites. As we know when we add .NET project output in Setup project it automatically detect its dependencies and add them as prerequisite. So, we will use this mechanism to add Java as prerequisite. We can view the current project prerequisites from Project -> Properties -> Prerequisites. Currently only .NET Framework and Windows installer will be selected. We will deselect them, since our project will not .NET. If we look at the list we won’t find JAVA as prerequisite (what a surprise :). But we can add it. All we need is to create package manifest. For this we will need Bootstrapper Manifest generator. The one for VS 2008 can be found here. So, after installation we open it and choose New -> Package Manifest.

Next we name the project.

After that we can add the file for Java installation from the top-left file – the installer icon. Next we choose the install file we need to add.

After that we need to add the system registry check. We choose System check tab and add new registry check. We will search for the same registry record as before.

Then we add display name of the install file is its settings. We name it Java. And the package is ready. There are also many other settings that can be set. Check whether folder named Java is located in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\.

And now we go back to Prerequisites menu of our project we will se that our Java is in the list. Check it and select the second option from the radio button list. That way your these installations will be copied in the output directory.

Now we can add the Java application file in the application folder and finish installation as it is .NET based.

One more thing, creating the desktop shortcut mechanism is not obvious – creating new shortcut directly in the folder gives you only option to choose folder. To create shortcut to your file you need to right click on your file and choose create shortcut. Then you can move it to the desktop.

In this we saw several ways to extend the ability for creating flexible installer. This approach is not limited to Java or .NET applications but can be used on other technologies as well.