I'm building an ASP.NET MVC Web App, and everything was ok until a few hours ago, when something must have gone wrong, and now I cannot create any view anymore, may they be empty or scaffolded. Any idea how to fix it ? (I'm currently using Visual Studio Community 2019 (version is 16.2.1))
I searched and tried some solutions like this one, this second one or again this latter one, but nothing worked for me.
The view that I want to create would be for this function (so that would be the classic Details.cshtml view):
public ActionResult Details(int? id)
{
if (id == null)
{
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
}
Candidate candidate = db.Candidates.Find(id);
if (candidate == null)
{
return HttpNotFound();
}
return View(candidate);
}
However, I can't create a view, VS keeps strucking me with the following error, wether I select an Empty
template or the Details
one for my view, and wether I choose a Model class
or not.
There was an error running the selected code generator: 'The value -1 is outside the acceptable range of [0,2147483647]. Parameter name: value'` (By the way, I checked for any parameter named value in my solution, and there wasn't any)
Please save me from finishing the hole my head is digging inside the wall... Thanks!!