Wednesday, 10 July 2013

Version Unknown / Unhandled Exception Occurs in

It is an usual strange story with developers those who are working on windows application. The application will always work perfectly(in any situation) in my machine. But in a customer's/deployment machines, It will act strange.

The above situation is not only with apps, also it will happen while working with Visual Studio(any version). If It will work properly in your machine, sure you may face some problems with build machine.

I am sure the following problem will face by VS developers.

The problem was, a project is compiling without problem in my machine but not in a build machine. The error from the build machine was "An unhandled win32 exception occurred in regcap.exe[processid]".

Figure 1 : Exception snap from Windows XP.

Figure 2 : Exception snap from Window 7.

Figure 1

Figure 2

What I did wrong, I don't know. So Googled with search term An unhandled win32 exception occurred in regcap.exe[processid]. The search results ask me to do 2 things.

1. Disable to Just-In-Time Debugger. 
2. regcap.exe file is not compatible and make it compatible. 

I tried to disable JIT debugger and I got the same exception in a different dialog window(figure 3).

Figure 3

OK, let's make regcap.exe file to compatible. And how to do that. 

1. Right click on that file select Compatibility-->Run as Administrator
2. Right click on that file select Compatibility-->Compatibility Mode-->Windows Vista SP2 or Windows XP SP3.(Figure 4).

Anyway either steps are not worked.

Figure 4

I started feel that, the problem is neither with Visual studio settings nor Windows compatibility. It might be with some file(s) in the solution. I have three projects and each project has countable amount of files and which one causes this ?

I forgot to tell something, yes, the application which I am working. I should give an intro for my application. It is Microsoft Outlook Plug-in using Add-in Express. As I already told, I have three projects in that solution. One of the project is some pre-installation settings. The another one is the main project, It is "Extensibility Add-In Express" project. Third one is MSI setup project.

The compilation of the whole solution breaks somewhere at middle. Instead of compiling whole solution, I want to try individual project. That may take me to exact place of the issue. Yes it does.

First two project do not have any problem in compiling. But the setup project has ! Now I exclude all files in the setup project and tried compilation, it works. So I include files one by one and tried the compilation. It breaks at including the file AddinExpress.mso.2005.tlb. When I check with my machine, the file is not present in my setup project. This is because of different versions of Add-in Express. The build machine has higher version(6.6). It automatically includes the file AddinExpress.mso.2005.tlb. But in my machine it does not include that file(Add-in Express 6.4). And there is no problem with compilation after exclude the file( We can exclude that file : from Add-In Express ).

The lesson I have learned from this debugging is, Versions compatibility check is one of high priority in debugging.

The lesson I need to know is, why the file AddinExpress.mso.2005.tlb is not present in lower version(6.4).

No comments:

Post a Comment