0

我想要一个可在 VS2008 中加载的 Visual Studio 包。为此,我已按照以下步骤操作:

  1. 在 VS2008 中创建了一个新的包项目并确保它可以正常加载
  2. 将项目移植到 VS2010 格式,在那里编译并确保它可以工作。
  3. 然后我将目标框架更改为 .NET 4,编译时收到以下消息:regpkg : error : Could not load file or assembly 'file:///C:\SVN\Debugger\src\Visualizer2008\bin\x86\Debug\Visualizer2008.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

问题

  1. 首先,是否有可能将 .NET 4 包加载到 VS2008 中?
  2. 如果是,那么我该怎么做才能成功注册?

谢谢!

4

1 回答 1

2

加载到 Visual Studio 2008 中的包将始终使用 2.0 CLR。由于不兼容,无法将针对 4.0 CLR 的内容加载到 VS 2008 中。您需要以 .NET 3.5 或更低版本为目标才能在 2008 年加载包。

于 2010-11-04T23:40:04.397 回答