Redistribute V + isul C + + files (Eng)
When deploying an application, you must also deploy the files required to support the application. If any of these files are provided by Microsoft, check if you are allowed to redistribute them.
Last updated
When deploying an application, you must also deploy the files required to support the application. If any of these files are provided by Microsoft, check if you are allowed to redistribute them.
Last updated
You will find a link to the Visual Studio license terms in the IDE. Use the "License Terms" link in the "About Microsoft Visual Studio" dialog box
Redistributable packages that can be installed using Visual Studio. In Visual Studio versions since 2017, these files are called vc_redist.arm64.exe, vc_redist.x64.exe, and vc_redist.x86.exe. In Visual Studio 2015, 2017, and 2019, they are also called vcredist_x86.exe, vcredist_x64.exe, and (only in 2015) vcredist_arm.exe. The easiest way to find redistributable files is to use the environment variables set in the developer command prompt. In Visual Studio 2022, redistributable files are located in the %VCINSTALLDIR%Redist\MSVC\v143 folder. In the latest version of Visual Studio 2019, you will find redistributable files in the %VCINSTALLDIR%Redist\MSVC\v142 folder. In Visual Studio 2017 and Visual Studio 2019, they are also located in %VCToolsRedistDir%. In Visual Studio 2015, these files are located in %VCINSTALLDIR%redist, where is the locale setting of the redistributable package. In Visual Studio 2022 and 2019, merge module files are part of an optional installable component named C++ Redistributable Package MSM in the Visual Studio installer. Merge modules are installed by default during the C++ installation process in Visual Studio 2017 and Visual Studio 2015. When installing in Visual Studio 2022, you will find redistributable package merge modules in %VCINSTALLDIR%Redist\MSVC\v143\MergeModules. In the latest version of Visual Studio 2019, redistributable package merge modules are located in %VCINSTALLDIR%Redist\MSVC\v142\MergeModules. In Visual Studio 2019 and Visual Studio 2017, they are also located in %VCToolsRedistDir%MergeModules. In Visual Studio 2015, they are located in Program Files [(x86)]\Common Files\Merge Modules.
If used, run the application as a prerequisite on the target system before installing it. We recommend that you use these packages in your deployment because of their ability to enable automatic updates for Visual C++ libraries. For an example of how to use these packages, see Walkthrough: Deploy a Visual C++ application using the Visual C++ Redistributable Component Pack. Each Visual C++ redistributable package checks for the presence of a newer version on your computer. If a newer version is found, the package will not be installed. In Visual Studio 2015 or later, the redistributable package displays an error message indicating that the installation failed. If you run the package with the /quiet flag, no error message is displayed. In either case, the Microsoft installer logs the error and returns the error result to the caller. In Visual Studio 2015 and later, you can avoid this error by checking that regedit has a newer version installed. The version number of the current installation is stored in the HKEY_LOCAL_MACHINE\ SOFTWARE\ Wow6432Node\ Microsoft\ VisualStudio\ 14.0\ VC\ Runtimes {x86 | x64 | arm64} entry. For Visual Studio 2015, 2017, 2019, and 2022, the version number is 14.0 because the latest redistributable packages are binary compatible with versions prior to 2015. This item is arm64, x86, or x64, depending on the version of vcredist installed on the platform. (Checking under the Wow6432Node sub-item is only required when using Regedit to view the version of the x86 package installed on the x64 platform.) The version number is stored in the REG_SZ string value Version and the Major, Minor, Bld, and RbldREG_DWORD values. To avoid errors during installation, the installation of redistributable packages must be skipped if the currently installed version is newer. Command-line options for redistributable packages Visual C++ Redistributable packages support multiple command-line options. The/?,/h, or /help options display a pop-up dialog box that lists the available options. You can specify /install install, /repair fix, or /uninstall uninstall a redistributable component. The/layout option copies the complete contents of a redistributable component to the current directory. By default, a redistributable component installs its contents and prompts the user for information and whether to restart after installation. You can specify the /passive option, which displays progress but does not require user interaction. You can also specify the /quiet option, which does not display any UI and does not require any user interaction. /norestart option disables any attempt to restart. By default, a log file is created in% TEMP%. You can log to a specific file using /log filename.txt. This example The x64 redistributable component will be installed. It shows the installation progress, but requires no user interaction and no restart:
Windows Command PromptCopy
Important Merge modules (.msm files) for Visual C++ Redistributable files are deprecated. We don't recommend you use them for application deployment. Instead, we recommend central deployment of the Visual C++ Redistributable package. Central deployment by a Redistributable package makes it possible for Microsoft to service runtime library files independently. And, an uninstall of your app can't affect other applications that also use central deployment. When you use a Redistributable package for central deployment, you aren't responsible for tracking and maintaining the runtime libraries. Otherwise, an update to the runtime library files requires you to update and redeploy your .msi installer. Your app could be vulnerable to bugs or security issues until you do. 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. For an example see Walkthrough: Deploying a Visual C++ application by using a setup project.
It's also possible to directly install the Redistributable DLLs in the application local folder. The application local folder is the folder that contains your executable application file. For servicing reasons, we don't recommend you use this installation location.
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. For more information, see Understanding the Dependencies of a Visual C++ Application.