【发布时间】:2011-05-16 19:47:12
【问题描述】:
我的 Windows 服务需要从 Windows 防火墙创建/删除某些规则。为此,我通过 COM 与<windows>\system32\hnetcfg.dll 中的NetFwTypeLib 交互。 在我的 64 位 Windows 7 机器上运行良好,但在另一台 64 位 Windows 7 机器上进行测试会引发以下错误:
Service cannot be started. System.IO.FileNotFoundException:
Could not load file or assembly 'Interop.NetFwTypeLib,
Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' or one of its dependencies.
The system cannot find the file specified.
我有一种感觉,如果我在我的应用程序中嵌入和安装程序集,我会遇到不同版本的 Windows 以及 32 位和 64 位之间的问题。
如何解决这个缺少的程序集部署问题?
编辑:这似乎是一个VS2010 issue,适用于除 4.0 之外的任何目标框架。有没有人解决这个问题?
【问题讨论】:
-
您找到解决方案了吗?我需要使用 asme 的东西
标签: c# deployment assemblies filenotfoundexception windows-firewall