VS 2013 invalid argument value parameter name
Posted on 2014-09-10
I have a single form in a WinForms application that gives me strange errors.
If I open the forms designer in VS2013, I can make one change the the UI, and save it. But when ever I make a second change I receive an error informing me " An error was encountered during code generation" With a message Invalid argument value, Parameter name: name
And I have to close the form without saving to move forward. If I did not save the first change, that would also be lost.
Once I have closed the form without saving, and losing my changes, I can reopen the form, and again make one change and save it, then I get the same error.
The odd thing is, if I make no changes the program Builds and Runs correctly.
I have been working on this app on and off for years, and never had a problem until the last couple of days.
Judging by the parameter name is a lower case name rather than a Name, I am guessing the problem is in a resource file or xml file. But I have compared them all with other forms and they appear the same.
I cannot recreate the form from scratch, it is a very complex form that would take literally 100's of man hours to recreate it.
Has anyone experienced this before? And if so, what was the fix?
Failing that, can anyone suggest a way to pin down exactly where in the form the error exists.
Every other form in the app can be edited correctly without problems.