我可以开发在Visual Studio 2008中的.NET Framework 4? [英] Can I develop for .NET Framework 4 in Visual Studio 2008?

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

问题描述

我的ASP.NET应用程序在IIS中我的Web服务器上运行,并使用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天全站免登陆