Sunday 15 July 2012

c# - Deploying .NET COM dlls, issues when used on another computer -


I'm new to C # programming, and I need your help on something.

A quick review of what I have to do first.

I have to make: - A DLL which is several. The H5 files (HDF 5 format) and an XML file - the viewer for the article written in a WPF-In-HDF 5 file.

The problem is that they are going to be used in software called Panorama A2, which basically manages DLL, very restrictive way. For example, this does not allow .NET Framework 4 (which uses the 3.5 version of the framework).

More information about Panorama:

I am using HDF5DotNet.dll, which I compiled for .NET 3.5 in X64, and my WPF application Dynamic Data Display for

All of my DLLs are being used by other computers, where the panorama is installed, and there is no Visual Studio (only 3.5 .NET frameworks and some essential tools).

What's the problem?

Well, first, my WPF application is not really one, Panorama WPF does not support only Windows Forms, and only as DLL. Which means that I have created a WPF UserControl, which I embed into a Windows parent DLL.

I have basically 2 DLLs, one that is WPF control, and which uses this control in a conform, this is the last one in Panorama which I have to integrate. On my computer, which I'm coding, Panorama correctly recognizes DLL and there is no problem in it.

But when I try to give my colleague to these DLL, then without it the Panorama Visual Studio is installed, strong> it does not work After some tests, I saw That it only works if the project (DLL) has been compiled on the same computer.

The same problem goes to other DLLs, one that creates the file as I said, it uses HDF5DotNet.dll, but it seems that it did not make it correctly I have been thinking that this is the only problem, the DLL is not recognized.

What I have tried

I thought the DLL might not have been exported correctly. Perhaps referenced DLLs or assemblies are not given, which are COM DLLs when you compile on the same computer, because they are used in Panorama, and I can not manage to export them correctly.

I tried to build the setup project so that they could be installed with their dependencies, but I could not find a way only DLLs are installed. I tried to see my DLL with dependency walker , And there are some places where dependencies are missing. Even if I try to add them manually, there is no change in anything.

I also know that regsvr32 does not work with .NET DLL, because there is no entry point. That's why I thought about GAC, but I can not manage to register them (with strong names and everything), because I can not directly create them.

So yes, sorry for the long post, I tried to explain the thoughts of my train and what I really tried to do, but give me your projects to my colleague There is no way to get them so that they can use them on their computer.

"self registration" (this is RegSvr32, RegAsm or other) a Windows Installer Best Practice is not. This process injects dependency from dependency into important paths which do not have information about the installer, which can be unsuccessful and can not be uninstalled or uninstalled.

The best way to use RegAsm / regfile is to create COM metadata for the ComVisible assembly and then write those registry values ​​in your MSI registry table. In this way, the Windows Installer has to implement the registry values ​​only to copy the DLL and register its components. It is very less likely to break and it can be uninstalled and it can be corrected properly.

How do you do it depends on the device that you are using for your MSI writer. In YX you will use the heat to harvest this information. In InstallShield you will set the .NET ComVisible attribute to the right.

The end result is the same.

No comments:

Post a Comment