Visual Studio 2015 构建需要很长时间 [英] visual studio 2015 build takes long time

查看:58
本文介绍了Visual Studio 2015 构建需要很长时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从 VS 2013 到 VS 2015,当我进行构建时,它需要 90 多秒左右.

我能做些什么来加快速度吗?(VS 2013 用了大约 10 秒).

另外,是什么原因?我确实看到它在构建过程中运行了一些额外的东西(我认为 2013 年没有做所有这些):

  • 开始 .NET Native 编译
  • 处理应用程序代码
  • 计算应用程序关闭并生成互操作代码
  • 编译互操作代码
  • 生成序列化代码
  • 清理未引用的代码
  • 运行本机编译器

解决方案

.Net native 会影响编译速度.

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.

这篇关于Visual Studio 2015 构建需要很长时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆