Visual studio 2010 Errors out on starting “-832” is not a valid value for property “width”

前端 未结 7 1342
长情又很酷
长情又很酷 2020-12-16 10:13

My Visual Studio 2010 was working fine this morning (I run in in XP sP3 under Paralles) I restarted the entire laptop and I started getting this error. I even uninstalled VS

相关标签:
7条回答
  • 2020-12-16 10:30

    Starting with Visual Studio 2017, settings are now stored in a private registry hive. You will need to first load the VS2017 registry hive:

    1. Select HKEY_USER in regedit.exe
    2. File -> Load Hive
    3. Browse to %LOCALAPPDATA%\Microsoft\VisualStudio\15.0_{INSTANCE}
    4. Select privateregistry.bin and click open
    5. Give the loaded hive a name such as VS2017
    6. Once the hive is loaded, locate the MainWindow value and fix the negative value in it.
    7. The private hive can only be used by one application, so you will now need to select the hive you just loaded and unload it with File -> Unload

    As for locating which instance is the default instance, I just looked for the most recently update file.

    0 讨论(0)
  • 2020-12-16 10:45

    Do you see anything in the application event log?

    Try these

    devenv /ResetSettings 
    devenv /installvstemplates 
    

    Delete contents in here:

    %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCache
    
    0 讨论(0)
  • 2020-12-16 10:52

    regedit fixed the problem...searched for the invalid width number under the microsoft key...(found key=MainWindow). Edited the value and removed the 'negative' character.

    0 讨论(0)
  • 2020-12-16 10:52

    Try deleting files under <username>\Documents\Visual Studio 2010\Settings. That's where your user preferences are stored, including (I think) which windows you placed where. These are not deleted when you uninstall or reinstall VS, so if something is botched in there it will still be botched after a reinstall. Also look for droppings under <username>\AppData\Local\Microsoft\VisualStudio\10.0.

    0 讨论(0)
  • 2020-12-16 10:53

    Not sure how this is caused, but possibly related to having multiple monitors - I have been alternating between running 1 or 2 monitors. Found a solution here:

    http://rainabba.blogspot.com/2010/07/visual-studio-2010-wont-start-120-is.html

    Basically, the erroneous negative width value(s) are stored in the registry, not on disk, so try this solution before the other destructive solutions in this SO question.

    Fire up regedit, and navigate to:

    HKCU\Software\Microsoft\VisualStudio\10.0\MainWindow
    

    Edit the registry value, replacing any negative numbers with positive numbers (I replaced two instances of '-1' with '200')

    0 讨论(0)
  • 2020-12-16 10:56

    This solution of changing any negative values to a positive value in the MainWindow registry entry also works for Microsoft SQL Server Management Studio - tested on v13.0.

    HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\13.0\ MainWindow
    
    0 讨论(0)
提交回复
热议问题