After having installed the Update 4, Visual Studio 2013 don't recognize everything related to MVC anymore and a lot of things are underlined in red.
Assemblies such as System.Web.Html.HtmlHelper or System.Web.Mvc are presents in warning messages, but my applications still runs.
The problem is that now, I can't add a new Controller or add a View to a Controller, and this is really problematic when I want for example to generate a Controller with Views using Entity Framework.
I have tried to relaunch the Update4.exe with "Repair" option.
I also have tried to unintsall and reinstall VS2013.
Please answer me if you have a solution.
It sounds like you became a victim of MS14-059 windows update. Make sure that you are referencing correct assemblies not from GAC but these that you downloaded via NuGet.
Related
I downloaded a working MVC project to learn the actual MVC coding. On direct build, it gave me errors, I searched the net and as per suggestions I updated all the nuget packages and the other updates available. Now Razor is updated to 3.0, MVC to 5.2.3.0, Visual Studio to its latest version of VS 2012, and there is no intellisense anywhere on my project. I tried updating the web config with various values as suggested by users. I also tried updating the GUID. I created a fresh MVC 4 project and tried multiple times, but ended up updating the files and eventually back to Step 1. Its a hair pulling story now, as i cannot manage to get intellisense and all my work is stalled. Please help
This might do the trick for you
Tools->Options->Text Editor->C# (or All Languages)->General
and enable Auto List Members and Parameter Information in right hand side pane.
I was using my own computer with VS 2015 installed in it. When I run / played my Index.cshtml, it would run into URL
http://localhost:xxxx/Controller/Index
and it would run fine.
But then after my company told me to use their computer with VS 2012 instead, When I run / played my Index.cshtml, it would run into URL
http://localhost:xxxx/Views/Controller/Index.cshtml, then it would show error about cant find the right path.
what am I missing in my project? I tried to remove and re-add System.Web.MVC into my references, but it still the same. I have spent a lot of time try to fix it, but cant find the answer yet.
Or do I need to install some add-on into my VS?
**EDIT
sorry if I make you misunderstand my question. My question is, how to make my VS 2012 can run into the same URL with my VS 2015 automatically. because right now, each time I run my project in VS 2012, I need to edit my URL manually so that it could run into the right path and URL
thank you
if you create mvc project on vs 2015 there is a possibility you create a MVC 5 project that not have built in support on vs 2012. you need to install the extension.
The stand alone installer is located here:
https://www.microsoft.com/en-us/download/details.aspx?id=41532
The release/installation notes can be found at
http://www.asp.net/visual-studio/overview/2012/aspnet-and-web-tools-20131-for-visual-studio-2012
Dependency:
.NET 4.5
Included:
MVC5
Entity Framework 6
Web API 2
Bootstrap
Razor
Nuget 2.7
Thank to #Fedri Qrueger that I able to find the answer. Even after Installing the extension, the problem still occurs.
the solution that I found is to edit to project.
Right click on project => properties => web
Then change start action from Current Page into Specific Page, and leave it blank. as it answered in here
While trying to build a web app using .NET Core, I used the Web App template and while everything works exactly as one would expect, the IntelliSense on .cshtml pages is extremely misleading. It doesn't recognize #ViewData, #model, or #Model tags, but when a view model is added or a ViewData message is used, the project compiles and runs as normal. However, IntelliSense marks them red like so...
... and says "Cannot resolve symbol" even when using Microsoft's own .NET Core web application template in a fully updated Visual Studio 2015, will all necessary NuGet packages installed. Does anyone know if this is a bug that needs to be fixed or there's a definitive checklist of NuGet packages to add? Adding various Mvc.Tooling and Tooling.Razer packages only enables tag helpers, but anything other than code after an # on a .cshtml file is still flagged as an error...
[SOLVED] Please see answer...
After deleting everything from C:\Users[me]\AppData\Local\Microsoft\Visual Studio and VSCommon, then running devenv /resetuserdata in the Visual Studio Command Prompt, singing back in, and restoring my environment, the issue resolved itself.
Still not sure whats wrong, but it seems too complex to me to figure out on my own without deeper knowledge of VS 2015...
I'm having an issue with my solution finding project references after I pull the source code from TFS. After I get latest, I'll compile my solution and it will complain that it cannot find classes in other projects. These have been added as project references. When I check the references folder of the project that has the issue, the project reference is there and appears to be correct (properties look correct and I do no have the warning tooltip over the reference in the solution explorer) The only way I have been able to fix this is by removing the project reference then re-adding. As soon as I do that the errors go away even before I compile and all is well. I did some searching but was not able to find anyone with this specific issue. It seems to happen whenever someone adds in a new project into our solution then we get latest to get their changes. This will also happen on everyone's machine except the person who added the project. Once one of us goes through the steps of re-adding the references and commits those changes, it works for the rest of the team. All of use are adding project references like normal.
Here are the details of my development environment:
Windows 7
Visual Studio 2015 (v14.0.2317.0 D14REL)
C# .NET 4.6
TFS 2015
Resharper 10.0.1
I too faced similiar issue today. And now I understood the problem.... under 4.5 framework related project1 is referring superior framework 4.5.2 related project2.
So I did made them both as same and my solution started working..
Not sure whether same will work for you or not. Please verify on your solution as well.
After installing ASP.Net Core via Visual Studio ==> New Project ==> Web ==> ASP.Net Web Application ==> OK ==> ASP.Net 5 Templates. Restarted the system after the installation then create a new project of ASP.NET 5 Template ==> Empty website. I dont get any intellisense and all class names are in RED as if the Visual Studio or Resharper is unable to locate the definition.
Here are some screen shots.
and no intellisense
When using services object, I was expecting services.AddSingleton, service.AddScoped services.AddTransient service.AddLogging and so on...
I have restarted the visual studio but still the same result, however the project compiles and runs as expected but its very difficult to figure out the new api without any support from the intellisense.
I have resharper v 9 with update 1 installed.
Thanks!
I had the same issue with .NET Core and disabling Resharper worked for me. As soon as I disabled it, Intellisense in Razor views started working again.
It all depends what version of ASP.NET 5 you're using, as it's been a bit of a moving target to support. It should work, but for (I think) RC1 bits, but if you're trying to use the current pre-RC2 builds, there are known issues (e.g. the tooling has been completely rewritten). We're hoping to get things fixed and updated post RC2, but with the recent announcements about continuing breaking changes to the tooling (project.json is being phased out and replaced with .csproj files), this might not be so easy. We're going to have to wait and see how the RC2 tooling looks.