Reputation: 3873
I really like the way the new VS 2015 ASP.Net 5 templates set up the client side build system. It keeps client-side build system components out of the working folders by publishing only the final assets to the working wwwroot folder.
I have to create a new project using ASP.Net 4.6 but would like to setup the same build system for node dependencies and bower/gulp components.
Is it possible to convert the ASP.Net 5 empty project to use ASP.Net 4.6 in the same separated way?
Upvotes: 5
Views: 332
Reputation: 24545
Is it possible to convert the ASP.Net 5 empty project to use ASP.Net 4.6 in the same separated way?
The short answer is "yes", it is possible.
While there are differing versions that have various templates, you could technically achieve what you're looking for by creating your own template.
Visit either of the two MSDN references below for a step-by-step on creating custom template(s):
The slightly longer answer "yes, but with some noteworthy caveats".
From within Visual Studio 2015 navigate File > New Project > Installed > Templates > Visual C# > Web > ASP.NET Web Application
, then select from the ASP.NET 5 Templates "Web Application".
Open the project.json
file and change the frameworks
from this:
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
To this:
"frameworks": {
"net46": { }
},
Now you have the desired template that is targeting the .NET 4.6
runtime environment. One major note and disclaimer is that even though you're targeting .NET 4.6
this is not ASP.NET 4.6
, in fact it is still a DNX
project and uses the latest ASP.NET Core 1.0
libraries, it just so happens that you're instructing it to run on-top of a known .NET 4.6
runtime.
ASP.NET Core 1.0
(formally known as ASP.NET 5
), is a complete re-write and is still currently only in RC1 as of 3/09/2016. With that said, there is much more IDE support and tooling yet to come with RC2 and the final version. It should be understood that ASP.NET Core 1.0
is not ASP.NET 4.6
.
Upvotes: 8
Reputation: 877
I think you can't. Each Version of Asp.Net has its own template. But you can maybe find an Asp.Net 4.6 template in the internet that looks like the Asp.Net 5 template (if the design and structure is what you mean)
Upvotes: 1