1

I need to install a C# COM object, however, my C# package has a dependency chain.

When trying to register the DLL I get this error message:

RegAsm : error RA0000 : Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

I assume there's an elegant way to do this, rather than manually hunting down each DLL and making sure it's in the same directory as the DLL I'm registering, but I haven't been able to hunt down the solution.

I'm guessing there's either a way to package up all my dependent DLLs, or there's something wrong with my path where at least core .Net DLLs should be available in the path somewhere?

Research

This question explains how to install a COM, but doesn't cover how to handle dependencies.

This article does a similar job of explaining COM installation without mentioning dependencies.

Community
  • 1
  • 1
Jamie Butler
  • 235
  • 1
  • 2
  • 19
  • The error message says that you are missing .NET System.Net.Http dependency, it is not related to COM. Until .NET 4.5, this assembly is not deployed as a part of the framework. This might help: http://stackoverflow.com/questions/18827611/deploying-system-net-http-dll-with-clickonce – Zdeslav Vojkovic Mar 14 '16 at 11:29
  • Thanks, I think you've found the problem. It's a Server 2003 box I'm trying to install this on, so it only has .NET 4.0. There is apparently a workaround though, so not all is lost. – Jamie Butler Mar 15 '16 at 01:04

0 Answers0