开发者

Visual Studio looking for the wrong version of my assembly

I'm writing a custom WCF proxy generator. Had it working perfectly until I added more code and changed the version and resigned it. When I executed the addin, I get file not found COM error. When I launched Fuslogvw it reported it couldn't find an the old version assembly with a different version and public key. Is there something I am doing wrong, I managed to find the correct version in the GAC.

The relevant error message is this:

=== 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 c开发者_如何学Pythononfiguration 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.

For your information, I installed my assembly in the GAC using GAC utils and registered the assembly using the following:

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


If I understand the issue correctly, there is a new version of referenced assembly, but the referencing assembly is still looking for the old version of it. Try remove the referenced assembly in VS and add reference to the new one. Then rebuild the referencing assembly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜