问题
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:
- Delete *.user file in your project's directory, this contains a few build configurations values such as command line arguments.
- Create a new project that is the same type you're trying to reset.
- 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
On the Tools menu, click Import and Export Settings.
On the Welcome to the Import and Export Settings Wizard page, click Reset all settings and then click Next.
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