- Распространение файлов Visual C++ Redistributing Visual C++ Files
- Распространяемые файлы и лицензирование Redistributable files and licensing
- Размещение распространяемых файлов Locate the redistributable files
- Установка распространяемых пакетов Install the redistributable packages
- Установка распространяемых модулей слияния Install the redistributable merge modules
- Установка отдельных распространяемых файлов Install individual redistributable files
- Потенциальные ошибки времени выполнения Potential run-time errors
- Связанные статьи Related articles
Распространение файлов Visual C++ Redistributing Visual C++ Files
Вы находитесь здесь, потому что ищете загрузку одного из файлов среды выполнения Visual C++? Are you here because you’re looking for a download of one of the Visual C++ Runtime files? Перейдите на веб-сайт Майкрософт и введите Visual C++ распространяемый пакет в поле поиска. Go to the Microsoft website and enter Visual C++ Redistributable in the search box. Скачайте и установите распространяемый пакет для архитектуры своего компьютера (например, x64, если у вас 64-разрядная версия Windows) и нужную версию Visual C++ (например, 2015). Download and install the redistributable package for the architecture of your computer (for example, x64 if you are running 64-bit Windows) and the version of Visual C++ (for example, 2015) that you need.
Распространяемые файлы и лицензирование Redistributable files and licensing
При развертывании приложения необходимо также развернуть файлы, поддерживающие это приложение. When you deploy an application, you must also deploy the files that are required to support it. Если какие – либо из этих файлов предоставляются корпорацией Майкрософт, проверьте, разрешено ли их распространение. If any of these files are provided by Microsoft, check whether you’re permitted to redistribute them. Ссылка на условия лицензии Visual Studio находится в интегрированной среде разработки. You’ll find a link to the Visual Studio license terms in the IDE. Используйте ссылку условия лицензии в диалоговом окне о Microsoft Visual Studio. Use the License terms link in the About Microsoft Visual Studio dialog box. Или загрузите соответствующие лицензионные соглашения и лицензии из каталога лицензийVisual Studio. Or, download the relevant EULAs and licenses from the Visual Studio License Directory.
Чтобы просмотреть список Redist, указанный в разделе «распространяемый код» условий лицензионного соглашения на использование программного обеспечения Microsoft Visual Studio 2019, ознакомьтесь с разделом файлы распространяемого кода для Microsoft Visual Studio 2019 To view the «REDIST list» that’s referenced in the «Distributable Code» section of the Visual Studio 2019 Microsoft Software License Terms, see Distributable Code Files for Microsoft Visual Studio 2019
Чтобы просмотреть список Redist, указанный в разделе «распространяемый код» условий лицензионного соглашения на использование программного обеспечения Microsoft Visual Studio 2017, ознакомьтесь с разделом файлы распространяемого кода для Microsoft Visual Studio 2017. To view the «REDIST list» that’s referenced in the «Distributable Code» section of the Visual Studio 2017 Microsoft Software License Terms, see Distributable Code Files for Microsoft Visual Studio 2017.
Чтобы просмотреть список Redist, указанный в разделе «распространяемый код» условий лицензионного соглашения на использование программного обеспечения Microsoft Visual Studio 2015, ознакомьтесь с разделом файлы распространяемого кода для Microsoft Visual Studio 2015. To view the «REDIST list» that’s referenced in the «Distributable Code» section of the Visual Studio 2015 Microsoft Software License Terms, see Distributable Code Files for Microsoft Visual Studio 2015.
Дополнительные сведения о распространяемых файлах см. в разделе Определение библиотек DLL для повторного распространения и примеров развертывания. For more information about redistributable files, see Determining which DLLs to redistribute and Deployment examples.
Размещение распространяемых файлов Locate the redistributable files
Для развертывания распространяемых файлов можно использовать распространяемые пакеты, установленные Visual Studio. To deploy redistributable files, you can use the redistributable packages installed by Visual Studio. В версиях Visual Studio, начиная с 2017, эти файлы называются vc_redist.arm64.exe , vc_redist.x64.exe и vc_redist.x86.exe . In versions of Visual Studio since 2017, these files are named vc_redist.arm64.exe , vc_redist.x64.exe , and vc_redist.x86.exe . В Visual Studio 2015, Visual Studio 2017 и Visual Studio 2019 они также доступны под именами vcredist_x86.exe , vcredist_x64.exe и vcredist_arm.exe (только для 2015). In Visual Studio 2015, Visual Studio 2017, and Visual Studio 2019, they’re also available under the names vcredist_x86.exe , vcredist_x64.exe , and vcredist_arm.exe (2015 only).
Самый простой способ размещения распространяемых файлов — использовать переменные среды, заданные в командной строке разработчика. The easiest way to locate the redistributable files is by using environment variables set in a developer command prompt. В последней версии Visual Studio 2019 вы найдете распространяемые файлы в %VCINSTALLDIR%Redist\MSVC\v142 папке. In the latest version of Visual Studio 2019, you’ll find the redistributable files in the %VCINSTALLDIR%Redist\MSVC\v142 folder. В Visual Studio 2017 и Visual Studio 2019 они также находятся в %VCToolsRedistDir% . In both Visual Studio 2017 and Visual Studio 2019, they’re also found in %VCToolsRedistDir% . В Visual Studio 2015 эти файлы можно найти в %VCINSTALLDIR%redist\ , где — это языковой стандарт распространяемых пакетов. In Visual Studio 2015, these files can be found in %VCINSTALLDIR%redist\ , where is the locale of the redistributable packages.
Другой вариант развертывания — использовать распространяемые модули слияния ( .msm файлы). Another deployment option is to use redistributable merge modules ( .msm files). В Visual Studio 2019 эти файлы являются частью необязательного устанавливаемого компонента с именем » распространяемый компонент C++ 2019 МСМС » в Visual Studio Installer. In Visual Studio 2019, these files are part of an optional installable component named C++ 2019 Redistributable MSMs in the Visual Studio Installer. Модули слияния устанавливаются по умолчанию в рамках установки C++ в Visual Studio 2017 и Visual Studio 2015. The merge modules are installed by default as part of a C++ install in Visual Studio 2017 and Visual Studio 2015. При установке в последней версии Visual Studio 2019 можно найти распространяемые модули слияния в %VCINSTALLDIR%Redist\MSVC\v142\MergeModules . When installed in the latest version of Visual Studio 2019, you’ll find the redistributable merge modules in %VCINSTALLDIR%Redist\MSVC\v142\MergeModules . В Visual Studio 2019 и Visual Studio 2017 они также находятся в %VCToolsRedistDir%MergeModules . In both Visual Studio 2019 and Visual Studio 2017, they’re also found in %VCToolsRedistDir%MergeModules . В Visual Studio 2015 они находятся в Program Files [(x86)]\Common Files\Merge Modules . In Visual Studio 2015, they’re found in Program Files [(x86)]\Common Files\Merge Modules .
Установка распространяемых пакетов Install the redistributable packages
Распространяемые пакеты Visual C++ позволяют устанавливать и регистрировать все библиотеки Visual C++. The Visual C++ Redistributable Packages install and register all Visual C++ libraries. Если вы используете его, запустите его в качестве необходимого компонента в целевой системе, прежде чем устанавливать приложение. If you use one, run it as a prerequisite on the target system before you install your application. Рекомендуется использовать эти пакеты для развертываний, поскольку они включают функцию автоматического обновления библиотек Visual C++. We recommend that you use these packages for your deployments because they enable automatic updating of the Visual C++ libraries. Пример использования этих пакетов см. в разделе Пошаговое руководство. Развертывание приложения Visual C++ с помощью распространяемого пакета Visual C++. For an example about how to use these packages, see Walkthrough: Deploying a Visual C++ Application By Using the Visual C++ Redistributable Package.
Каждый распространяемый пакет Visual C++ проверяет наличие более новой версии на компьютере. Each Visual C++ Redistributable Package checks for the existence of a more recent version on the machine. Если обнаружена более поздняя версия, пакет не будет установлен. If a more recent version is found, the package won’t get installed. Начиная с Visual Studio 2015, в распространяемых пакетах отображается сообщение о сбое установки. Starting in Visual Studio 2015, redistributable packages display an error message stating that setup failed. Если пакет выполняется с помощью /quiet флага, сообщение об ошибке не отображается. If a package is run by using the /quiet flag, no error message is displayed. В любом случае ошибка записывается установщиком Майкрософт, а результат ошибки возвращается вызывающему объекту. In either case, an error is logged by the Microsoft installer, and an error result is returned to the caller. Начиная с пакетов Visual Studio 2015 вы можете избежать этой ошибки, проверив реестр, чтобы узнать, установлена ли более новая версия. Starting in Visual Studio 2015 packages, you can avoid this error by checking the registry to find out if a more recent version is installed. Текущий номер установленной версии хранится в HKEY_LOCAL_MACHINE\SOFTWARE[\Wow6432Node]\Microsoft\VisualStudio\14.0\VC\Runtimes\
Установка распространяемых модулей слияния Install the redistributable merge modules
Распространяемые модули слияния должны быть добавлены в пакет установщик Windows (или аналогичный пакет установки), который используется для развертывания приложения. Redistributable merge modules must be included in the Windows Installer package (or similar installation package) that you use to deploy your application. Дополнительные сведения см. в разделе Распространение с использованием модулей слияния. For more information, see Redistributing By Using Merge Modules. Пример см. в разделе Пошаговое руководство. развертывание Visual C++ приложения с помощью проекта установки. For an example see Walkthrough: Deploying a Visual C++ Application By Using a Setup Project.
Установка отдельных распространяемых файлов Install individual redistributable files
Также можно напрямую установить распространяемые DLL-файлы в локальную папку приложения . It’s also possible to directly install the redistributable DLLs in the application local folder . Это папка, содержащая файл исполняемого приложения. That’s the folder that contains your executable application file. В целях обслуживания мы не рекомендуем использовать это расположение установки. For servicing reasons, we don’t recommend you use this installation location.
Потенциальные ошибки времени выполнения Potential run-time errors
Если Windows не удается найти одну из распространяемых библиотек DLL, необходимых для приложения, может отобразиться сообщение следующего вида: «не удалось запустить приложение, так как Библиотека DLL не найдена. If Windows can’t find one of the redistributable library DLLs required by your application, it may display a message similar to: «This application has failed to start because library .dll was not found. Переустановка приложения может устранить эту проблему. » Reinstalling the application may fix this problem.»
Чтобы устранить эту ошибку, убедитесь, что установщик приложения построен правильно. To resolve this kind of error, make sure your application installer builds correctly. Убедитесь, что распространяемые библиотеки правильно развернуты в целевой системе. Verify that the redistributable libraries get deployed correctly on the target system. Дополнительные сведения см. в разделе Основные сведения о зависимостях приложения Visual C++. For more information, see Understanding the Dependencies of a Visual C++ Application.
Связанные статьи Related articles
Распространение с помощью модулей слияния Redistributing By Using Merge Modules
Описывает использование Visual C++ распространяемых модулей слияния для установки библиотек среды выполнения Visual C++ в качестве общих библиотек DLL в %windir%\system32\ папке. Describes how to use Visual C++ redistributable merge modules to install the Visual C++ runtime libraries as shared DLLs in the %windir%\system32\ folder.
Распространение Visual C++ элементов управления ActiveX Redistributing Visual C++ ActiveX Controls
Описание процедуры повторного распространения приложения, которое использует элементы управления ActiveX. Describes how to redistribute an application that uses ActiveX Controls.
Распространение библиотеки MFC Redistributing the MFC Library
Описание процедуры повторного распространения приложения, которое использует MFC. Describes how to redistribute an application that uses MFC.
Распространение приложения ATL Redistributing an ATL application
Описание способа распространения приложения, которое использует ATL. Describes how to redistribute an application that uses ATL. Начиная с Visual Studio 2012, распространяемая библиотека для ATL не требуется. Starting in Visual Studio 2012, no redistributable library for ATL is required.
Примеры развертывания Deployment Examples
Ссылки на примеры, демонстрирующие развертывание приложений Visual C++. Links to examples that demonstrate how to deploy Visual C++ applications.
Развертывание классических приложений Deploying Desktop Applications
Представлены технологии развертывания Visual C++ и связанные понятия. Introduces Visual C++ deployment concepts and technologies.