Don't have MVC 5 in VS2013, why? - model-view-controller

I want to create a C# MVC Project, so I choose ASP.NET Web Application. After I select it, there should an option to select MVC. But no. I only have Empty, WebForms and Azure Mobile Service. What about MVC? It should be there. I'm using VS2013 Ultimate Update 4. Thanks.

Start by selecting "ASP.NET Web Application", click on "OK".
You'll then be presented with this dialogue:
Where you can choose to select the template you want (in this case, MVC).

Related

.NET Core can't add Razor pages

As you can see with the images above when I go to add a new razor page instead of taking me to the razor page prompt it instead takes me to add new item and doesn't let me add a razor page. Does anyone know why this is caused? I also need to use an empty razor page for this project.
You have to make sure you have the "ASP.NET and web development" workload installed within Visual Studio.
In Visual Studio go to Tools -> Get Tools and Features...
and make sure "ASP.NET and web development" is ticked and then click Modify / Install.
I had the exact same problem and managed to fix it by following the above steps.

ASP .NET Core Web Server console output not visible in VS for .NET Core 2.2

I created a .NET Core 2.2 web application project in VS 2017 and the ASP.NET Core Web Server option from the console output is not visible when the application runs with IIS Express.
By .NET Core 2.1 web application projects this option is there and it is showing the output without any problems.
I think you have to right-click on Project->Properties.
Then on the right side menu to select "Debug".
In Web Server Settings find "Hosting Model" and select "Out of process"
The simplest option is to change your currently selected debugger run option (the dropdown with the green "play" button / F5) from IIS, to the name of your project (e.g. so that "FooWebApp" shows up now in the dropdown). This way the browser will still open like it was before, but the console window will start showing as well.
On the other route with Tuvia's answer above (thanks!), it's actually Properties/launchSettings.json which stores / determines these actions. There you can also set "launchBrowser": false if wanted, or if you want to change if the console window opens, within "IIS Express" profile, manually add: "ancmHostingModel": "OutOfProcess" (or else set to InProcess).

How do I set something in Visual Studio 2013 Express for Web so that running it in debug mode opens home page?

Running Razor, MVC5, .Net 4.5.1. I have no idea what constitutes a "start page" in MVC within the visual studio development environment. How do I set it so that every time I run F5 my home page opens?
Setting a startup page for MVC5 when debugging
This can be done in the Project Properties.
Open Solution Explorer and find the relevant project.
Right-click on the project and choose Properties (or press Alt+Enter).
Navigate to Web -> Start Action.
Explanation
By default an MVC application has the Specific Page radio button selected and the input box is blank. This means that the application will open a browser to the server with no page specified and MVC will use the default route of /Home/Index.
http://localhost:12345/
You can specifiy a different route. For example you could use Home/About (see image).
This would open
http://localhost:123456/Home/About

Visual Studio - The key combination (ctrl+m, ctrl+c) is bound to command (Controller...) which is not currently available

I am trying to create a new asp.net MVC 4 web application, using the asp.net tutorial.
I create a new project selecting ASP.NET MVC 4 Web Application. But when I tried to add a new controller, first, I didn't find the "Controllers" folder, I created one, and when i tried to add new Controller, I couldn't find that option. I clicked Ctrl+M, Ctrl+C so i got this message: The key combination (ctrl+m, ctrl+c) is bound to command (Controller...) which is not currently available
Note that I'm using Visual Studio 2012 Premium.
Does anyone have any idea about this?
Thanks in advance :)
Could it be you didn't select the "ASP.NET MVC 4 Web Application" template when creating a new project. I just tested: the controller folder is there, even when i selected empty template.
So try this: File -> New -> Project and type in the 'Search installed Templates' searchbox "MVC 4". Select "ASP.NET MVC 4 Web Application".

Asp.net Web Site Administration tool icon is not showing

I created an asp.net project in MVC3 on VS2012. It has AccountController and all other View folders. But i dont see Administrative tool icon on Solution explorer to create an admin. How can i get to this or enable the icon?
If anyone has same problem and they dont see the icon for ASP.NET configuration. You can click on Projects -> ASP.NET configuration. It will open up same site where you can setup admin users.

Resources