avi
avi

Reputation: 441

C# value does not fall within expected range

Hello i am getting a weird error in my application.

there are times when i open my form in design view (form not running), i do not get any error, and sometimes i get an error value does not fall within expected range.

when i close my solution and open it again, the form works fine,then start running the application, and stop it and open the form (same stuff, it may work or sometime it may not work).

also this does not always happen to the same form, it happens to random different form, sometimes i can get it in form 1, sometimes in form 2,

Here is a printscreen of that error

Upvotes: 2

Views: 22377

Answers (2)

grayman
grayman

Reputation: 1

Close VS then delete .suo file (.vs\solution_name\vXX.suo). This will close all tabs but you can reopen them.

Upvotes: 0

dialex
dialex

Reputation: 2876

  1. Close Visual Studio and deleted all *.user and other temporary or user-specific files.
  2. Open Visual Studio and rebuild your project.
  3. Open the form and the problem should be solved.

If your using SVN, just use the "cleanup" command to delete all unversioned or ignored files.

Upvotes: 5

Related Questions