gpt4 book ai didi

c# - 了解 UWP IoT Core 应用的调试和发布版本之间的差异

转载 作者:行者123 更新时间:2023-11-30 15:15:32 32 4
gpt4 key购买 nike

我有一个针对 Win 16299 的 UWP 应用程序的解决方案。其中有 5 个项目。 3 个是测试项目、一个库和一个 UWP 应用程序。

在调试中,构建时间不到 20 秒。

5>Time Elapsed 00:00:10.04
========== Rebuild All: 5 succeeded, 0 failed, 0 skipped ==========

在发布中构建需要

5>Time Elapsed 00:04:01.13
========== Rebuild All: 5 succeeded, 0 failed, 0 skipped ==========

查看构建的详细输出,我可以看到这与“ native 编译”有关,而且它需要更多的计算,这也许不足为奇。

有哪些引用资料可以帮助我更好地了解差异?

最佳答案

Debug 和 Release 构建之间的主要区别是 Compile with .NET Native tool chainOptimize 代码在项目的 Build properties 选项卡中切换。

enter image description here

我在 learn.microsoft.com 上找到了这两篇文章:

  1. .NET Native and Compilation , 和
  2. Compiling Apps with .NET Native

这篇文章也很有用:.NET Native – What it means for Universal Windows Platform (UWP) developers这是它的引述。

How does .NET Native impact me and my app?

Your mileage likely will vary, but for most cases your app will start up faster, perform better, and consume fewer system resources.

  • Up to 60% performance improvement on cold startup times
  • Up to 40% performance improvement on warm startup times
  • Less memory consumption of your app when compiled natively
  • No dependencies on the desktop .NET Runtime installed on the system
  • Since your app is compiled natively, you get the performance benefits associated with native code (think C++ performance)
  • You can still take advantage of the industry-leading C# or VB programming languages, and the tools associated with them
  • You can continue to use the comprehensive and consistent programming model available with .NET– with extensive APIs to write business logic, built-in memory management, and exception handling.

关于c# - 了解 UWP IoT Core 应用的调试和发布版本之间的差异,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51940522/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com