Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to switch to full .NET stack in ASP.NET 5 MVC 6 project

I created a new ASP.NET 5 MVC 6 (vNext) project in VS 2015.

I imported some classes from another project, but looks like the DNX is missing some classes that are very essential to me.

Can I choose to use the full .NET stack instead of the DNX?
What do I have to change? I like the new config.json file better than the old method, but what do I have to change the reference to.

"frameworks": {
  "dnx451": { },
  "dnxcore50": { }
},
like image 579
Shimmy Weitzhandler Avatar asked Jul 21 '15 03:07

Shimmy Weitzhandler


1 Answers

You just need to remove the core line, as in:

"frameworks": {
  "dnx451": { }
},

From the asp 5 docs (Highlighted relevant parts):

dnx451 represents the .NET Framework, while dnxcore50 represents .NET Core 5 (5.0).

...

The recommendation from the ASP.NET team is to target both frameworks with new applications. If you want to only target .NET Core, remove dnx451, or only target .NET Framework, remove dnxcore50, from the frameworks listed in project.json. Note that ASP.NET 4.6 and earlier target and require the .NET Framework, as they always have.

like image 158
Daniel J.G. Avatar answered Oct 11 '22 13:10

Daniel J.G.