Visual Studio 10, reset configuration manager to factory settings

陌路散爱 提交于 2019-12-23 12:05:54

问题


I have made several changes to both debug and release settings and now I want to return to factory settings. How could I do that?


回答1:


There is no easy way to go back to the default configuration for a project file. When you create a new project it's based off a template located in your Visual Studio directory (e.g. C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\CSharp\Windows\1033\ClassLibrary.zip) and VS has no way of reapplying the template. However, you can manually go back to the default configuration by doing the following:

  1. Delete *.user file in your project's directory, this contains a few build configurations values such as command line arguments.
  2. Create a new project that is the same type you're trying to reset.
  3. For the new empty project and your existing project: right click and select Unload Project, right click and select Edit, then copy all the PropertyGroup sections from new project and paste them over all the PropertyGroup sections in your old project.

The above assumes you didn't actually add or remove any configurations or platforms, otherwise you will lose those changes. That should get almost all the settings back to their defaults without messing up your source files or references.




回答2:


If you have a backup of your project just search for the files that has .user extension on your backup then copy it and simply replace the files from your current project. Re-open your project. That's it

In my case there are 2 files with .user extension. It is sampleForm.vbproj.user and MyProject.vbproj.user




回答3:


If you want to reset your VS follow below mentioned steps

  1. On the Tools menu, click Import and Export Settings.

  2. On the Welcome to the Import and Export Settings Wizard page, click Reset all settings and then click Next.

  3. If you want to save your current settings combination, click Yes, save my current settings, specify a file name, and then click Next.



来源:https://stackoverflow.com/questions/8887561/visual-studio-10-reset-configuration-manager-to-factory-settings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!