VC部署连接

Universal CRT deployment | Microsoft Docs

本篇连接

Introducing the Universal CRT | C++ Team Blog (microsoft.com)

March 3rd, 2015

In June of last year we published a pair of articles discussing the major changes that we had made to the Visual C++ C Runtime (CRT) for Visual Studio 2015. In “The Great C Runtime (CRT) Refactoring” we explained the major architectural changes that we had made to the CRT. In “C Runtime (CRT) Features, Fixes, and Breaking Changes in Visual Studio 14 CTP1” we enumerated all of the notable features we’d implemented and behavioral changes that we’d made.

We’ve received a lot of feedback from you, our customers, over the months since we wrote those articles and released the first Community Technology Preview (CTP) of Visual Studio 2015. We are especially appreciative about the many excellent bugs that you’ve reported on Microsoft Connect. While we haven’t made many changes to the CRT since that first CTP, we have indeed been hard at work on addressing your feedback, working on further improvements, and finishing up some longer-running projects. The recently-released Visual Studio 2015 CTP6 has all of these improvements that we’ve been working on. We’ll be discussing these changes in a pair of articles again: this article discusses the major architectural changes since the first CTP; a subsequent article will enumerate all of the new features, bug fixes, and breaking changes in greater detail.

In our articles last June, we explained how we had split the CRT into two logical parts: The VCRuntime, which contained the compiler support functionality required for things like process startup and exception handling, and a “stable” part that contained all of the purely library parts of the CRT, which we would service in-place in the future rather than releasing newly versioned DLLs with each major version of Visual Studio. At the time, this “stable” part took the form of two libraries: the AppCRT and the DesktopCRT (the release DLLs were named appcrt140.dll and desktopcrt140.dll).

The VCRuntime still exists in the same form and with equivalent contents as in previous CTPs. It’s in the “stable” part that we’ve made major changes in this latest CTP6. The AppCRT and DesktopCRT have been recombined into a single library, which we have named the Universal CRT. The new DLLs are named ucrtbase.dll (release) and ucrtbased.dll (debug); they do not include a version number because we’ll be servicing them in-place.

The Universal CRT is a component of the Windows operating system. It is included as a part of Windows 10, starting with the January Technical Preview, and it is available for older versions of the operating system via Windows Update.

Building Software using the Universal CRT

Previously, all of the CRT headers, sources, and libraries were distributed as part of the Visual C++ SDK, installed in the VC subdirectory of your Visual Studio installation (generally C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC). The files for the VCRuntime are still part of the Visual C++ SDK. The headers, sources, and libraries are now distributed as part of a separate Universal CRT SDK. This SDK is included with Visual Studio; it is installed by default to C:\Program Files (x86)\Windows Kits\10. The debug ucrtbased.dll is also included as part of this SDK and is installed to the system directory.

We have updated the Visual C++ MSBuild props and targets files to add the new Universal CRT directories to the include and library paths. If you create a new project in Visual Studio 2015 or upgrade an existing project to Visual Studio 2015, it should generally pick up these new directories automatically. If you upgrade a project that does not use the Visual C++ MSBuild props and targets files or that does not inherit the default include and library paths from those props and targets files, you’ll need to update your project manually to include the new directories. You can use the following MSBuild properties to find the Universal CRT SDK files:

    $(UniversalCRT_IncludePath)$(UniversalCRT_LibraryPath_x86)$(UniversalCRT_LibraryPath_x64)$(UniversalCRT_LibraryPath_arm)

So long as you do not link with the /nodefaultlib option, all of the correct library files will be found when you link your project. If you link with the /nodefaultlib option, you will need to link several extra libraries when you link. For example, whereas you previously might have just linked msvcrt.lib in order to use the CRT DLL, you will now also need to link vcruntime.lib and ucrt.lib. Here is a table that shows which libraries you will need to link for each “flavor” of the libraries:

    Release DLLs   (/MD ): msvcrt.lib   vcruntime.lib      ucrt.libDebug DLLs     (/MDd): msvcrtd.lib  vcruntimed.lib     ucrtd.libRelease Static (/MT ): libcmt.lib   libvcruntime.lib   libucrt.libDebug Static   (/MTd): libcmtd.lib  libvcruntimed.lib  libucrtd.lib

Distributing Software that uses the Universal CRT

In the past, you might have used one of the many ways described in “Deployment in Visual C++” to redistribute the Visual C++ libraries along with your software. For all Visual C++ libraries except the Universal CRT, there is no change in the way deployment can be done. Whatever mode of deployment (central, local or static linking) was used earlier can still be used.

However, with the above mentioned change to move the Universal CRT into the Windows Operating System, there are a few note-worthy changes:

  1. The Universal CRT is a Windows operating system component. It is a part of Windows 10. For Windows versions prior to Windows 10, the Universal CRT is distributed via Windows Update. There are Windows Update MSU packages for Windows Vista through Windows 8.1. Currently these MSU packages are installed as part of the VCRedist installation. In a future build of Visual Studio 2015, these MSU packages will also be distributed separately as part of the Universal CRT SDK and made available for download on support.microsoft.com.

  2. If you build software designed for use on Windows operating systems where the Universal CRT is not guaranteed to be installed (i.e., Windows 8.1 and below), your software will need to depend on the above mentioned Windows Update packages to install the Universal CRT.

  3. If you currently use the VCRedist (our redistributable package files), then things will just work for you as they did before. The Visual Studio 2015 VCRedist package includes the above mentioned Windows Update packages, so simply installing the VCRedist will install both the Visual C++ libraries and the Universal CRT. This is our recommended deployment mechanism. On Windows XP, for which there is no Universal CRT Windows Update MSU, the VCRedist will deploy the Universal CRT itself.

  4. If you currently statically link the Visual C++ libraries, then things will continue to work just as they currently work for you.  We strongly recommend against static linking of the Visual C++ libraries, for both performance and serviceability reasons, but we recognize that there are some use cases that require static libraries and we will continue to support the static libraries for those reasons.

  5. There will not be a merge module for the Universal CRT. If you currently use the CRT merge modules and still want to deploy the Visual C++ libraries centrally, we recommend that you move to the above mentioned Windows Update package or to the VCRedist. Alternatively, you may choose to link statically to the Universal CRT and the Visual C++ libraries.

  6. Updated September 11, 2015:  App-local deployment of the Universal CRT is supported.  To obtain the binaries for app-local deployment, install the Windows Software Development Kit (SDK) for Windows 10.  The binaries will be installed to C:\Program Files (x86)\Windows Kits\10\Redist\ucrt.  You will need to copy all of the DLLs with your app (note that the set of DLLs are necessary is different on different versions of Windows, so you must include all of the DLLs in order for your program to run on all supported versions of Windows).  App-local deployment of the Universal CRT is not supported. The Universal CRT is a Windows operating system component. Eventually (long-term), the Universal CRT will always be present on every machine, just like other operating system components today. We realize that there are today existing operating system versions where this component is not present, and we recognize that you, our customers will need to support these operating systems for some time. We hope that using the Windows Update package or static linking will suffice. One of the primary goals in our effort to refactor the CRT for this release was to mitigate the runtime proliferation problem, where over time computers end up with a large number of copies of the runtime libraries.

As we mentioned previously, we’ve made many bug fixes and other improvements to the CRT since we introduced the refactored CRT last June in CTP1. Later this week we’ll have a second article that discusses these changes in greater detail. In the meantime, we’re very interested in your feedback about the new Universal CRT.

James McNellis and Raman Sharma
Visual C++ Libraries

Introducing the Universal CRT相关推荐

  1. Win7 Tortoise SVN安装异常--please install the universal crt first.You can .. windows-update(Kb2999226)

    一.问题:安装TortoiseSVN时报错:please install the universal crt first.You can install it via windows-update(K ...

  2. TortoiseSVN安装失败——Please install the universal CRT first

    我的系统是win8.1,但是安装TortoiseSVN1.12.x版本时,却提示:lease install the universal CRT first. 搜索网上,都是安装什么更行包,但是我下载 ...

  3. 下一代VC运行时库——Universal CRT

    前言 其实the Universal CRT(通用C运行时库)已经不能算是"下一代",因为它已经在前两年伴随着Visual Studio 2015和Windows10发布.但是由于 ...

  4. ucrt-通用CRT部署

    从 Visual Studio .NET 到 Visual Studio 2013,C++ 编译器和工具的每个主版本都包含一个新的独立版本的 Microsoft C 运行 (CRT) 库. CRT 的 ...

  5. c++ standard library_什么是C/C++的标准库?

    简要介绍编写C/C ++应用程序的领域,标准库的作用以及它是如何在各种操作系统中实现的. 做为一个从事C/C++多年的程序员,从一开始就让我感到疑惑的是其内部结构:我所使用的内核函数和类从何而来? 谁 ...

  6. 什么是 C 和 C ++ 标准库?

    我已经接触C++一段时间了,一开始就让我感到疑惑的是其内部结构:我所使用的内核函数和类从何而来? 谁发明了它们? 他们是打包在我系统中的某个地方吗? 是否存在一份官方的C ++手册?今天简要介绍编写C ...

  7. 计算机视觉论文-2021-06-16

    本专栏是计算机视觉方向论文收集积累,时间:2021年6月16日,来源:paper digest 欢迎关注原创公众号 [计算机视觉联盟],回复 [西瓜书手推笔记] 可获取我的机器学习纯手推笔记! 直达笔 ...

  8. Windows下搭配AirSim环境

    Windows下搭配AirSim环境 下载Epic Game平台 安装Visual Studio 2017(官网可以找到软件版本) 搭建 AirSim Build Unreal Project 创建虚 ...

  9. use ida6.8 + windbg on win10

    序 用ida6.8pro + windbgx64调试x64的pip.exe, 说找不到windbg. 我已经装了一个从csdn下载的windbgx64-v6.x. 找资料, 说要修改ida.cfg, ...

最新文章

  1. 计算机密码行业专题研究:网络安全最大弹性领域
  2. “人工智能之父”艾伦·图灵登上英国50英镑新钞
  3. FZU 2171(线段树的延迟标记)
  4. 【Python教程】 print 和return 的区别
  5. WebSocket 详解
  6. 启动activemq_浅谈ActiveMQ与使用
  7. 从零开始-小程序采坑记录
  8. 前世今生:蚂蚁金服自研数据库OceanBase的道路与思考
  9. chrome调试技巧
  10. layout里添加xml文件没有在R.java里生成ID
  11. ODBC数据源的配置方法
  12. 安装,激活(不更新升级)Navicat premium12.0.24(12.0.18)
  13. AI方向的实验室调研(截至18年,未更新)
  14. 阿里云Ubuntu系统部署K8s集群
  15. 关于背景图与图片的区别整理,项目实操
  16. PC是夕阳行业?你们图样图森破
  17. linux自定义以太网协议_如何压接自己的任意长度的自定义以太网电缆
  18. P5.JS绘制动态图形
  19. 计算机三级网络技术(选择高频考点)
  20. Git入门介绍-1-简单介绍

热门文章

  1. [UAV] 无人机仿真平台搭建
  2. 方差分析/卡方/fisher精确检验
  3. win XP实现自动登陆
  4. 有 1、2、3、4 四个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?
  5. 安装 python cuda
  6. c语言中的用户标识符是什么,C语言中用户标识符是什么?
  7. spring java 发送邮箱验证
  8. 设计了一款 IGBT单脉冲、双脉冲测试波形信号发生器
  9. 【安装】sublime text 3 汉化插件
  10. win10 内存溢出修复