Wednesday, December 9, 2009

.reg file created by regasm cannot be ported between 32-bit and 64-bit!

When you create a .reg file using regasm

While working on the WS-Security project, I found out this really weird behavior. I was building my .NET dll on Win XP 64-bit, IIS6, VS2005 machine. But the .NET dll itself was compiled in 32-bit. I used Regasm to create a .reg file, which I then double-clicked to add registry entries.

But it wouldn't work! For some reason the registry entries could not be found! This worked fine on a 32-bit Win XP system. At last, I found out the reason: http://support.microsoft.com/kb/896459

The solution: Don't create a .reg file. Just use regasm .dll. Creating a .reg file for a 32-bit program doesn't add it correctly to a 64-bit system.

No comments:

Post a Comment