Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

c# - the value -1 is outside the acceptable range of [0,2147483647]. Parameter name: value

Problem with scaffolding any controller using visual studio 2019 i get the error :
"there was an error running the selected code generator: 'The value -1 is outside the acceptable range of [0,2147483647]. Parameter name :value'"

Related links i have tried and still this issues persist

I tried the following :
1. (Error while generating view in Visual Studio 2019)
2. (Can't Add View from Controller in VS 2015 : "There was an error running the selected code generator")

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The issue is now fixed with the latest release of Visual Studio 2019: version 16.2.5: https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes#16.2.5

The issue would only to happen when:

  • you have the web.config file for your project open in Visual Studio.

So the workaround for was:

  • if you have the error, make sure you close the web.config file and you will be able to scaffold controllers.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...