Visual Studio 2015 Web应用程序.NET Core与.NET Framework [英] Visual Studio 2015 Web Application .NET Core vs .NET Framework

查看:130
本文介绍了Visual Studio 2015 Web应用程序.NET Core与.NET Framework的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio Enterprise 2015(v14.0.25123.00更新2)中,当我转到:



开始>新建项目



选择了Target Framework 4.5或更高版本...



在以下位置:



已安装
|
|-> Visual C#
|
|-> Web



我有三个模板可供选择:





我对上面截图中的选项#2和#3之间的区别感到困惑...



都说 ASP.NET Core Web应用程序,但是一个标记为.NET Core,另一个标记为.NET Framework。



来自如果我正在开发要在linux或mac服务器上托管的Web应用程序,并且想要访问.NET库,则可以收集到我想收集的内容,而我想使用.NET版本的Core。另一个是是否将其托管在具有完整.NET库的Windows环境中?



如果我在上面的屏幕快照中查看了与选项#1关联的模板,则所有图标旁边都带有一个蓝色的小 4。 / p>



这似乎是ASP的旧版本。 NET / MVC将作为ASP.NET Core成熟版淘汰?



而其他两个外观相同:





我想我只是对哪个将是最佳选择感到困惑在我的情况下...



我正在寻找一个使用ASP.NET MVC,MongoDB,AngularJS的Web应用程序(针对已提供的某些特定指令) ),以及一些第三方JS和CSS framew






编辑:删除 Rant并在其他用户回复后更新问题



在大多数教程和其他stackoverflow帖子中,我看到人们在其Visual Studio窗口中拥有 ASP.NET 5预览模板,但我没有这些。当我使用选项#1加载项目时,我没有package.json,wwwroot文件夹和其他新功能。



如果我加载选项#2或# 3,引用似乎不包括完整的.NET框架,而只是.NET Core内容...



在查看其他帖子并检查了我的版本之后,一切似乎都是最新的...还有我想念的东西吗?



谢谢

解决方案

有.Net Core和.Net Framework。 .Net Framework仅在Windows环境中有效,而.Net Core是可在Windows,Linux和ios上运行的开放源代码框架。 .Net Core为Web应用程序提供必要的功能(包括数据库通信所需的一切),而.Net Framework包含与Windows关联的功能。



ASP.NET Web应用程序在.Net Framework 4.6.1和更早版本上运行,而ASP.NET核心Web应用程序在.Net Core和/或.Net Framework 5上运行,这就是为什么有两个ASP.NET核心Web应用程序的原因。



如果您的目标是跨平台或不确定,则从.NET核心版本开始。如果您的目标是MS OS,请使用.Net Framework版本。



唯一的区别是项目中的引用,其余相同。


In Visual Studio Enterprise 2015 (v14.0.25123.00 Update 2) when I go to:

Start > New Project

With Target Framework 4.5 or higher selected...

Under:

Installed | |--> Visual C# | |--> Web

I have three templates to choose from:

I'm confused about the difference between options #2 and #3 in the screenshot above...

Both say "ASP.NET Core Web Application" but one is labeled .NET Core while the other is labeled .NET Framework.

From what I've been able to gather, if I were developing an Web Application that were to be hosted on a linux or mac server and I wanted to access the .NET library, I would want use the .NET version Core. And the other is if it's being hosted in a Windows environment with full .NET library available? Is that right?

If I view the templates associated with option #1 in the screenshot above, all icons are stamped with a little blue "4" next to them.

This appears to be the old version of ASP.NET/MVC that will be phased out as ASP.NET Core Matures?

While the other two appear identically as such:

I guess I'm just confused as to which one would be the "best" one to choose in my situation...

I'm looking to build a web application that utilizes ASP.NET MVC, MongoDB, AngularJS (for some specific directives that have been made available), and some 3rd party JS and CSS frameworks.


EDIT: Removing "Rant" and updating question after response from other users

In most of the tutorials and other stackoverflow posts, I see people have "ASP.NET 5 Preview Templates" in their Visual Studio windows, but I don't have those. When I load a project using option #1, I don't have package.json, wwwroot folder, and other new features.

If I load option #2 or #3, the references don't seem to include the full .NET framework, instead, just the .NET Core stuff...

After reviewing other posts and checking my versions, everything appears to be up to date... Is there something else I'm missing?

Thank You

解决方案

There is .Net Core and .Net Framework. .Net Framework only works in windows environment while .Net Core is an open source framework that runs on windows, linux and ios. .Net Core offers essential functionalities (everything you need, including database communication) for web applications, while .Net Framework contains functionalities that tie with windows.

ASP.NET Web Application works on .Net Framework 4.6.1 and older, while ASP.NET core Web Application works on .Net Core and/or .Net Framework 5, which is why there are 2 ASP.NET core web applications.

If your aim is cross platform, or not sure, then start with the .NET core version. If your aim is on MS OS, then use .Net Framework version.

The only difference is the reference within the project, the rest is identical.

这篇关于Visual Studio 2015 Web应用程序.NET Core与.NET Framework的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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