I am using ASP.NET MVC / C# but my views are full of errors.
At runtime, I don't get any error but my screen is full of red underlines. In the error panel, I get the attached error. Can you help me to install what is missing in my Visual Studio?
if using vs this happens a lot. Close and reopen always worked to me
Related
I'm quite interested in Piranha, but unfortunately getting it up and running following these instructions is frustrating.
When I follow these instructions (I tried 3 times) and run the site I just get "The resource cannot be found".
From the routing supplied it's clearly looking for /Home/Index, but that's not as part of the solution. I added the Home controller, but by itself it does nothing. Browsing to /Page/Index results in "The resource cannot be found" too.
I'm supposed to see an installation screen, but where is it?
I managed to reproduce the error when creating an new Web application > MVC > Empty in Visual Studio 2013. Creating an empty MVC application in Visual Studio 2012 does not produce the same result.
Opening the project created in VS2012 in VS2013, recompiling it and running it doesn't produce the same error so there's obviously something different in how the projects are created which I'll have to look into.
Can you confirm that you are using VS2013?
I am having a weird problem with Page Inspector in Visual Studio 2012.
Page Inspector works fine on any newly created ASP.NET MVC 4 project.
However, in our complex MVC project, whenever we start Page Inspector (whether running debug or not), after the web page has loaded, we get a message in black on yellow at the top of the Page Inspector window, which says:
Files in external projects have been modified and might impact the
current page. Click here to build the solution and refresh the
browser. (Ctrl+Alt+Enter)
If I do click on on the text, it pauses briefly to say "Build in progress" and then the following is displayed in the same place:
There were errors during the build. See the Output Window for details.
If I look in the Output window, there is only the normal report of a successful build.
This behavior is repeatable on different computers running the same solution. I can't think of anything obvious that has changed recently in the project that could have created this problem. The text shows up on all pages of the project, all the time.
This is a new behavior, the solution has been developed over several weeks, and I have been running the Page Inspector without problems. This message was noticed today.
We are running RTM versions of Visual Studio 2012 on 64bit Windows 8 Enterprise.
Any idea on how I could get rid of the strange Page Inspector warning? What files is it referring to?
After experimenting with reverting to various previous versions of the source code (git is great!), I concluded that the problem started when I added a windows console application to the solution. If I exclude that project completely from the solution the problem goes away.
I still don't understand why this should be so. The MVC project does not reference the console project. Seems like a bug in Visual Studio to me.
I am mvc 2 newbie. got this weird error message, couldn't figure out how to fix it.
I am using visual studio 2010 and my project is asp.net mvc 2 using .net 4.0
I right clicked inside the action method to generate the view. It kept giving me error message. I dont have that problem before, only happened in this project.
If it happens on everything, try reinstalling Visual Studio.
If it's a problem only with MVC Framework, try dwonloading it from here http://www.asp.net/mvc and install again. FileNotFoundException in the VS directory indicates that probably some required files are missing.
I assume Tut.Domain is something you have built? If so, you either are not building it, or it is not located in the correct location for the application to pick up. If you read the end of the error message, prior to stack trace, it mentions Tut.Domain, which is where your troubleshooting should begin.
I am trying to put a breakpoint in the code of a View in a ASP.NET MVC 2 project but Visual Studio complains that:
"This is not a valid location for a breakpoint"
I have tried multiple ways to it (the "mouse way, F9, using the menu option). I am using Win2008 and running the site in IIS7.
Slandau's answer shows how to turn on compilation - a great start. Now, if only debugging would work!
If you use the Razor view engine, you can be easy to set the break point and it works.
I started out this morning working with my ASP.NET MVC project like normal and everything worked. I added a new class and some functions and it still worked. Then, all of a sudden, while I was working with a javascript file, I started getting these not defined errors on the MVC classes/functions. There are 118 of them in the project and I'm not sure how to fix them.
I've tried restarting Visual Studio and rebooting the computer. I've also tried loading another MVC project to see if the framework might be hosed, and it works fine. I've checked the references and the ASP.NET MVC 1.0 RC2 dll is there.
Has anyone else ran into this problem?
Please help!
I figured it out. I had added a new Master page to the project, but when did so, I had chosen a regular Master Page not the MVC Master Page. What threw me was that I was able to build the program a couple times and run it after I had done this without seeing any errors.