none
Very long projects building in release configuration

    Question

  • After upgrading VS2015 to Update2 building time was increased up to 3-5 minutes in Release configuration.  In debug configuration the build takes 20-30 seconds. Stuck happens after the "1> ------ Build started: Project: FirstApp, Configuration: Release x86 ------", then nothing is observed for 3-5 minutes and then the build is proceeding normally.
    Sunday, May 29, 2016 11:39 AM

Answers

  • Hi VitaliyLivnov,

    I compile your shared sample UWP project in my side with Visual Studio 2015 update 2, it takes about  1min, which is faster than on your machine. So I think one of the reason is your machine environment. Please make sure your machine has enough CPU and Memory when compiling project.

    And I discuss this issue with UWP experts about why UWP compile slower than other type project. The reason is UWP project will compile with native tool in release mode build. Please open the Properties page of the project and then uncheck the "Compile with .NET Native tool chain" option. After uncheck this option, the project compile take just 10 seconds, which is more faster.

    Best Regards,
    Weiwei


    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.

    Tuesday, June 07, 2016 1:10 AM
    Moderator

All replies

  • Hi VitaliyLivnov,

    The Release build often slower than Debug mode because the Release mode will optimize your code and files in your project. If you are reference many references and files in your project and set the Copy to Local property for the files as True, these operations can let the optimize process takes a long time.

    Since your problem is occurs after upgrading to Update 2, I suggest you create a new default project to check whether the new project also take a long time when build in Release mode.

    If the new project also has this issue, please try uninstall the Update 2 and then rebuild again to confirm whether this problem caused by Update 2. Please make sure your machine environment is not busy when building your project.

    If the new project build quickly, please tell us which type of your project and some structure information about your project, such as References, Projects count and the relationship between the projects. I will try build with your project structure in my side.

    Best Regards,
    Weiwei


    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.

    Tuesday, May 31, 2016 3:07 AM
    Moderator
  • New project also has this issue, but I can not uninstall the Update 2, because I have another issues with previous version of VS. Can I reduce the build time of release-version in other ways?
    Tuesday, May 31, 2016 8:04 PM
  • Hi VitaliyLivnov,

    As far as I know, the release mode often execute code optimizing when build this project. So please try disable the code optimizing from Project Properties -> Build tab -> Optimize code.

    In addition, please compare the output folders of Release and Debug to check whether they are generate the same files in these folders. And please tell us what's the project type you are building. Please try create another type to check whether it also has this issue.

    Best Regards,
    Weiwei


    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, June 01, 2016 5:33 AM
    Moderator
  • I disabled the code optimization, but it did not help. The project type: UWP application for WIN10.

    Here is the output file list for debug and release versions.

    Wednesday, June 01, 2016 7:01 PM
  • Hi VitaliyLivnov,

    I create a default UWP application for Windows 10 in both of my Visual Studio 2015 Update 1 and Visual Studio 2015 Update 2. They are all take about 2 minutes when build in release mode.

    I get a process of "Restoring NuGet packages..." when it sticks on "1> ------ Build started: Project: FirstApp, Configuration: Release x86 ------".

    After I disable restoring NuGet packages from Tools -> Options -> NuGet package Manager, the build time reduce about 20 seconds.

    So I think this problem is not caused by Update 2. It is default action for application build in release mode. There are more actions need to do in release mode than debug mode, such as optimizations.

    http://stackoverflow.com/questions/367884/what-is-the-difference-between-debug-and-release-in-visual-studio

    I suggest you using debug build when developing application. Please using the release build when you want to release this application.

    Best Regards,
    Weiwei


    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.

    Thursday, June 02, 2016 1:52 AM
    Moderator
  • I don't see the "Restoring NuGet packages..." string in release mode. And disabling of restoring packages don't help.

    I can't use debug mode, because debug messages take take a lot of app working time, but I can't disable "_DEBUG" macro (which control this messages) in this mode. 

    Thursday, June 02, 2016 7:42 PM
  • Hi VitaliyLivnov,

    According to the message in output window from the screenshot, I find you are execute deploying action when your build your UWP app.

    Please uncheck the "Deploy" section in Release Configuration Manager as below screenshot.

    If it still can't reduce the build time, I'm afraid that there doesn't have other settings to effect the build time in Visual Studio.

    Best Regards,
    Weiwei


    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, June 03, 2016 2:25 AM
    Moderator
  • Thanks, but it does not help. 
    Saturday, June 04, 2016 11:13 AM
  • Hi VitaliyLivnov,

    Please provide a sample project to OneDrive and share a public link here. And please tell us how much time does it spend. I will test it in my side to confirm whether this issue related to your project or your Visual Studio environment.

    If it also takes the same time in my side, I'm afraid that this problem should be related to your project. And if it build faster than you, there may be some problem in your machine environment. I suggest you change another machine to build again.

    Best Regards,
    Weiwei


    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.

    Monday, June 06, 2016 2:33 AM
    Moderator
  • Here is empty UWP project: https://onedrive.live.com/redir?resid=AC8364E0A9313578!4974&authkey=!ANkPq8ktfqtktE4&ithint=file%2crar

    The release-build takes 1.5 minutes in my computer.


    Monday, June 06, 2016 7:27 PM
  • Hi VitaliyLivnov,

    I compile your shared sample UWP project in my side with Visual Studio 2015 update 2, it takes about  1min, which is faster than on your machine. So I think one of the reason is your machine environment. Please make sure your machine has enough CPU and Memory when compiling project.

    And I discuss this issue with UWP experts about why UWP compile slower than other type project. The reason is UWP project will compile with native tool in release mode build. Please open the Properties page of the project and then uncheck the "Compile with .NET Native tool chain" option. After uncheck this option, the project compile take just 10 seconds, which is more faster.

    Best Regards,
    Weiwei


    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.

    Tuesday, June 07, 2016 1:10 AM
    Moderator
  • Thank You, it works!

    But now I received message about breakpoints will not be hit.

    Tuesday, June 07, 2016 7:47 PM
  • Hi VitaliyLivnov,

    This is a common prompt when your try debug a release build application. So if you want to debug your application, please build your application in Debug mode. When you plan to release your application, then please build your project in Release mode.

    Since your the problem in your original post has been resolved, please mark the helpful reply as answer to close this thread, which is benefit to other communities who has the same problem. And if any problem about Visual Studio IDE, I suggest you create a new thread. It can involve more communities to help your problem.

    Best Regards,
    Weiwei


    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, June 08, 2016 3:12 AM
    Moderator