Replies: 3 comments 2 replies
-
Have you included the NuGet package Vanara.PInvoke.Dhcp? That should attach all the libs you need. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Ah, maybe the following: using Vanara.PInvoke;
using static Vanara.PInvoke.Dhcp; |
Beta Was this translation helpful? Give feedback.
1 reply
-
Vanara is a set of libraries that include mostly the raw exposure of the native Win32 APIs. There are a few wrappers, like DhcpClient in Vanara.Net, but it is mostly for mimicking the native C++ code like https://github.com/dahall/WinClassicSamplesCS/blob/master/Win7Samples/netds/dhcp/dhcprequest/Program.cs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to import some inherited code from .NET 4.6 to Core. They were using the DHCPServerAPI package which didn't seem portable to .NET. So I was trying to use the Vanara one and all the examples I found included a using statement of Vanara.PInvoke.Dhcp. However, every which way I try to install this I can never get to that path and in turn can't create the DhcpServer object to port the code logic over.
My gut says I'm missing something very simple. Any suggestions? We just started using .NET 7 so I'm not 100% familiar. I does show in the project file as a package reference. I tried rolling the project back to 6, but had the same results. THX.
Beta Was this translation helpful? Give feedback.
All reactions