我正在编写自定义WCF代理生成器。如果它完美地工作,直到我添加更多代码并更改版本并重新签名。当我执行插件时,我得到文件未找到COM错误。当我启动Fuslogvw时,它报告它找不到具有不同版本和公钥的旧版本程序集。有什么我做错了,我设法在GAC中找到了正确的版本。
相关的错误信息是:
=== Pre-bind state information ===
LOG: User = xxxxx\xxxxxx
LOG: DisplayName = MyProxyAddin, Version=1.10.0.0, Culture=neutral, PublicKeyToken=385b6950f1bca43c
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = devenv.exe
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: MyProxyAddin, Version=1.10.0.0, Culture=neutral, PublicKeyToken=385b6950f1bca43c
LOG: GAC Lookup was unsuccessful.
为了您的信息,我使用GAC utils在GAC中安装了程序集,并使用以下代码注册了程序集:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\CLSID\{69cf4e9e-c755-408a-b407-117cc3acabec}]
@="MyProxyAddin.MyProxyGenerator"
"InprocServer32"="C:\\Windows\\SysWOW64\\mscoree.dll"
"Class"="MyProxyAddin.MyProxyGenerator"
"Assembly"="MyProxyAddin, Version=1.12.0.0, Culture=neutral, PublicKeyToken=3f2f3c47238a72fe"
"ThreadingModel"="Both"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Generators\{164B10B9-B200-11D0-8C61-00A0C91E29D5}\My Proxy Generator]
@="My WCF Proxy Generator"
"CLSID"="{69cf4e9e-c755-408a-b407-117cc3acabec}"
"GeneratesDesignTimeSource"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Generators\{E6FDF8B0-F3D1-11D4-8576-0002A516ECE8}\My WCF Proxy Generator]
@="My WCF Proxy Generator"
"CLSID"="{69cf4e9e-c755-408a-b407-117cc3acabec}"
"GeneratesDesignTimeSource"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Generators\{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}\My WCF Proxy Generator]
@="My WCF Proxy Generator"
"CLSID"="{69cf4e9e-c755-408a-b407-117cc3acabec}"
"GeneratesDesignTimeSource"=dword:00000001
答案 0 :(得分:0)
如果我正确理解了这个问题,那么引用的程序集有一个新版本,但引用程序集仍然在寻找它的旧版本。尝试删除VS中引用的程序集并添加对新程序集的引用。然后重建引用程序集。