none
Huge delays after building a solution

    Question

  • Hi,

    I am working inside a solution with just over 50 projects inside it and I just upgraded from Visual Studio 2010 to Visual Studio 2015 and I am having some pretty serious speed issues...

    The main issue is when a build completes either Rebuild All or just building a specific project at the end of the build Visual Studio will report 'Build successful' and the UI will completely stop for 60-90 seconds or so. Any attempts to interact results in the message bubble appearing saying 'Visual Studio is waiting for an internal operation to complete'

    Similarly sometimes attempting to save a single file (change one character and press save) takes up to 60 seconds...

    This seems a little ridiculous to me given 5 years of development has occurred between 2010 and 2015...

    I have uninstalled my anti-virus to no avail, I have completely disable the xaml designer and elected all xaml files to be opened in text source editor mode and that hasn't helped either...

    It seems that projects with no xaml components build and do not have this delay

    Also switching between 2 xaml files can take up to 20 seconds if one of them has any pending changes, if both have been saved the delay does not occur.

    What is going on? Right now I think I will have to go back to 2010 or investigate 2013 as the upgrade path

    • Moved by Albert_Zhang Thursday, May 19, 2016 2:03 AM From MSBuild Forum
    Wednesday, May 18, 2016 3:58 AM

All replies

  • Hi Brad1308,

    >> The main issue is when a build completes either Rebuild All or just building a specific project at the end of the build Visual Studio will report 'Build successful' and the UI will completely stop for 60-90 seconds or so.

    This forum is about the usage of MSBuild, as your issue is more related to your Visual Studio itself, I help you move it to the VS general forum for better support.

    Thank you for your understanding.

    Best Regards,

    Albert Zhang


    Thursday, May 19, 2016 2:02 AM
  • Hi  Brad1308,

    Do you install certain extension tools in your VS IDE like the ReSharper or others? As far as I know, certain extension tools/add-ins would impact the VS performance.

    Maybe you could run your test in safe mode, check it again.

    Devenv.exe /SafeMode

    In addition, as you said that it works well in VS2010, so it means that you upgrade this solution using the VS2015, please open the solution folder, and check that whether it still has some vs2010 files there like the .suo or .sln or others, please delete them, and then re-open the VS2015 .sln file, clean and rebuild, check it again.

    Of course, please also visit the output window which will share us the detailed message there, so we could know which steps really impact the build performance.

    Please also restart your machine if it was opening for a long time.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, May 20, 2016 5:28 AM
    Moderator
  • Hi Jack,

    I do not have any extensions like Resharper installed it is just vanilla Visual Studio Professional 2015.

    Running the solution in safe-mode as you suggested prevents me from opening any xaml files. I am not sure why...the build does seem faster though.

    When I select the VS2010 solution file in VS2015 it opens the solution but it does not create a new VS2015 solution file so I can't exactly delete the old VS2010 solution file. I have however restarted my computer multiple times and deleted the suo file multiple times neither resulting in any performance difference

    Target Performance Summary:
            0 ms  Rebuild                                    1 calls
            0 ms  CreateCustomManifestResourceNames          1 calls
            0 ms  ModifyUnitTestPlatformVersion              1 calls
            0 ms  GetReferenceAssemblyPaths                  1 calls
            0 ms  AfterCompileWinFX                          1 calls
            0 ms  BeforeResGen                               1 calls
            0 ms  DesignTimeMarkupCompilation                1 calls
            0 ms  ResolveCodeAnalysisRuleSet                 1 calls
            0 ms  AfterResGen                                1 calls
            0 ms  CoreBuild                                  1 calls
            0 ms  ResolveReferences                          1 calls
            0 ms  AfterMarkupCompilePass1                    1 calls
            0 ms  CreateSatelliteAssemblies                  1 calls
            0 ms  Clean                                      1 calls
            0 ms  FileClassification                         1 calls
            0 ms  Compile                                    1 calls
            0 ms  AfterClean                                 1 calls
            0 ms  SetWin32ManifestProperties                 1 calls
            0 ms  SetBuildInfoDefaults                       1 calls
            0 ms  DeleteBuildInfoResource                    1 calls
            0 ms  PrepareResources                           1 calls
            0 ms  AfterBuild                                 1 calls
            0 ms  AfterCompile                               1 calls
            0 ms  Build                                      1 calls
            0 ms  ComputeIntermediateSatelliteAssemblies     1 calls
            0 ms  CleanXsdCodeGen                            1 calls
            0 ms  BeforeRebuild                              1 calls
            0 ms  GetFrameworkPaths                          1 calls
            0 ms  ResGen                                     1 calls
            0 ms  CleanReferencedProjects                    1 calls
            0 ms  _AfterCompileWinFXInternal                 1 calls
            0 ms  DeleteBuildInfoFile                        1 calls
            0 ms  _CopySourceItemsToOutputDirectory          1 calls
            0 ms  GetTargetPath                              1 calls
            0 ms  ResolveKeySource                           1 calls
            0 ms  BeforeCompile                              1 calls
            0 ms  AfterRebuild                               1 calls
            0 ms  BeforeResolveReferences                    1 calls
            0 ms  AfterResolveReferences                     1 calls
            0 ms  PrepareResourceNames                       1 calls
            0 ms  BuildOnlySettings                          1 calls
            0 ms  DesignTimeXamlMarkupCompilation            1 calls
            0 ms  GenerateTargetFrameworkMonikerAttribute    1 calls
            0 ms  PrepareForRun                              1 calls
            0 ms  _GenerateCompileInputs                     1 calls
            0 ms  ResolveSDKReferences                       1 calls
            0 ms  BeforeClean                                1 calls
            0 ms  GetInstalledSDKLocations                   1 calls
            0 ms  _SetTargetFrameworkMonikerAttribute        1 calls
            1 ms  _SetEmbeddedWin32ManifestProperties        1 calls
            1 ms  ExpandSDKReferences                        1 calls
            1 ms  _GenerateSatelliteAssemblyInputs           1 calls
            1 ms  _TimeStampBeforeCompile                    1 calls
            1 ms  AssignTargetPaths                          1 calls
            1 ms  PrepareForBuild                            1 calls
            1 ms  BeforeBuild                                1 calls
            1 ms  GetCopyToOutputDirectoryXamlAppDefs        1 calls
            1 ms  _TimeStampAfterCompile                     1 calls
            1 ms  _CheckForCompileOutputs                    1 calls
            1 ms  PreXsdCodeGen                              1 calls
            1 ms  CleanPublishFolder                         1 calls
            1 ms  GetNativeManifest                          1 calls
            2 ms  CoreClean                                  1 calls
            2 ms  _CheckForInvalidConfigurationAndPlatform   1 calls
            2 ms  _CopyOutOfDateSourceItemsToOutputDirectoryAlways   1 calls
            2 ms  SplitResourcesByCulture                    1 calls
            2 ms  _CopyAppConfigFile                         1 calls
            2 ms  IncrementalClean                           1 calls
            3 ms  CreateManifestResourceNames                1 calls
            3 ms  AssignProjectConfiguration                 1 calls
            5 ms  CopyFilesToOutputDirectory                 1 calls
            5 ms  _SplitProjectReferencesByFileExistence     1 calls
            8 ms  GetCopyToOutputDirectoryItems              1 calls
           13 ms  CoreResGen                                 1 calls
           16 ms  _CleanGetCurrentAndPriorFileWrites         1 calls
           22 ms  ResolveProjectReferences                   1 calls
           89 ms  PreBuildEvent                              1 calls
          107 ms  _CopyFilesMarkedCopyLocal                  1 calls
          112 ms  CoreCompile                                1 calls
          289 ms  UnmanagedRegistration                      1 calls
          409 ms  ResolveAssemblyReferences                  1 calls

    Task Performance Summary:
            0 ms  ResolveCodeAnalysisRuleSet                 1 calls
            0 ms  FindAppConfigFile                          1 calls
            0 ms  CallTarget                                 1 calls
            0 ms  Message                                    3 calls
            0 ms  ResolveKeySource                           1 calls
            0 ms  Delete                                     4 calls
            0 ms  AssignCulture                              1 calls
            0 ms  RemoveDuplicates                           3 calls
            1 ms  GetFrameworkPath                           1 calls
            1 ms  ReadLinesFromFile                          2 calls
            1 ms  ResolveNonMSBuildProjectOutput             1 calls
            1 ms  WriteLinesToFile                           2 calls
            2 ms  MakeDir                                    2 calls
            2 ms  AssignProjectConfiguration                 1 calls
            2 ms  AssignTargetPath                           7 calls
            3 ms  CreateCSharpManifestResourceName           1 calls
            4 ms  ConvertToAbsolutePath                      1 calls
           11 ms  FindUnderPath                              7 calls
           11 ms  GenerateResource                           1 calls
           26 ms  MSBuild                                    4 calls
           89 ms  Exec                                       1 calls
          111 ms  Csc                                        1 calls
          115 ms  Copy                                       5 calls
          283 ms  RegisterAssembly                           1 calls
          409 ms  ResolveAssemblyReference                   1 calls

    Build succeeded.

    The output window simply displays 'Build succeeded' on the last project then becomes non responsive for 60-90 seconds then the final 

    ========== Rebuild All: 62 succeeded, 0 failed, 2 skipped ==========

    is displayed and I have no idea what is happening between these 2 steps there is no feedback other than the dreaded 'Visual studio is waiting for an internal operation to complete' message balloon

    Friday, May 20, 2016 7:10 AM
  • Hi Brad1308,

    >>Running the solution in safe-mode as you suggested prevents me from opening any xaml files. I am not sure why...the build does seem faster though.

    As you said that you couldn't open the xaml file, is it the UWP app or others?

    For example, if you run the blank VS in safe mode, and then create a simple new app which has the XAML file(uwp app or others), could you create this project? Could you open the xaml file?

    Actually it seems that the VS2015 with update 2 has a update now, if I create a uwp app in safe mode, it would tell me to install the update package, but if I just open the VS directly(not in safe mode), I could create the uwp app successfully.

    >>   409 ms  ResolveAssemblyReference                  

    In addition, it seems that the assembly reference takes long time, whether certain project has so many references? If you set the referenced assemblies' property "copy local=true/false", and then build the same solution for two or more times, how about the result?

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Saturday, May 21, 2016 6:25 AM
    Moderator
  • This is many class library projects inside a solution. Essentially these are just a bunch of libraries being written that are called from an outside application.

    When I create a blank solution then add a new class library project and then add a new WPF User Control then attempt to open the .xaml file it just says 'Visual Studio has encountered an unexpected error' in a dialog box then nothing happens. I can open the .cs part of the window however. I did see the new update and installed it this morning and even with the new update I still cannot open the xaml file in safe mode.
    I can however chose the 'Open with' option and select 'Source code text editor' instead of 'Automatic Editor Selector (XML)' and then I can open the xaml files but I lose intellisense. It seems the auto select option is choosing the 'Workflow Designer' which is failing.

    Yes all the references in that project all have copy local = true however in Visual Studio 2010 this was not an issue. This has been changed in Visual Studio 2015? What part is now slower? I ask so that I can hopefully avoid this in future.

    I have changed all the references to be copy local = false (they were all true) and this has not changed anything about the speed.

    This project has 99 references, building it in safe mode eliminates the delay all together regardless of whether 'copy local' is true or not so what does safe mode not do after a build that normal mode does?

    Tuesday, May 24, 2016 3:43 AM
  • Hi Brad1308,

    >>When I create a blank solution then add a new class library project and then add a new WPF User Control then attempt to open the .xaml file it just says 'Visual Studio has encountered an unexpected error' in a dialog box then nothing happens. I can open the .cs part of the window however. I did see the new update and installed it this morning and even with the new update I still cannot open the xaml file in safe mode.

    Not very sure that whether the XAML file issue really impacts the VS performance, but I think we need to resolve this issue firstly before we think about the performance issue.

    Could you open the same project which has the xaml file in other VS machine? Maybe you could share me a simple sample using one drive, I will test it in my side using the same Environment as yours.

    Of course, if a simple blank project still has this issue, I think we would think about the VS setup.

    You can get the log files with the following steps:
    1) Download collect.exe from the link below. <http://go.microsoft.com/?LinkId=8967043>
    2) You may choose to save the tool for later use, or to run directly.
    3) The utility creates a compressed cabinet of all the VS and .NET logs to %TEMP%\vslogs.cab.

    You can get more details about how to get the log files here:
    http://blogs.msdn.com/heaths/archive/2008/05/09/visual-studio-and-net-log-collection-utility.aspx

    You could upload your log files to the one drive and share us the downloaded link, I will check it in my side.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 25, 2016 6:00 AM
    Moderator