0

当我尝试在 Visual Studio 11 RC 中使用 regpkg 注册 Visual Studio 包时,我收到以下错误:

regpkg.exe /root:Software\Microsoft\VisualStudio\11.0 /codebase myvspackage.dll
Could not load file or assembly 'Microsoft.VisualStudio.Shell, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
system cannot find the file specified.

这适用于以前版本的 Visual Studio。我正在一个只有 Visual Studio 2012 RC 的干净虚拟机中工作。

我一直在网上冲浪寻找没有成功的解决方案。

如果我只是在我的应用程序位置复制 Microsoft.VisualStudio.Shell.dll 它可以正常工作,但是这个 dll 不可再分发,所以......在 Visual Studio 11 中注册包的正确方法是什么?

在此先感谢您的帮助,

路易斯

4

1 回答 1

0

I'll assume you also posted this to the MSDN forums since a question with identical text was posted there which I answered yesterday.

http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/96556cd4-44dd-4e01-8198-b83a66c6df26

In short it sounds like you have an explicit reference to v2 of Microsoft.VisualStudio.Shell.dll, James is incorrect in saying you aren't supposed to use this, this is simply MPF from 2005. Referencing it is perfectly fine. If you have an explicit version in the reference in the project file try dropping it, if not try adding the binding redirect mentioned in my MSDN forum post.

I have started a mail with the SDK team about this issue though I don't know if they will be taking any changes this close to release. Also, as an FYI, since Shell.dll is from 2005, it is nearing the end of its supported life, we generally support three versions of previous VS releases.

On release of 2012 the support will be 2008,2010, 2012. I suspect in the next release (after 2012) we may stop including Shell.dll (the 2005 version) entirely in the shipped product. Unless you need to run downlevel on say 2005 I would update the reference to one of the newer shell assemblies (like 9.0, 10.0 or 11.0)

于 2012-06-30T22:12:48.677 回答