Visual Studio 2010 包可以安装在 Visual Studio 2008 中吗?
我想要一个可在 VS2008 中加载的 Visual Studio 包。为此,我遵循了以下步骤:
- 在 VS2008 中创建一个新的包项目,并确保其加载正常
- 将项目移植为 VS2010 格式,在那里进行编译并确保其正常工作。
- 然后我将目标框架更改为 .NET 4,编译时收到以下消息:regpkg : error : Could not load file or assembly 'file:///C:\SVN\Debugger\src\Visualizer2008 \bin\x86\Debug\Visualizer2008.dll' 或其依赖项之一。该程序集是由比当前加载的运行时更新的运行时构建的,无法加载。
问题
- 首先,是否可以将 .NET 4 包加载到 VS2008 中?
- 如果是的话我该怎么做才能注册成功呢?
谢谢!
I wanted to have a Visual Studio package that is loadable in VS2008. To do so I've followed these steps:
- Created a new package project in VS2008 and made sure it loads fine
- Ported the project to VS2010 format, compiled there and made sure it works.
- Then I changed the target framework to .NET 4 and when I compiled, I got the following message:
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.
Questions
- Is it possible, in the first place, to have a .NET 4 package loaded into VS2008?
- If it is, then what can I do to register it successfully?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
加载到 Visual Studio 2008 中的包将始终使用 2.0 CLR。由于不兼容,针对 4.0 CLR 的内容无法加载到 VS 2008 中。您需要以 .NET 3.5 或更低版本为目标才能在 2008 年加载包。
Packages loaded into Visual Studio 2008 will always use the 2.0 CLR. Things that target the 4.0 CLR cannot be loaded into VS 2008 because of the incompatibility. You need to target .NET 3.5 or below for a package to load in 2008.