I deleted my web.config, how to recreate?

Is there an easy way to recreate my accidentally deleted web.config file from Visual Studio?

+4
source share
3 answers

You will lose all your user settings, but ...

Right click on your project -> Add item ... -> Select "Web configuration file" (name it web.config)

In the future, you may need to use some form of Source Control ( Git , which would be useful for one developer, t want to worry about setting up a version control server).

+14
source

If you have just recently created a project, you can simply create a new project, copy the file to the original folder of the project, then open it and search and replace so that the namespace and other information related to the project matches your original project.

Of course, you can restore from a backup that you remember, right ?; -)

0
source

I assume you are not using Source control. If you cannot restore your element, you will not be able to "recreate" your web.config to a large extent. The settings created in this .config file now just disappeared. If you create a new web.config file and your project is not very large, you may be in luck. You may have a local copy of web.config available, try a good search!

0
source

Source: https://habr.com/ru/post/1299553/


All Articles