Showing posts with label Process Monitor. Show all posts
Showing posts with label Process Monitor. Show all posts

Saturday, July 24, 2010

Visual Studio 2010 won't start - '-120' is not a valid value for property 'Width'.

So today I went to open VS 2010 RTM and was surprised by an error that seemed more appropriate for a runtime error than something I'd see just opening devenv:




I spent 3 hours researching this and Google/MSDN got me nowhere. Nearly every promising lead I found refered to "devenv.exe /ResetSettings", but nothing I tried made a difference. That pretty much told me that it's not an environment setting Per se, but something more generalized to Windows.


So I fired up Process Monitor and started looking for registry activity related to 'width' and '-120'. It didn't take me long to find the registry entry: HKCU\Software\Microsoft\VisualStudio\10.0\MainWindow which contained the data: "4 4 -120 200 3". Seemed obvious enough that this was the size/location of the DevEnv MainWindow so I changed -120 to 800 (seemed a reasonable width), and fired up VS2010 again.


NO ERROR!  :)


Hope this will save someone else the headache. I think this occurred because I RDP'd into my workstation (which has 4 monitors connected, number 2 from the left being my primary) from my Droid using "Remote RDP" from www.toremote.com (not that the client has any responsibility, I just wanted to give the dev some exposure because I really like this RDP client), and did a remote restart. I think Windows didn't gracefully handle the geometry and when I tried to reopen from my physical desktop, VS2010 didn't gracefully handle the error.

Followers