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

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

问题描述

在 Visual Studio Enterprise 2015 (v14.0.25123.00 Update 2) 中,当我去:

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

开始 > 新建项目

选择目标框架 4.5 或更高版本...

With Target Framework 4.5 or higher selected...

在:

已安装||--> Visual C#||--> 网页

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

我有三个模板可供选择:

I have three templates to choose from:

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

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

两者都说ASP.NET Core Web 应用程序",但一个标记为 .NET Core,而另一个标记为 .NET Framework.

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

据我所知,如果我正在开发一个托管在 linux 或 mac 服务器上的 Web 应用程序,并且我想访问 .NET 库,我想使用 .NET 版本的 Core.另一个是它是否托管在具有完整 .NET 库的 Windows 环境中?是吗?

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?

如果我在上面的屏幕截图中查看与选项 #1 关联的模板,所有图标旁边都标有蓝色的小4".

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.

这似乎是将作为 ASP.NET Core Matures 逐步淘汰的旧版本 ASP.NET/MVC?

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...

我希望构建一个利用 ASP.NET MVC、MongoDB、AngularJS(针对某些已提供的特定指令)以及一些 3rd 方 JS 和 CSS 框架的 Web 应用程序.

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.

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

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.

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

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?

谢谢

推荐答案

有 .Net Core 和 .Net Framework..Net Framework 只适用于 windows 环境,而 .Net Core 是一个开源框架,可以在 windows、linux 和 ios 上运行..Net Core 为 Web 应用程序提供基本功能(您需要的一切,包括数据库通信),而 .Net Framework 包含与 Windows 相关的功能.

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 应用程序适用于 .Net Framework 4.6.1 及更早版本,而 ASP.NET 核心 Web 应用程序适用于 .Net Core 和/或 .Net Framework 5,这就是为什么有 2 个 ASP.NET 核心 Web应用程序.

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.

如果您的目标是跨平台,或者不确定,那么从 .NET 核心版本开始.如果您的目标是在 MS 操作系统上,则使用 .Net Framework 版本.

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天全站免登陆