Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

NMaven and COM Interop

When Visual Studio compiles code that uses a COM object, it creates a wrapper dll. For example, compiling code in MyProject that uses Shell32.dll will result in both MyProject.dll and Interop.Shell32.dll being created.

This also needs to happen if there is a transitive dependency-- if OtherProject depends on MyProject, and MyProject uses Shell32.dll, then Interop.Shell32.dll also needs to be available when building OtherProject.


1. If needed, ActiveX/COM objects must be pre-installed on the build system. NMaven will not do the installation.

2. Adding ActiveX/COM from VS "Add Reference" should update the POM information with a <dependency> with type=com_reference.

3. Generating POMs from a project containing a COM reference will result in a POM with a dependency with type=com_reference.

4. When a dependency with type=com_reference is encountered, NMaven will generate the interop wrapper dll and use it during compilation.

5. Deleting ActiveX/COM reference should remove the com_reference dependency from the POM.

6. Adding ActiveX/COM from "Add Maven Artifact" local or remote Maven repository is not allowed. If this attempted, a meaningful error message should be displayed, and nothing should be added to the POM.

7. Building a project with ActiveX/COM references should successfully build if the referenced ActiveX is pre-installed in the system.

8. Building a project with ActiveX/COM references but the actual ActiveX/COM is not in the system should prompt a meaningful error message.

9. Interop wrapper DLLs may be installed/deployed to the local/remote repository and consumed as normal 'library' dlls.