Visual Studio забывает настройки окна и делает путаницу

* {
    box-sizing: border-box;
    font-family: inherit;
}

html {
    font-size: 62.25%;
}

body {
    font-family: sans-serif;
    font-size: 1.6rem;
}

#searchform {
 position: relative;
 width: 500px;
 display: flex;
 justify-content: center;
 align-items: center;
}

#s {
    width: 90%;
    height: 100%;
    padding: .8rem;
    border-top-left-radius: .3rem;
    border-bottom-left-radius: .3rem;
    border: 1px solid dodgerblue;
    border-right-color: transparent; 
}

#submit {
    width: 10%;
    height: 100%;
    padding: .8rem;
    border-top-right-radius: .3rem;
    border-bottom-right-radius: .3rem;
    border: 0px;
    background: dodgerblue;
}
<form role="search" method="get" id="searchform" class="searchform" action="http://">
        <input type="search" id="s" name="s" value="" placeholder="Enter a product name" title="Press enter to search">
        <input type="submit" id="submit" value="         
64
задан BIBD 15 May 2009 в 14:44
поделиться

5 ответов

Sounds like there is definitely a problem with Visual Studio retaining your settings between round-trips and possibly your Visual Studio settings profile in general.

The solution I'd recommend is firstly to reset all settings, secondly customize things to your personal preference and finally take a backup of those customized settings. The idea is that this settings backup file can be used later to automate a quick settings restore to a point you are happy with. The following steps show how to do this and hopefully should sort out even the most confused Visual Studio setting issues:

  1. Close down all instances of Visual Studio.

  2. Go to Start > Programs > Visual Studio 200X > Visual Studio Tools > and choose 'Visual Studio 200X Command Prompt'

  3. Run the sligthly less well known 'devenv.exe /ResetUserData' command. With this command you will lose all of your Visual Studio environment settings and customizations. Because of this, the /ResetUserData switch is not officially supported and Microsoft does not advertise it (the switch is not described in the help for devenv.exe you get when you type devenv.exe /? in a command prompt). Importantly, wait for the resulting devenv.exe process to disappear from Task Manager or even better Process Explorer.

  4. When the process disappears from Task Manager or Process Explorer, run 'devenv.exe /ResetSettings' which will restore the IDE's default settings and eventually start a single instance of Visual Studio.

  5. Now in Visual Studio choose 'Import and Export Settings...' near the bottom of the 'Tools' menu to start the Import and Export Settings Wizard.

  6. Choose 'Reset all settings' radio button and Next > Choose 'No, just reset settings, overwriting my current settings' and Next > Choose your personal 'Settings Collection' preference, I would choose Visual C# Development Settings here (Note: What you choose here has an effect on keyboard shortcuts etc. but you can always repeat this process until happy) and click Finish.

  7. When you get the message that 'Your settings were successfully reset to XXXXXX Development Settings.' click Close then spend a good bit of time adding any personal customizations to Visual Studio such as opening windows you always want open, customizing toolbars and adding any toolbar buttons etc.

  8. When you are finished with your personal customization and completely happy with your setup go again to Tools > 'Import and Export Settings...'

  9. Choose 'Export selected environment settings' radio button and Next > Tick 'All Settings' and Next > Choose a file name and directory and click Finish to store a backup of your current settings in a .vssettings file.

  10. In future if things go haywire again head back to Tools > 'Import and Export Settings...' and this time choose 'Import selected environment settings' radio button and Next > Choose 'No, just import new settings, overwriting my current settings' and Next > Either choose the name of your .vssettings file from the list (usually under the My Settings folder) or Browse.. to where you saved the file and Next > Tick 'All Settings' and click Finish.

  11. Importantly, close the single instance of Visual Studio. Any future instance you open should retain your latest customizations.

67
ответ дан 24 November 2019 в 15:57
поделиться

I had a similar issue when the My Documents folder was stored on a mapped drive. If I opened VS before mapping the drive, VS would act as if it was the first time it had been opened. I solved this issue by storing the environment settings on the local disk.

6
ответ дан 24 November 2019 в 15:57
поделиться

Which solution you're opening shouldn't matter because those settings are not solution-specific. But I wonder do you maybe have Visual Studio 2005 and 2008 installed? If so, opening a solution created in 2005 will open VS 2005 and opening a 2008 solution will open VS 2008. You may have VS 2005 even if you didn't install it. For example, InfoPath 2007 installs a VS 2005 shell.

First I would position the windows where you want them, then do a Tools -> Export Settings and include only the window layouts. That way you at least have something you can revert to.

Then I would check Tools -> Options -> Import Export Settings and make note of where the "Automatically Save My Settings To This File" path is set to. Keep an eye on that file. Do you have any sync software that may be inadvertently overwriting it? Does it point to a non-existing location?

1
ответ дан 24 November 2019 в 15:57
поделиться

У меня аналогичная проблема. И это тоже началось совсем недавно, например, в течение последних 30 дней или около того. Помню, что единственное, что я изменил за этот период, - это обновление Resharper 4.5.

0
ответ дан 24 November 2019 в 15:57
поделиться

На самом деле я выяснил, в чем была причина: предыдущий сбой VS.

Если бы одна из моих Visual Studio экземпляры вылетает по любой причине - в следующий раз, когда я запускаю VS, я получаю странный набор настроек. Поведение зависит от различных факторов, например, были ли у меня открыты другие экземпляры VS в то время.

3
ответ дан 24 November 2019 в 15:57
поделиться
Другие вопросы по тегам:

Похожие вопросы: