Yosem
Yosem

Reputation: 4765

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):

Upvotes: 4

Views: 8633

Answers (2)

George Beier
George Beier

Reputation: 256

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.

Property Page

Upvotes: 0

Rob Caplan - MSFT
Rob Caplan - MSFT

Reputation: 21919

.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.

enter image description here

Upvotes: 5

Related Questions