简体   繁体   English

控制面板中的框架转换

[英]framework conversion in control panel

I'm using visual studio 2012 and have account in hostgator for web hosting .net. 我正在使用Visual Studio 2012,并且在hostgator中拥有用于Web托管.net的帐户。 visual studio 2012 uses 4.5 framework and in hostgator parallel panel I tried to change the version of framework in asp.net setting but only version '4.0.30319.34209' and '2.0.50727.5483' is available.I need some tips to which version of visual studio suitable for all hosting domain. visual studio 2012使用4.5框架,并且在hostgator并行面板中,我尝试在asp.net设置中更改框架的版本,但仅提供版本“ 4.0.30319.34209”和“ 2.0.50727.5483”。我需要一些有关Visual版本的提示工作室适合所有托管域。

You're confusing the version of .NET with the version of the CLR. 您将.NET版本与CLR版本混淆了。 It's an easy thing to confuse. 这很容易混淆。 Your hosting platform supports two versions of the CLR 4.0 and 2.0. 您的托管平台支持CLR 4.0和2.0的两个版本。

.NET 2.0 and .NET 3.5 run on version 2.0 of the CLR. .NET 2.0和.NET 3.5在CLR的2.0版上运行。 .NET 4.0, 4.5, 4.5.1, and 4.5.2 will run on version 4.0 of the CLR. .NET 4.0、4.5、4.5.1和4.5.2将在CLR的4.0版上运行。

You can use Visual Studio 2012 to create web applications targeting .NET 2.0 - 4.5.x, so you're fine. 您可以使用Visual Studio 2012创建针对.NET 2.0-4.5.x的Web应用程序,因此很好。

If this is a new application, I'd recommend targeting the latest released version of the framework (4.5.2) which will run on CLR 4.0. 如果这是一个新应用程序,我建议针对将在CLR 4.0上运行的框架的最新发行版(4.5.2)。 So in your hostgator set target framework to 4.0. 因此,在hostgator中将目标框架设置为4.0。 Visual Studio should default to creating a web application in the latest .net version, but you can always check/change via the Properties window for the project. Visual Studio应该默认以最新的.net版本创建Web应用程序,但是您始终可以通过项目的“属性”窗口进行检查/更改。

在此处输入图片说明

(Screenshot taken from: Targeted .NET Framework version change ) (截屏来自: 目标.NET Framework版本更改

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM