2

While I am creating an ASP.NET MVC view in Visual Studio 2019, I am getting this error:

There was an error running the selected code generator: 'the value -1 is outside the acceptable range 0,2147483647

How can I solve it?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Neal
  • 21
  • 5
  • Try the solution [Here](https://stackoverflow.com/a/35815094/2174170) – Dumisani Jul 30 '19 at 10:50
  • Thanks !! i got solution , we have to open vs-2019 and select tool ->Options->General -> ignore GPU memory access exception if the data written did'nt change Mark it as checked then error will be disappear :) – Neal Jul 30 '19 at 15:02
  • Possible duplicate of [Can't Add View from Controller in VS 2015 : "There was an error running the selected code generator"](https://stackoverflow.com/questions/34992599/cant-add-view-from-controller-in-vs-2015-there-was-an-error-running-the-sele) – JumpingJezza Jul 31 '19 at 08:59

3 Answers3

0

We have to open vs-2019 and select tool -> Options-> General -> ignore GPU memory access exception if the data written didn't change. Mark it as checked then error will be disappear.

Gert Arnold
  • 105,341
  • 31
  • 202
  • 291
0

I ran into the same problem tomorrow, tried many manipulations found on different subjects, including yours, nothing worked. Finally, someone gave me a "solution" that let me continue my project, hence I'm sharing it here in case yours doesn't fit someone's issue: simply copy/paste any view...!

Yeah, it doesn't make the resilient error go away, and you'll have to hand code each new view, but at least you'll be able to keep coding your project.

Hope this helps.

Jueverhard
  • 111
  • 11
0

You might want to check out my answer to this in:

Paul Cociuba
  • 116
  • 2