Warning MSB3305: Processing COM link "NETCONLib" from the path "C: \ Windows \ system32 \ hnetcfg.dll"

I work in Windows 8.1 (64 bit), VS 2013. I am creating a project that shows such a warning. My project is working fine, but in any case, I need to remove this warning. Please, help

warning MSB3305: Processing COM link "NETCONLib" from the path "C: \ Windows \ system32 \ hnetcfg.dll". At least one of the arguments to "INetConnection.GetProperties" cannot be marshaled by the runtime marshaller. Therefore, such arguments will be passed as a pointer and may require the use of unsafe code to

Please help resolve this warning .. Thanks in advance

+4
source share
2 answers

IanG found a solution that worked for me too:

I added this to the PropertyGroup at the top of my .csproj file:

<ResolveComReferenceSilent>True</ResolveComReferenceSilent>

Keep in mind that this will eclipse any warnings. If you use functions that are not intended to be used from managed code, do not use this โ€œsolutionโ€.

+2
source

If you are sure that your project is working fine and you want to delete only the warning message,
you can do this using#pragma warning

http://msdn.microsoft.com/en-us//library/2c8f766e.aspx

-1
source

Source: https://habr.com/ru/post/1531161/


All Articles