【发布时间】:2012-03-21 08:01:35
【问题描述】:
我在使用NATUPnPLib 时遇到问题。当项目在 .Net 4 上运行时,我有一段代码运行良好。但是,不幸的是,当我在 .Net3.5 中尝试相同的代码时,在构建项目时出现了一些程序集引用错误。
UPnPNATClass upnpnat = new UPnPNATClass();
IStaticPortMappingCollection mappings = upnpnat.StaticPortMappingCollection;
我得到以下构建错误:
The type or namespace name 'UPnPNATClass' could not be found (are you missing a using directive or an assembly reference?
虽然我已经从添加引用中添加了对 NatUPnP 库的引用 --> COM
我已在互联网上搜寻解决方案,但找不到任何帮助。我希望这里有人可以提供帮助。
PS:我关注了这个Article about NAT Router and UPnP
感谢和问候。
【问题讨论】:
标签: c#