Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>We faced with the same problem when we tried to complite a project that had a reference to this COM object.</p> <p>On machine with Windows 7 x64 and VS 2010 it compiled fine. On machine with Win2003 x64 and VS 2010 (the same project in it) we got compilation error "The type or namespace name 'INetFwMgr' could not be found".</p> <p>Firtst what I did - I set build output to "detailed". I observed that it rus this command:</p> <pre><code>"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\TlbImp.exe" C:\WINDOWS\SysWOW64\hnetcfg.dll /namespace:NetFwTypeLib /out:"obj\Debug WF\Interop.NetFwTypeLib.dll" /sysarray /transform:DispRet /reference:D:\Projects\Framework\Projects\FrameworkBase\Dlls\KellermanSoftware.NET-Email-Validation.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll /reference:"C:\Program Files (x86)\TestDriven.NET 2.0\NUnit\2.4\nunit.framework.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.configuration.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.DirectoryServices.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Management.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Runtime.Remoting.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Runtime.Serialization.Formatters.Soap.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.ServiceProcess.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:D:\Projects\Framework\Projects\Common\ZipLib\bin\Debug\ZipLib.dll /reference:C:\WINDOWS\assembly\GAC\stdole\7.0.3300.0__b03f5f7f11d50a3a\stdole.dll /keyfile:StrongKey.snk </code></pre> <p>and result of this command is fine - it produces the file</p> <pre><code>"D:\Projects\Framework\Projects\FrameworkBase\obj\Debug WF\Interop.NetFwTypeLib.dll" </code></pre> <p>The same file is produced on Windows 7 machine. However, there is one difference: the sizes of the files <code>Interop.NetFwTypeLib.dll</code> are very different.</p> <p>It seems to me that files hnetcfg.dll on Windows 7 machine and on Windows 2003 x64 machine are too much different, and, unfortunately, the import table in Windows 2003 file is broken.</p> <p>I have no idea if Microsoft has fixed this and if in some Windows update they will submit a normal hnetcfg.dll with normal import table. I don't care about them.</p> <p>What I did is next: I got a normal Interop.NetFwTypeLib.dll on Windows 7 and included it in separate folder of a project into source control, and put my reference to this file (instead of having reference to COM). And the problem is solved.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload