IntelliSense cannot find ViewComponent Invoke() method in Razor Pages project - visual-studio

I get this IntelliSense error message in Visual Studio error console every time I open any .cshtml file in the project:
Could not find an 'Invoke' or 'InvokeAsync' method for the view component 'xxxxxxx'
All my view components have Invoke() or InvokeAsync() methods in them. When I run the project, everything works fine and all view components are rendered properly, so I think my code is not a problem here.
Anyone encountered this problem in VS IntelliSense before? I'm running Microsoft Visual Studio Community 2019 Version 16.8.6 and project is running on asp.net 5.0.

I think the Intellisense for your project is broken due to some personal steps. To solve it, you have to close your project, delete .vs hidden folder under the solution folder, bin and obj folder.
After that, restart your project and I hope that your issue will disappear.

This was resolved after installing Visual Studio 2022.

Related

VS2019 unable to add controller

Please help, I am unable to add new controller in VS2019 (latest version 16.7.2)
I got:
Method not found: 'EnvDTE.Project Microsoft.WebTools.Scaffolding.Core.FactoryConfig.IsaffolderFactoryConfigEvaluationContext.get_ActiveProject()
I already upgraded it to the latest 16.7.2 and removed .vs folder, clean solution and project .. but no luck..
Regards
I had the same problem, second in 3 months due to a vs update
My problem was with Syncfusion extensions
Disable your Syncfusion extensions
Close Visual Studio 2019
Re-open Visual Studio 2019
You may have to add a blank controller
you can then add a new controller or scaffolded item from the context menu.
Hope that this helps
I repaired VS 2019 installation and it works properly now..
still don't know why this can be happened

Visual Studio - An exception was encountered while constructing the content of this frame

I am trying to open a solution on VIsual Studio 2017. (The project was originally developped in VS 2012). I managed to open the project and to work on it before. But this morning I get :
An exception was encountered while constructing the content of this frame. This information is also logged in "C:\Users\myName\AppData\Roaming\Microsoft\VisualStudio\15.0_fa6f4449\ActivityLog.xml
The project loads in VS, but it does not recognized the Entity Framework Models correctly. Any idea on what is happening?
For further reference (maybe it'll help someone in the future), I have solved this error by updating Visual Studio. It was apparently an IDE bug. (More info here)

xamarin project type incompatible

This error started showing from yesterday, I remember installing Web development packages and updates windows. Before that if was working fine.
If I reload project same error shows up.
The application which this project type is based on was not found.
Please try this link for further information:
http://go.microsoft.com/fwlink/?LinkID=299083&projecttype=EFBA0AD7-5A72-4C68-AF49-83D382785DCF
This link redirects https://www.xamarin.com/visual-studio page , which is nothing but xamarin download page.
I tried uninstalling Xamarin packages and reinstalling.
It did not solve the issue.
Now I am doing complete uninstall of MS Visual Studio 2017
Please note that no changes have been made to csproj or solution file.
I get the "xamarin project type incompatible" frequently. (VS2015)
The solution for me:
Close down VS.
In the src project folder delete the .vs folder.
Restart VS.
Complete uninstall of Visual Studio along with C++ distributables from Control Panel > Programs and Features and then re-installing Visual Studio fixed the issue. Seems its caused by errors in installation
Microsoft should code properly and let programmers know if there were errors and 'repair' option is supposed to fix them. I don't know why these things are missed out in roll-outs.

Visual Studio 2013 Intellisense not working

I have Visual Studio 2013 Professional with Update 2 RC installed. I tried to add new projects using ASP.NET SPA Template, AngularStart and a few other SPA templates. None of them showing intellisense even the VS can't determine the user defined class types, as their font color is black, GoToDefinition option is disabled in context menu, and I can't see the suggestions drop-down while typing or while accessing class methods through instance.
I reset the settings files many times from Import Export option. I also tried "devenv /setup" but didn't work. At the end I uninstalled and re-installed the VS 2013, still having the same problem.
I tried adding a new Web API project with "Individual User Accounts", intellisense works. But when i added a new Web API project without authentication and later i installed nuget package Microsoft.AspNet.Identity.Owin, now intellisense stops working.
Edit:
I am getting this problem in almost every project. when I close the newly created project and reopen it, the problem arise. And when I unload and reload the project in solution, then everything starts working. So I have to unload and reload the projects each time I open a solution in visual studio.
Not sure if it's the same thing, but I recently had a project's Intellisense in VS 2013 stop working too. If I cleaned the solution and rebuilt it, it would work for a very short time but then stop again soon. Lots of wavy red underlines too where there shouldn't have been.
For me, I closed VS and deleted the the solution's .suo file (in the solution's root). (Keep in mind this will also delete your breakpoints, bookmarks, and other user-preferences. But nothing "code"-related.) You might also try deleting the csproj.user files as well. I guess it just got corrupted or who knows. But haven't had a problem with it since.
I hope this helps!

Visual studio 2010 ajax control toolkit tab container

We just upgraded to visual studio 2010 RC1 and all of a sudden our controls inside tabcontainer disappeared from the designer file.
Actually, it all seemed good in the beginning, the project compiled nicely, but as soon as we did any change in the markup of a page and build the code for the controls inside the tabcontainer disappeared and we got errormessages like so
"Error 3 The name 'ddlPeriodicityStartInMonth' does not exist in the current context "
Does anyone know if any changes are made to tabcontainer to visual studio 2010 or if this just is a bug?
Thanks in advance.
Found this one also.
Workaround: Missing Declarations for Controls in Designer File
I had the same problem.
Check out the following link:
Microsoft Connect - Bug in generating the designer.cs file in VS2010
Hope it helps.

Resources