【问题标题】:Can a Visual Studio 2010 Package be installed in Visual Studio 2008?Visual Studio 2010 包可以安装在 Visual Studio 2008 中吗?
【发布时间】:2010-11-04 23:36:54
【问题描述】:

我想要一个可在 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. 如果是,我该怎么做才能注册成功?

谢谢!

【问题讨论】:

    标签: .net visual-studio-2010 visual-studio-2008 vsx vspackage


    【解决方案1】:

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

    【讨论】:

    • 我打算从我的包中引用一个 .NET 4 库,但是 :( 我无能为力吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多