我可以在 Visual Studio 2008 中针对 .NET Framework 4 进行开发吗? [英] Can I develop for .NET Framework 4 in Visual Studio 2008?

查看:30
本文介绍了我可以在 Visual Studio 2008 中针对 .NET Framework 4 进行开发吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 ASP.NET 应用程序在我的 Web 服务器上的 IIS 中运行,并使用 Microsoft .NET Framework 4 Beta 2.(其应用程序池设置为 .NET Framework 版本 .NET Framework v4.0.21006.)

My ASP.NET application runs in IIS on my web server and uses Microsoft .NET Framework 4 Beta 2. (Its Application Pool is set to .NET Framework version .NET Framework v4.0.21006.)

它给出了这个新错误:

有潜在危险的 Request.Form从客户端检测到值...

A potentially dangerous Request.Form value was detected from the client...

这是由于 .NET 中的重大更改4.

This is due to a breaking change in .NET 4.

为了恢复 ASP.NET 2.0 请求验证功能的行为,我在 Web.config 文件中添加了以下设置:

To revert to the behavior of the ASP.NET 2.0 request validation feature, I added the following setting in the Web.config file:

<httpRuntime requestValidationMode="2.0" />

现在 Visual Studio 2008 抛出一个编译时错误:

Now Visual Studio 2008 throws a compile-time error:

'requestValidationMode' 属性未声明.

The 'requestValidationMode' attribute is not declared.

而且我无法再使用 Visual Studio 附带的 ASP.NET 开发服务器在我的开发机器上进行调试.

And I can no longer debug on my development machine using the ASP.NET Development Server that comes with Visual Studio.

我需要 Visual Studio 及其 ASP.NET 开发服务器来识别新的 .NET Framework 4 requestValidationMode 属性.

I need Visual Studio and its ASP.NET Development Server to recognize the new .NET Framework 4 requestValidationMode attribute.

如何在 .NET 4 中调试我的应用程序?我是否必须从 Visual Studio 2008 切换到 Visual Studio 2010 Beta 2?

How can I debug my application in .NET 4? Must I switch from Visual Studio 2008 to Visual Studio 2010 Beta 2?

推荐答案

您不能使用 Visual Studio 2008 以受支持的方式开发 4.0 应用程序.目前只有 Visual Studio 2010 可用于开发 4.0 应用程序.从 2008 年开始,您可以使用它来开发该框架的早期版本,但不能用于更高版本的开发.

You cannot use Visual Studio 2008 to develop 4.0 applications in a supported manner. Currently only Visual Studio 2010 can be used to develop 4.0 apps. Starting with 2008 you can use it to develop for earlier versions of the framework but not later ones.

这篇关于我可以在 Visual Studio 2008 中针对 .NET Framework 4 进行开发吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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