I am trying to debug an ASP MVC 3 project in Visual Studio 2010. However, once the code compiles the debugger stops completely, never bringing up the browser. I am able to run ASP.Net projects just fine from this computer, however this project doesn't seem to want to work.
This turned out to be a result of no start up project being selected. Simply going to Solution > Properties > then selecting a start up project fixed the issue.
Related
So, I create new empty/MVC project, add simple controller and view for uploading file, lauch program under the Debug mode and trying to upload file.
After selecting file (immediately, right after chosing the file in explorer!) program exits debugging and I'm getting 404 in my browser.
When lauching project without debugging everything works good, but this is not a solution... what if I need to test uploading exactly in the Debug mode?
In ASP Core I'm getting the same issue.
I've tried different variations of code, including version of A. Freeman, published in his book "Pro ASP.Net MVC 5" - nothing works.
This is a bug of visual(I am not sure). You can fix this by change keyboard of visual studio to Visual C# 2005. You should run in Chrome, Firefox or Microsoft Edge. Others browser is not compatible.
You can find keyboard settings in Tools -> Options -> Environment -> Keyboard
Change setting to Visual C# 2005 -> Ok. Restart computer or visual studio. It will works!
I am trying to debug an ASP MVC 4 project in Visual Studio 2012. However, once the code compiles the debugger stops completely, never bringing up the browser. I am able to run ASP.Net projects just fine from this computer, however this project doesn't seem to want to work.
With this project if i click on IIS Express in Notification area so it shows my website and if i click on it so then it opens up my site on browser but by default on debugging with Visual Studio it doesn't open.
I also tried to set my start up project but this also does not work????
Check this setting in your web project's settings and ensure it's not set to "don't open a page"
I've installed the "ASP.NET and Web Tools 2013.1" in my Visual Studio 2012.
I have a solution which has an ASP.NET MVC 4 project with the following project type guids:
<ProjectTypeGuids>
{E3E379DF-F4C6-4180-9B81-6769533ABE47};
{349c5851-65df-11da-9384-00065b846f21};
{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
</ProjectTypeGuids>
These Guids are for:
ASP.NET MVC 4.0
Web Application
Windows (C#)
This is the usual configuration when you create a new ASP.NET 4.0 project. And it works fine.
The problem is that, for some strange reason, whenever I open my solution the first GUID (ASP.NET MVC 4.0) is deleted from the .csproj file, so I lose all the related tooling.
No matter how I try to edit it:
if I close the solution, and edit this file manually, adding the missing GUID, when I open it again, the GUID is deleted
if I unload the project, edit the .csproj and reload it, the GUID is also deleted.
I have this project under version control (SVN), so I have also tried closing VS, updating the file in the SVN (using Tortoise) and reopening the solution. And you know what? The GUID is deleted when opening the solution !!!
If I create a new solution with an ASP.NET MVC 4.0 project, it works fine, and the GUIDs are kept.
Any idea why this can be happening and how I can solve it?
UPDATE
If I open VS in safe mode this doesn't happen. SO I suspect it must be an extension, but I don't know how to discover which is the offendign extension. Is there a way to know which extension can be responsible for this (apart from uninstall/try cycles...)
I found a temporary workaround hack for this problem:
Right click on the MVC project in Visual Studio and select "Unload Project"
Right click on the project and select "Edit YourProjectName.csproj"
Replace the contents of the ProjectTypeGuids tag with the following and save the file changes:
{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
Open up Window Explorer and find the csproj file. Open up properties on it and mark it as Read Only.
In Visual Studio right click on the project and select Reload Project. You will be prompted to save as the csproj file. Hit Cancel when that comes up.
Go back to Windows Explorer and take off the Read Only flag.
As long has you have this project open in Visual Studio, it will think it's an MVC project, and you will have options to Add Views and Controllers. Once you switch projects or restart Visual Studio, you'll have to do this again.
ASP.NET MVC, Visual Studio 2010, C#/.NET4. I'm using IIS Express as the web server of choice, as it more accurately mirrors our production configurations in IIS7. However, when I go through following process, the libraries used by IIS Express don't seem to be updating.
Run app, find bug
Stop VS2010, fix bug
Build/Run
Testing reveals the new code is not being used
IIS Express continues to run even after stopping the debugger in VS2010, so I'm assuming it's just holding onto the binaries that were used when it was initially launched. Is there a way to get it to use the updated binaries? Or is this the expected behavior? Right now, the only way I can get the new binaries used is to completely exit VS2010 and then reload the project/solution. Even selecting "stop" from the IISExpress systray icon doesn't seem to actually help (it doesn't appear to actually stop the process).
Obviously closing VS2010 and reloading the solution each time is a less-than-ideal workflow.
EDIT: The project is configured to run IIS Express from right click project -> Web. The project URL does not use any virtual directories, it is at root of the local host on port 60830. I thought I remembered seeing IIS Express in the F4 properties listing before, it's not listed there at all right now.
I have a Visual Studio 2010 Solution that contains a few library projectes, a few WPF projects and an ASP.NET MVC 3 project. When i start any project the MVC project get started in the development-server.
Is there some way to stop this behaviour?
Edit:
I just checked to make sure I´m to doing too much wrong. If you start a new solution with a console/whatever project and add an mvc3 project, everytime you start the console project the mvc project gets started as well.
Not sure if this is buggy or an intended feature, but it is kind of strange that the behaviour is so different from normal projects.
If you don't need MVC project for certain period of time, you can unload it (Right-click on the project and select Unload project).
Another option is to select local IIS as a web server (If you have it installed). This way it won't start development server.
You can always choose another project as the default project to start up. You can right-click on the project and set as startup project.
Make sure all your web projects are set to use local IIS rather than the Visual Studio Development server. Unlike the development server, IIS doesn't do anything with a new build until you actually try to load a page.