如何在 Visual Studio 2005 中使用 .NET 3.0?
我的 Google-fu 在这个问题上让我失望了。
我有一位同事的计算机上装有 Visual Studio 2005。 我有 Visual Studio 2008。他想打开我用 C# 3.0 编写的项目,我们已经做到了这一点,但 VS2005 对 3.0 代码(如 var
)感到厌烦。
他安装了 3.0 和 3.5 框架,以及 Visual Studio 2005 Extensions for Windows Workflow。 他还需要什么? 或者我们是在追求一个注定失败的目标,一场徒劳的追逐,因为我认为我曾经听说过这在某个地方是可能的?
请不要建议他安装VS2008或Express版本。 目前这是不可能的。 :(
My Google-fu is failing me on this question.
I have a coworker who has Visual Studio 2005 on his machine. I have Visual Studio 2008. He wants to open a project I wrote in C# 3.0, and we've gotten that far, but VS2005 barfs on the 3.0 code, like var
.
He has the 3.0 and 3.5 frameworks installed, as well as the Visual Studio 2005 Extensions for Windows Workflow. What else does he need? Or are we pursuing a lost cause, a wild goose chase spurred by my thinking that I heard this was possible somewhere one time?
Please don't suggest he install VS2008 or the Express edition. That simply isn't possible at this time. :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
据我了解,这是不可能的。 如果您没有使用新的 C# 3.0 代码功能,他应该能够处理在 VS2008 中创建的项目(并针对 2.0 框架进行编译),但我认为 2005 编译器永远无法以应对新的语法。
So far as I understand it, this isn't possible. If you weren't using the new C# 3.0 code features, he should be able to work with a project created in VS2008 (and compile it against the 2.0 framework), but I don't think the 2005 compiler is ever going to be able to cope with the new syntax.
您可以在 vs2005 中重新创建项目文件,然后将文件的标题更新为 vs2005,然后您就可以恢复正常工作了。 请查看 Rick Strahls 博客,了解有关如何完成的更多详细信息。
还值得查看 Visual Studio 2005/2008 互操作性 中的项目转换器
您可能还需要安装 .Net 3.0 的 Visual Studio 2005 扩展。 WWF 扩展
You can recreate the project file in vs2005 and then update the headers on the files to vs2005 and you are back in business. Have a look at Rick Strahls Blog for more details on how its done.
Also worth looking at the project converter in Visual Studio 2005/2008 Interoperability
You may also need the Visual Studio 2005 extensions for .Net 3.0 to be installed. WWF Extensions
IDE 本身可能不支持 3.0 功能。 如果你可以忍受没有 3.0 的功能,你可以编译成 2.0,他应该能够正常运行。
The IDE itself may not support the 3.0 functionality. If you can live without the 3.0 features you can compile to 2.0 which he should be able to run ok.