-1

I am trying to add a dll into my windows form application type project. However, when I am adding the dll to reference folder it is throwing an error and restricting me to add the same. Enclosed is a screenshot. Can anyone please let me know, under which condition we get this error and how to fix it?

Note: I am not aware, the dll has been produced using what tool or version/type of it. screenshot of error

The message is:

A reference to C:\xyz.dll. dll could not be added, Please make sure that the file is accessible and that it is a valid assembly or COM component.

xMRi
  • 14,982
  • 3
  • 26
  • 59
Anil_Kumar
  • 19
  • 3
  • Possible duplicate of [A reference to the dll could not be added](http://stackoverflow.com/questions/3456758/a-reference-to-the-dll-could-not-be-added) – xMRi Feb 27 '17 at 14:22

1 Answers1

0

It's is exactly what you read and the message says.

Either thhis DLL doesn't contain any .NET code or class, or this DLL isn't a valid ActiveX DLL containing a typelib.

You can not add a DLL as a reference if it is not one of the above.

This is a possible duplicate to

Community
  • 1
  • 1
xMRi
  • 14,982
  • 3
  • 26
  • 59