0

I'm building the Asp.net MVC project in Visual Studio 2019 and got HTML helper related issues on cshtml razor files.

In the .sln file of this project, the project is previously build for VS 2012.

> Microsoft Visual Studio Solution File, Format Version 12.00
> # Visual Studio 2012

So, I installed VS 2012, and all errors gone.
But those errors are still in VS 2019.
The errors are like

HtmlHelper does not contain a definition for BeginForm.
The Name TempData does not exist in the current context.

I find out I can build successfully in both VS 2012 and VS 2019.
It just IntelliSense problem in VS2019.
How can I fix this issue for VS2019?

Steven Sann
  • 478
  • 1
  • 7
  • 27
  • Could you please provide a small sample about your project? Does [this link](https://stackoverflow.com/questions/8762709/use-tempdata-in-a-helper-error-the-name-tempdata-does-not-exist-in-the-curren) help you handle the issue? – Mr Qian Jul 14 '21 at 09:37
  • Did you have a try to input all namespace: `System.Web.Mvc.Html.FormExtensions.BeginForm` ? – Dylan Jul 16 '21 at 05:06

0 Answers0