Why does Visual Studio take so long to add a project or file

c#, visual-studio

Solution

The answer to this is highly dependent on the version of Visual Studio you are using, the language you are using, and the particular build configuration your project is using. I would need to see all three, as well as your system hardware and software configuration to give you the precise cause.

However, based on the absurdly long time you listed (5 minutes), I predict that you are facing one of the following problems:

- Your build configuration requires certain build steps be run the first time the project is loaded, and the build is taking a long time.

- Your machine uses exceptionally out-of-date hardware, or has no available memory and is operating from a page file.

- One or more of your projects is bound to source control, and the source control provider in Visual Studio and/or the server it's connecting to are running slowly. Try unplugging your computer from the network (or disabling your wireless card) and adding a project again. This will cause the source control connection to fail immediately so if adding a project becomes fast then you found the problem.

Problem

It takes about 5 minutes to add a new `project` to a `solution` & roughly the same to add a `class` in `Visual Studio`. The time is mainly waiting on the dialogue window to open. I saw this solution for deleting files Delete File VS, is there a similar solution for what I am experiencing? Edit: - I experience this in `VS 05, 08, 10` - The source control is `TFS` (solutions are brought locally, I assume this is implied) - I have `Mcafee` software encryption - My dev PC is a fast new business machine. - No resharper - Reflector installed - SQL Prompt installed I have debugged `Visual Studio`, and have found each time is tries to add an item it load all the symbols from the below directories which contain `dll`'s. I have tired deleting all the data in this folder but it comes back next time add something. It appears the bulk of the time is spent loading the symbols...

Original source

Related problems