简体   繁体   中英

visual studio 2015 build takes long time

I went from VS 2013 to VS 2015 and when I do a build it takes 90+ seconds or so.

Is there anything I can do to speed that up? (VS 2013 took about 10 seconds).

Also, What is the cause? I do see it is running a couple extra things during build (I don't think 2013 did all these):

  • Starting .NET Native compilation
  • Processing application code
  • Computing application closure and generating interop code
  • Compiling interop code
  • Generating serialization code
  • Cleaning up unreferenced code
  • Running native compilers

.Net native will affect compilation speed. The .Net Native FAQ discusses the compilation speed difference:

Compilation with .NET Native is slower than with MSIL. Why?

Normal app development uses the standard MSIL/JIT development experience in Visual Studio. The .NET Native compiler isn't invoked until the application is deployed to the device, after most of the development process is finished and the focus shifts to optimizing the app. At this point, the compilation times are similar to optimized C++ with Link-Time Code Generation.

By default Universal app debug builds (which you probably use most often during development) won't enable .Net Native. Universal app release builds enable it since .Net Native is required for the store. You can disable it for release builds in the Project.Properties Build pane, but you probably shouldn't. For production the runtime improvements are almost always worthwhile even if you're not deploying through the store, and for testing release mode you want to use the same optimizations that you'll release.

在此输入图像描述

We have a webforms app. 50 pages or so, about 300,000 LOC and it was getting slow to compile (about 1 minute on our Surface Pro 4 16GB I7 machines). We flipped the setting for the build to "Build Page" instead of "Build Website" so instead of compiling the whole site, only the page is compiled. This makes compiling very fast. Of course, you'll want to flip the setting back to "Build Website" before checking in or deploying.

财产页面

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM