是否有可能迫使Visual Studio 2010中使用Visual Basic 10? [英] Is it possible to force Visual Studio 2010 to use Visual Basic 10?

查看:139
本文介绍了是否有可能迫使Visual Studio 2010中使用Visual Basic 10?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要重现,我发现了错误:

To reproduce the error I'm getting:


  1. 创建一个新的Visual Studio 2010的ASP.NET Web在Visual Basic中的网站,针对.NET 2.0

  2. 键入公共性测试作为字符串

  3. 观察的Visual Basic 9.0不支持自动实现的属性。错误

Visual Studio 2010中是乐于使用VB 10对.NET 2.0,有针对性的Windows窗体应用程序,这只是似乎与ASP.NET的问题。

Visual Studio 2010 is happy to use VB 10 against .NET 2.0-targeted Windows Forms applications, this only appears to be an issue with ASP.NET.

有没有办法来强制Visual Studio 2010中使用VB 10目标.NET 2.0的时候?

Is there a way to force Visual Studio 2010 to use VB 10 when targeting .NET 2.0?

推荐答案

没有。网站项目是一个在运行时内ASP.NET编译 - 正因为如此,你选择问ASP.NET运行它作为.NET 2.0的项目,所以它会使用.NET 2.0 VBC Visual Basic编译器这是.NET的一部分。这编译器有没有VB 10的知识,所以你理所当然地被警告,这是行不通的。

No. A Web Site project is one that compiles within ASP.NET at runtime - as such, you've chosen to ask ASP.NET to run it as a .NET 2.0 project, so it will use the .NET 2.0 vbc Visual Basic compiler that's part of .NET. That compiler has no knowledge of VB 10, and so you're rightly being warned that it will not work.

也可以用于其他项目类型工作的原因是因为编译使用后编译器(通常是一个内置到Visual Studio)发生的事情。

The reason it can work for other project types is because the compilation is happening using a later compiler (usually the one built into Visual Studio).

这篇关于是否有可能迫使Visual Studio 2010中使用Visual Basic 10?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆