c++ - 警告 MSB3305 : Processing COM reference - At least one of the arguments cannot be marshaled by the runtime marshaler

标签 c++ dll visual-studio-2013

我在 Windows 8.1(64 位)VS 2013 中工作。我正在构建一个显示这样警告的项目。 我的项目工作正常,但无论如何我需要删除此警告。请帮忙

warning MSB3305: Processing COM reference "NETCONLib" from path "C:\Windows\system32\hnetcfg.dll". At least one of the arguments for 'INetConnection.GetProperties' cannot be marshaled by the runtime marshaler.Such arguments will therefore be passed as a pointer and may require unsafe code to manipulate

请帮助解决这个警告.. 提前致谢

最佳答案

IanG found a solution这对我也有用:

I've added this in the PropertyGroup at the top of my .csproj file:

<ResolveComReferenceSilent>True</ResolveComReferenceSilent>

请记住,这会消除所有警告。如果您碰巧使用了不打算从托管代码中使用的功能,则不要使用此“解决方案”。

关于c++ - 警告 MSB3305 : Processing COM reference - At least one of the arguments cannot be marshaled by the runtime marshaler,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22325870/

相关文章:

C++ - 给定多个二进制字符串,如果所有给定字符串的第 n 位相同,则生成第 n 位被设置的二进制字符串

c++ - 在 TBB 中实现 MapReduce

c++ - 查找表示 GPS 路线的两条线之间的距离(MATLAB、Java、C++ 或 Python)

C# - 获取应用程序构建所针对的引用 DLL 的版本(不是它在运行时引用的内容)

c++ - 如何仅从 linux SO 库中导出某些函数?

vb.net - 需要帮忙!升级到新 PC,从 Visual Studio 2008 升级到 2013。ODBC 数据连接在我的所有项目中都已断开

c++ - 试图摆脱 C++ boost 警告

c++ - 平台无关的 C++ DLL

crash - 如何删除已安装的 Visual Studio 2013 扩展 .vsix 文件?

visual-studio-2013 - Visual Studio查找和替换具有默认文件类型