Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
421 views
in Technique[技术] by (71.8m points)

asp.net - Visual Studio 2015 Web Application .NET Core vs .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:

VS2015 Template Options

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.

enter image description here

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:

enter image description here

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...