The new ASP.NET 5 (vNext) does some great stuff like integrate Bower, Grunt, and other client side web development tools into the project.
However, it is dawning on me (after many such projects were made and scratched) that it would seem all of this is limited to projects that can target the new 'cloud' or 'cross-platform' (KRE-CLR) stack ONLY, as opposed to the regular .NET stack. As nice as it would be to target this new stack, this severely limits what one can target at this time (basically any dll / project you reference now isn't an ASP.NET 5 class library, so it can't be referenced, so you can't rely on this?).
Am I missing something? Can the new ASP.NET 5 (ASP.NET MVC 6) project type target regular .NET?
If the answer is NO, even if this isn't possible now, do the team plan to at least add some of these client-side capabilities (bower, grunt, etc) to 'regular' ASP.NET (MVC 5) projects in the future?
NET 5.0 as . NET 6.0 has more improvement on the performance which also includes some major advantage as it has intelligent code editing and also it is called the fastest full-stack web framework. The . NET 6.0 also provides better performance in the File Stream.
NET 6 provides the delicate transition they need. Users of . NET Core likely won't run into quite as many backward compatibility issues, but it's still a possibility to keep in mind.
The main difference between ASP.NET Core and ASP.NET MVC 5 is their cross-platform approach. ASP.NET Core can be used on Windows, Mac, or Linux, whereas ASP.NET MVC 5 can only be used for applications on Windows.
As per my experience with the latest version of Visual Studio CTP 5, here are few things to consider:
Update
I assume that you are using Visual Studio 2015 CTP 5.
Here is copy of my project.json
{
/* Click to learn more about project.json http://go.microsoft.com/fwlink/?LinkID=517074 */
"webroot": "wwwroot",
"version": "1.0.0-*",
"dependencies": {
"EntityFramework.SqlServer": "7.0.0-beta2",
"EntityFramework.Commands": "7.0.0-beta2",
"Microsoft.AspNet.Mvc": "6.0.0-beta2",
/* "Microsoft.AspNet.Mvc.WebApiCompatShim": "6.0.0-beta2", */
"Microsoft.AspNet.Diagnostics": "1.0.0-beta2",
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta2",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta2",
"Microsoft.AspNet.Security.Cookies": "1.0.0-beta2",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta2",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta2",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta2",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta2",
"Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta2",
"Microsoft.Framework.Logging": "1.0.0-beta2",
"Microsoft.Framework.Logging.Console": "1.0.0-beta2",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta1"
},
"commands": {
/* Change the port number when you are self hosting this application */
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000",
"gen": "Microsoft.Framework.CodeGeneration",
"ef": "EntityFramework.Commands"
},
**"frameworks": {
"aspnet50": {
"dependencies": {
"MyCoolLibrary": "1.0.0-*"
} }
},**
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
],
"packExclude": [
"node_modules",
"bower_components",
"**.kproj",
"**.user",
"**.vspscc"
],
"scripts": {
"postrestore": [ "npm install" ],
"prepare": [ "grunt bower:install" ]
}
}
My custom class library in MyCoolLibrary and it is added in framework dependencies not dependencies. Also I build my library using .NET Framework 4.5. ( Not 4.5.3) so it support older version as well.
If you are using Visual Studio 2015 Preview then also above thing will work.
In a new post by Scott Guthrie, he seems to confirm that ASP.NET 5 absolutely should work with the full .NET framework, in fact, even saying:
"Your existing applications and libraries will work without modification on this [full .NET] runtime."
Here's the full citation:
ASP.NET 5 works with two runtime environments to give you greater flexibility when hosting your app. The two runtime choices are: ([a] .NET Core ... [b] .NET Framework – The API for .NET Core is currently more limited than the full .NET Framework, so you may need to modify existing apps to target .NET Core. If you don't want to have to update your app you can instead run ASP.NET 5 applications on the full .NET Framework (version 4.5.2 and above). When doing this you have access to the complete set of .NET Framework APIs. Your existing applications and libraries will work without modification on this runtime.
While I am very glad to hear this, the problems discussed in this question and by other posters here makes it seem like this target goal does not yet match the current reality. In simplest terms, we need not only to be able to target the full .NET, but to simply reference current .NET dll/assemblies. Currently, it seems the only assemblies that work are ones built against .NET Core.
The answer to this dilemma then? I believe the answer is: It's coming. This according to the new Visual Studio 2015 CTP 6 release notes:
System References are back
You can now easily add references to system assemblies using the Add References dialog, which will make the appropriate modifications to your project.json file... We are also hard at work to enable support for adding references to user assemblies for a future preview release.
(picture from that article)
So then, this is GREAT news! This also justifies that, according to these posts, these indeed have been shortcomings up till now (and still exist for user assemblies for the moment).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With