0

I'm dealing with a C# project that states

using NetFwTypeLib;

The C# compiler doesn't recognize it, saying

Type or Namespace name "NetFWTypeLib" was not found.

What do I have to do to add it to my C# project? I see C++ examples for this, but I don't see which DLL that would be for a C# project.

Thank you!

tmighty
  • 10,734
  • 21
  • 104
  • 218

1 Answers1

0

Right click on the project -> Add reference -> NetFwtypeLib

if it's not working maybe this will be useful

InUser
  • 1,138
  • 15
  • 22
  • Thank you, but the DLL name is FirewallAPI.dll, can you fix this according to the post that you linked to? – tmighty Jun 04 '20 at 12:08
  • @tmighty you found it? cause mine NetFWTypeLib reference pointing to "Interop.NetFwTypeLib.dll" – InUser Jun 04 '20 at 13:07
  • @tmighty maybe VS or OS version related. – InUser Jun 04 '20 at 13:08
  • No, I didn't have the interop typelib version yet as I had never used the DLL before. The interop version is created when you fist reference the DLL. Do you want to change your answer accordingly? – tmighty Jun 04 '20 at 17:01