Not able to start project as asp.net Core (Razor App) - c#

I have installed VS 2017 community edition and i am trying to create ASp.net Core 2.0 (Razor Page) but i am not getting that template when i create the project as show in this tutorial
What i get is show in below image
I am new to .Net Core and want to start learning .Net Core.

ASP.NET Core with Razor Pages is the third option in your screenshot:
However, unless you will create extremely simple web applications, you should skip it and go to the full ASP.NET MVC (fourth option). While Razor Pages is very new (only some months old), MVC has been pretty much the same for years, and allows for much more development.

Related

ASP .Net MVC/WebApi with Angular 4/5 Visual Studio Template

I'm using Visual Studio 2017 Community Edition and looking for an Angular with Web Api 2.0 (or MVC with Web Api) Template but not able to find one. When I try to google I get only links to Asp .Net Core related topics, no mention of identical template for older versions of ASP .Net. By older I mean any other than Core.
When I try to change the version of .Net to .Net Framework I still see only .Net Core templates:
Only available ASP .Net versions are Core.
There exists a template for single page application but it does not create an angular application:
If to look online, there is a template for Angular2 though:
But:
It is not an official microsoft template
I will need to upgrade the Angular version
It has no generated api controllers with authorization
No OWIN support
No file nesting for component files in solution explorer
All links to documentation or git hub are broken and response with 404
It's a nice and in some cases usefull template but still a lot of thing that would be nice to have in a template I will need to do manually, basically from scratch. Does there exist some powerful and rich template for Angular5 and Web Api 2.0 like there is for .NET Core?

ASP.net 5 preview templates are missed in Visual Studio 2015

I have installed Visual Studio 2015 update 3 and have installed the latest Web Essentials update and also have installed DotnetCore version. But when I create a new asp.net project, only asp 4 templates like in the image are available
create form image
First of all, there is no ASP.NET 5 anymore. It has officially been renamed to ASP.NET Core 1.0.
You seem to have missed that announcement, which would have made the selections in Visual Studio more obvious. When you choose File > New Project..., you get to a dialog that gives you a choice to go with ASP.NET Web Application (.NET Framework), ASP.NET Core Web Application (.NET Core) or ASP.NET Core Web Application (.NET Framework). This is the dialog before the one you have posted a screenshot of.
NOTE: In order to see all 3 of these options, you need to choose at least .NET Framework 4.5 from the dropdown.
The last two options are for the new ASP.NET Core 1.0 framework. The first of which is to run on the .NET Core library (cross-platform) and the last which is for the .NET Framework 4.6.1 library (which is not cross-platform).
Of course, if you choose ASP.NET Web Application (.NET Framework) , you get a regular MVC 5 or Web API 2 application.

How do I use Webforms and ASP.NET MVC together in an ASP.NET Webforms Website project?

I've seen a lot of articles creating hybrid Web Forms applications to also have MVC pages and those work fine.
Unfortunately, I've inherited a Web Forms Web Site (not application), so there is no way to edit project files, add references, etc.
How do I use Webforms alongside ASP.NET MVC when the project is a Web Site project?
It's actually pretty easy to convert a web project to a web application. And from there you can use the 2013 web application project to have webforms, webapi, and mvc all live and play along in the same application.
However, take a look at ASP.Net vNext. They have removed webforms from that model and are using asp.net webpages much like what you are using now. That will be able to work with webapi and mvc so you might want to start learning that instead of converting to see if the programming model fits your upgrade path a little better.
There is a way to convert a website into an application:
How To Convert ASP.NET Website to ASP.NET Web Application
Scott Hanselman also created a NuGet package for adding MVC into a Webforms application:
https://www.nuget.org/packages/AddMvc3ToWebForms/

How to use razor syntax in asp.net mvc 2.0

I am developing an app in asp.net mvc 2.0 in which I want to implement Bread Crumb pattern. I browsed a lot of sites for this purpose and find the solution of my problem in MVC 3.0 through mvcsitemap provider. They are using razor syntax and I am unable to use the razor syntax in MVC 2.0. Please help me.
For using Razor View Engine, you can covert your MVC 2 application to MVC 3.
It will not be possible to use Razor in MVC 2.
MVC 3 Project Upgrade Tool
MVC 3 Project Upgrade Tool
This standalone application upgrades ASP.NET MVC 2 applications to ASP.NET MVC 3. It works for both ASP.NET MVC 3 RC 2 and RTM. The tool only supports Visual Studio 2010 solutions and MVC 2 projects targeting .NET 4.
It will not work with VS 2008 solutions, MVC 1 projects, or projects targeting .NET 3.5. Those projects will first have to be upgraded using Visual Studio 2010 and/or retargeted for .NET 4.

move to mvc from existing asp.net project

I have used .net framework 4.0 to design my web project I want to improve some features on my web site and I decided to use MVC in my project.
I research about mvc I found out System.Web.Routing in .net framework 3.5 is wrapped by System.Web in .net framework 4.0.
In the other side in my host environment I have IIS 7.0 with all necessarily handlers mapped to .aspx and some other extension like .cshtml and support them.
So I think I have all thing for mvc migration. my question is :
Is it possible to move mvc by configure web.config and make some structure for content, view and controller classes but don't change any asp.net pages and configuration like appcode and appdata which I had before in my asp.net application.
Note, I don't want to change or update my old application to mvc I want to add some mvc controllers class and view to my existing asp.net project to use mvc functionality.
Have a look at this walkthrough from Scott Hanselman:
http://www.hanselman.com/blog/IntegratingASPNETMVC3IntoExistingUpgradedASPNET4WebFormsApplications.aspx

Categories