- Remove From My Forums
-
Question
-
Hi ,
We would like to move to VS 2012 version when it is released. So I thought I woud try the RC version. But our development machines are still Windows XP. But as per this URL
http://www.unlockwindows.com/visual-studio-11-beta-system-requirements/ , the system requirements
for XP is Windows 7 or 8.Is there any way work-around for this?Appreciate your help.
Regards,
Jaleel
Answers
-
Hello Jaleel,
Thanks for your post. And based on this
Microsoft official site, the following operating systems are supported of VS2012 RC:•Windows 7 (x86 and x64)
•Windows 8 Release Preview (x86 and x64)
•Windows Server 2008 R2 (x64)
•Windows Server 2012 RC (x64)So I am afraid you can’t install VS2012 RC on the Windows XP machines.
Thanks.
Vicky Song [MSFT]
MSDN Community Support | Feedback to us
-
Marked as answer by
Tuesday, June 26, 2012 9:14 AM
-
Marked as answer by
EDIT (April 14, 2013): If you’re having trouble with Microsoft’s XP support after installing Visual Studio 2012 Update 2 then please ignore this blog post! Read the new blog post instead.
EDIT (November 26, 2012): Microsoft has made their final release of Visual Studio 2012 Update 1 available which includes official XP targeting support!
EDIT (October 14, 2012): Microsoft has released their CTP of the XP targeting support, negating any further need for these wrappers. Please use the official Microsoft solution from now on.
EDIT (June 20, 2012): Microsoft has announced XP targeting support will be added to Visual C++ 2012 in a post-RTM update. Read the details here. In the meantime you can use the below as a temporary workaround until the update has been released.
Source files and sample projects for this article located at: https://skydrive.live.com/?cid=1b361bf333e9ab82
Files last updated: 2012-07-10
XPSupport wrappers version 1.10
One of the major limitations of Visual C++ 2012 is that it does not create applications that can run on Windows XP. As most of you already know, there is a connect item at Microsoft on this. See: http://connect.microsoft.com/VisualStudio/feedback/details/690617
Note that the connect item was closed as “by design” and it was stated that only Vista SP2 and above is supported. So this leaves out XP and Server 2003.
As you can see from the comments, many users simply will not adopt VC 11 because of its lack of XP targeting support. Whether the Visual Studio 11 tools run on XP is a whole other story. I don’t need the IDE to run on XP. What I need is the ability to use VC 11 (and all of its powerful new language features) AND still be able to target XP as a platform to deploy my apps to.
If you’re a long time reader of my blog, you know that I have written another article in the past on how to target Windows 2000 when using Visual Studio 2010. In that article I explained that there is a simple trick that we can use to “wrap” missing API functions. This involves making a small assembly language forwarding directive that calls our own C++ wrapper function. If we use this trick we can substitute our own versions of any API symbol that is linked into our app, without causing any multiple symbol errors in the linker. This means we do not have to use /FORCE:MULTIPLE.
To summarize, if we run dependency walker (available from www.dependencywalker.com) on a built executable that uses CRT and/or MFC 11 on Windows XP SP3, we’ll see a bunch of “red” icons beside the functions that are missing on XP (mostly in kernel32.dll). Our goal is to get rid of all of this red before it will run correctly on XP.
An aside: If it were truly a technical limitation to drop XP, then it would be impossible for us to “wrap” every instance of these functions without touching the original CRT and/or MFC static lib source code. I’m about to show you a simple, elegant way to give your VC 11 apps the gift of XP support, while allowing the exact same binary to run on higher versions as well (e.g Vista, 7, Server 2008, etc)
There is another new roadblock that Microsoft has put in our way. Previous to VC 11, we could override both the minimum operating system and subsystem version numbers using a linker command line option. However in VC 11, they only allow specification of 6.0 (Vista) as a minimum. That means there is NO way to write the necessary operating and subsystem versions to the built binary without a separate post-build tool.
Turns out that writing the operating system and subsystem version numbers can be acheived using EDITBIN.EXE (a tool that is included with VC11) This means we can use this as post-build step just after linking occurs.
All that needs to be done is to run editbin.exe on the built executable itself, e.g.
EDITBIN.EXE testapp.exe /SUBSYSTEM:WINDOWS,5.01 /OSVERSION:5.1
It still throws a warning that the subsystem supplied is invalid but writes it anyway (unlike linking which refuses to write it when it’s invalid).
Note: if you’re trying these instructions with a console application, use
EDITBIN.EXE testapp.exe /SUBSYSTEM:CONSOLE,5.01 /OSVERSION:5.1
instead.
Notice that in the title of this blog post, I say “statically linked”. There is good reason for that. Microsoft no longer provides makefiles for their DLLs (since VC2010). The last version to provide makefiles was VC2008. That is unfortunate, as I could have provided a way to make dynamically linked apps run on XP as well. But for now, we’ll have to do with a solution for statically linked apps only. I suggest you put pressure on Microsoft using the avenue of your choice to have them make available steps or makefiles that will allow us to rebuild the CRT and MFC DLLs. If they agree, then I can provide a follow-up to this blog entry.
So, without further ado, here they are, two walkthroughs on how to create either a CRT or MFC statically linked app in Visual Studio 2012 that runs on Windows XP (resulting executable tested on a Windows XP SP3 machine that has been updated using Microsoft (Windows) Update with the various security fixes. This has not been tested on Windows XP x64 edition, and I don’t expect to be adding support for it as it’s a relatively underused operating system.
Simplified 4 step summary of solution:
(1) Add assembly language support to your existing project
(2) Add 4 files that I wrote that “wrap” the missing CRT and MFC functions (downloadable from my skydrive). You only need 2 of these files if your app is not using MFC.
(3) Add a post-build event that runs EDITBIN.EXE to set the operating system and subsystem versions of your built app.
(4) Build your app, copy to XP and run it
That’s it. No complicated source code changes. You simply need to add some wrapper code to your app and then use a tool to change a binary after it’s built.
In all cases, the wrapper code defers to the OS versions of the APIs (using GetProcAddress) when running on operating systems higher than XP/2003, and on XP/2003 uses either specific wrapper code (when needed) or appropriate return codes that allow the calling functions to continue.
Here’s a walkthrough that describes each of the above steps in detail (I’ve provided both CRT and MFC versions of the walkthrough, choose one or the other depending on whether your app uses MFC or not).
Grab the 3 zip files here first: https://skydrive.live.com/?cid=1b361bf333e9ab82
The first two zip files testapp.zip and testmfcapp.zip are complete examples of CRT and MFC apps respectively. Both of them contain the custom build step with editbin.exe that I mentioned and the changes mentioned in the walkthrough already applied. The third, xpsupport.zip contain the 4 files required (only need 2 files if CRT project) to add to an existing project that you may have (or use them with newly created projects when going through the walkthroughs below)
IMPORTANT NOTE: if you use these wrappers with your existing projects, you must change both your WINVER and _WIN32_WINNT to 0x0600
in your stdafx.h files. Otherwise a lot of Vista and later specific structures and defines that I use will not compile correctly. I may fix this in a future release.
CRT (Win32 or console app) version of walkthrough:
1) Launch Visual Studio 11 Beta (could be named Visual Studio 2012 if this article being read after the RTM was released)
2) Create a Win32 app (Win32 Project), or console app, call it testapp, keep all the defaults and click finish (note: if you decide to create a console app in this step, please add an include for “windows.h” to your generated project’s stdafx.h file)
3) Right click on the project in solution explorer (not the solution, but the project – usually the second line from the top in the solution explorer view) and choose “Build Customizations…” menu item.
4) Click the checkbox (on) beside “MASM (.targets,.props), and hit OK.
5) Right click on the project and choose “Properties” menu item to bring up project properties
6) choose “release” configuration
7) change this project to statically link to the CRT (change to Release version of project, then using project properties – configuration properties – C/C++ – code generation: change runtime library to multithreaded (instead of multithreaded DLL),
choose “debug” then do the same in Debug as in step 7 (except change to multi-threaded Debug)
9) Choose “all configurations”
10) Choose Configuration Properties – Build Events – Post Build Event
11) If your app is a Win32 app add the following two steps to the “Command Line” section of the Post Build Event:
ping 127.0.0.1 -n 3 -w 1000
editbin.exe "$(TargetPath)" /SUBSYSTEM:WINDOWS,5.01 /OSVERSION:5.1
otherwise, if your app is a console app, then add the following two steps instead to the “Command Line” section of the Post Build Event:
ping 127.0.0.1 -n 3 -w 1000
editbin.exe "$(TargetPath)" /SUBSYSTEM:CONSOLE,5.01 /OSVERSION:5.1
12) Hit OK
13) Get the xpsupport.zip file from my skydrive and extract 2 of the 4 files (xpcrt.cpp, xpcrtwrap.asm ) to the folder where your source code is ( stdafx.cpp, etc), e.g. at
c:users<user>DocumentsVisual Studio 11Projectstestapptestapp
14) Right click on Source Files folder, and choose Add – Existing Item
15) add the 2 files that you copied in step 13: xpcrt.cpp and xpcrtwrap.asm to your project
16) Build your application. The 2 files you added in step 15 should have compiled correctly, and the version should have been set by editbin.exe.
17) head over to a Windows XP SP3 machine (or VM) and copy your debug/release folder over there, and try running the app. If all steps above were performed correctly, you now have your first Win32 CRT 2012 app running on Windows XP SP3.
MFC version of walkthrough:
1) Launch Visual Studio 11 Beta (or Visual Studio 2012 if this article being read after the RTM was released)
2) Create an MFC app, call it testmfcapp, keep all the defaults except choose to use MFC in a static library and hit Finish
3) Right click on the project in solution explorer (not the solution, but the project – usually the second line from the top in the solution explorer view) and choose “Build Customizations…” menu item.
4) Click the checkbox (on) beside “MASM (.targets,.props), and hit OK.
5) Right click on the project and choose “Properties” menu item to bring up project properties
6) Choose “all configurations”
7) Choose Configuration Properties – Build Events – Post Build Event
Add the following two steps to the “Command Line” section of the Post Build Event:
ping 127.0.0.1 -n 3 -w 1000
editbin.exe "$(TargetPath)" /SUBSYSTEM:WINDOWS,5.01 /OSVERSION:5.1
9) Hit OK
10) Get the xpsupport.zip file from my skydrive and extract the 4 files (xpcrt.cpp, xpcrtwrap.asm, xpmfc.cpp, and xpmfcwrap.asm ) to the folder where your source code is ( stdafx.cpp, etc), e.g. at
c:users<user>DocumentsVisual Studio 11Projectstestmfcapptestmfcapp
11) Right click on Source Files folder, and choose Add – Existing Item
12) add all 4 files that you copied in step 10: xpcrt.cpp, xpcrtwrap.asm, xpmfc.cpp, and xpmfcwrap.asm to your project
13) Build your application. The 4 files you added in step 12 should have compiled correctly, and the version should have been set by editbin.exe.
14) head over to a Windows XP SP3 machine (or VM) and copy your debug/release folder over there, and try running the app. If all steps above were performed correctly, you now have your first MFC 2012 app running on Windows XP SP3.
Technical details of solution:
I’ve added comments to the code that describe the various wrapper functions that I had to write. Several in particular I’d like to bring to your attention:
(1) Wrapper for GetTickCount64 uses some undocumented but well established Windows structures – please read over the definition of that function in the source code (xpcrt.cpp) for further comments about this.
(2) Wrapper for Locale name based APIs uses a DLL (nlsdl.dll) that ships with Internet Explorer 7 and above, or is available from Microsoft as a redistributable (see code comments for location and discussion of an alternative that does not require use of nlsdl.dll). So basically if you can guarantee that IE7 or later or the nlsdl redist is installed on the XP SP3 machine, you can use this solution without any modifications whatsoever.
Troubleshooting:
If you get the error: “Not a valid win32 application”, then the editbin.exe step failed during your build. Please check to make sure the two steps mentioned (the ping and the editbin.exe are separate lines in the command line – click “edit…” when adding them)
If you get any errors that entry points cannot be found, then you’ve probably forgotten a step above or have called a Vista function that I haven’t wrapped. It’s also possible that you inadvertently added the asm files to your project before you did the “Build Customizations” step. Build customizations must be done before ANY assembly files are added, or they won’t be compiled.
Comments/questions welcome. And keep voting on the Microsoft connect item (link above)
XPSupport wrappers – Update History
1.00 2012-03-11 Initial Release
1.01 2012-03-13 added msvcp110 stuff (InitializeCriticalSectionEx, CreateSymbolicLink(A/W)
1.02 2012-03-15 added DwmExtendFrameIntoClientArea
1.03 2012-03-15 added fix for ConCRT runtime resource manager initialization (so std::thread can now be used)
1.04 2012-03-16 added PSGetPropertyDescriptionListFromString
1.05 2012-03-29 added wrapper for EnumSystemLocalesEx
website update: 2012-03-30 updated steps to use editbin.exe to set versions instead of a custom executable (to avoid needing a special EXE to set the version)
1.06 2012-05-05 added wrapper for GetLogicalProcessorInformation (for XP SP2 support – thanks Michael Chourdakis for this implementation)
1.07 2012-05-18 added wrapper for InitOnceExecuteOnce
1.08 2012-05-26 added x64 support – thanks to Antony Vennard (https://vennard.org.uk) for testing and correcting several errors in my initial test x64 release
1.09 2012-05-27 fixed non-Unicode (MBCS) builds and updated instructions to clarify usage with console apps (thanks to Latency and Antony for suggesting and helping with these fixes)
1.10 2012-07-10 added support for more recent builds of Visual Studio 2012 (CRT uses several API functions related to thread pooling) and updated source code to include a standard MIT license
title | description | ms.date | helpviewer_keywords | author | ms.author | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Latest supported Visual C++ Redistributable downloads |
This article lists the download links for the latest versions of Visual C++ Redistributable packages. |
01/13/2023 |
|
MahmoudGSaleh |
msaleh |
Microsoft Visual C++ Redistributable latest supported downloads
The Visual C++ Redistributable installs Microsoft C and C++ (MSVC) runtime libraries. These libraries are required by many applications built by using Microsoft C and C++ tools. If your app uses those libraries, a Microsoft Visual C++ Redistributable package must be installed on the target system before you install your app. The Redistributable package architecture must match your app’s target architecture. The Redistributable version must be at least as recent as the MSVC build toolset used to build your app. We recommend you use the latest Redistributable available for your version of Visual Studio, with some exceptions noted later in this article.
For details on how to install and redistribute Visual Studio components, see Redistributing Visual C++ Files.
Visual Studio 2015, 2017, 2019, and 2022
This table lists the latest supported English (en-US) Microsoft Visual C++ Redistributable packages for Visual Studio 2015, 2017, 2019, and 2022. The latest supported version has the most recent implemented C++ features, security, reliability, and performance improvements. It also includes the latest C++ standard language and library standards conformance updates. We recommend you install this version for all applications created using Visual Studio 2015, 2017, 2019, or 2022.
Architecture | Link | Notes |
---|---|---|
ARM64 | https://aka.ms/vs/17/release/vc_redist.arm64.exe | Permalink for latest supported ARM64 version |
X86 | https://aka.ms/vs/17/release/vc_redist.x86.exe | Permalink for latest supported x86 version |
X64 | https://aka.ms/vs/17/release/vc_redist.x64.exe | Permalink for latest supported x64 version. The X64 Redistributable package contains both ARM64 and X64 binaries. This package makes it easy to install required Visual C++ ARM64 binaries when the X64 Redistributable is installed on an ARM64 device. |
Download other languages and versions, including versions for long term servicing release channels (LTSC), from my.visualstudio.com.
[!NOTE]
Some of the downloads that are mentioned in this article are currently available on my.visualstudio.com. Make sure to log in by using a Visual Studio Subscription account so that you can access the download links. If you’re asked for credentials, use your existing Visual Studio subscription account. Or, create a free account by selecting the link in No account? Create one!
Notes
-
Visual Studio versions since Visual Studio 2015 share the same Redistributable files. For example, any apps built by the Visual Studio 2015, 2017, 2019, or 2022 toolsets can use the latest Microsoft Visual C++ Redistributable. However, the version of the Microsoft Visual C++ Redistributable installed on the machine must be the same or higher than the version of the Visual C++ toolset used to create your application. For more information about which version of the Redistributable to install, see Determining which DLLs to redistribute. For more information about binary compatibility, see C++ binary compatibility between Visual Studio versions.
-
Windows XP Support: Microsoft ended support for Windows XP on April 8, 2014. Current versions of the Visual C++ Redistributable for Visual Studio 2015-2022 only support Windows Vista, 7, 8.1, 10, and 11. The last version of the Visual C++ Redistributable that works on Windows XP shipped in Visual Studio 2019 version 16.7 (file versions starting with 14.27). The Redistributable is available in the my.visualstudio.com Downloads section as Visual C++ Redistributable for Visual Studio 2019 (version 16.7). Use the Search box to find this version. To download the files, select the platform and language you need, and then choose the Download button.
-
The Visual C++ Redistributable supports several command-line options. For more information, see Command-line options for the Redistributable packages.
Visual Studio 2013 (VC++ 12.0)
These links download the latest supported en-US Microsoft Visual C++ Redistributable packages for Visual Studio 2013.
You can download other versions and languages from Update for Visual C++ 2013 Redistributable Package or from my.visualstudio.com.
Architecture | Version | Link |
---|---|---|
X86 | 12.0.40664.0 | vcredist_x86.exe |
X64 | 12.0.40664.0 | vcredist_x64.exe |
Other versions
- Multibyte MFC Library for Visual Studio 2013. This MFC add-on for Visual Studio 2013 contains the multibyte character set (MBCS) version of the Microsoft Foundation Class (MFC) Library.
- Visual C++ 2013 Runtime for Sideloaded Windows 8.1 apps. For more information, see C++ Runtime for Sideloaded Windows 8.1 apps on the C++ Team Blog.
Visual Studio 2012 (VC++ 11.0) Update 4
These links download the latest supported en-US Microsoft Visual C++ Redistributable packages for Visual Studio 2012 Update 4. You can download other versions and languages from Microsoft Visual C++ Redistributable Packages for Visual Studio 2012 Update 4 or from my.visualstudio.com.
Architecture | Version | Link |
---|---|---|
X86 | 11.0.61030.0 | en_visual_cpp_redistributable_for_visual_studio_2012_update_4_x86_3161523.exe |
X64 | 11.0.61030.0 | en_visual_cpp_redistributable_for_visual_studio_2012_update_4_x64_3161523.exe |
Visual Studio 2010 (VC++ 10.0) SP1 (no longer supported)
[!NOTE]
Visual Studio 2010 Service Pack 1 reached end of extended support on July 14, 2020
Architecture | Version | Link |
---|---|---|
X86 | 10.0.40219.325 | vcredist_x86.exe |
X64 | 10.0.40219.325 | vcredist_x64.exe |
Download Redistributable files for other languages and architectures from:
- Microsoft Visual C++ 2010 SP1 Redistributable Package MFC Security Update
Visual Studio 2008 (VC++ 9.0) SP1 (no longer supported)
[!NOTE]
Visual Studio 2008 Service Pack 1 reached end of extended support on April 10, 2018
Architecture | Version | Link |
---|---|---|
X86 | 9.0.30729.5677 | vcredist_x86.exe |
X64 | 9.0.30729.5677 | vcredist_x64.exe |
Download Redistributable files for other languages and architectures from:
- Microsoft Visual C++ 2008 Service Pack 1 Redistributable Package MFC Security Update
Visual Studio 2005 (VC++ 8.0) SP1 (no longer supported)
[!NOTE]
Visual Studio 2005 reached end of extended support on April 12, 2016
- Redistributable files for X86, X64, and IA64 architectures are available from Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update.
Сообщение от -=ЮрА=-
Убежденный, ещё раз, я не хочу ругаться но некоторые точки над и надо расставить.
Ну так я же предлагаю не ругаться, а определиться в отношении одного-единственного вопроса:
Сообщение от -=ЮрА=-
2-й NET шёл во всех последних сервис packs ХР
Я привел ссылку из официального источника со списком исправлений, включенных в третий
сервис-пак для Windows XP. .NET Framework 2.0 среди них отсутствует. Это также легко
проверяется эмпирически: берем несколько разных дистрибутивов с XP SP2/3 Home/Pro,
устанавливаем и запускаем на них приложение, собранное под второй дот-нет.
Получаем 0xC0000135 (dll не найдена). Либо, что более правильно, ищем раздел реестра
HKEY_LOCAL_MACHINESoftwareMicrosoftNET Framework SetupNDPv2.0.50727
Что характерно, ни на одной из известных мне сборок Windows XP сразу после установки или
после накатывания SP3 этого ключа нет. А с Windows XP я работаю достаточно давно,
практически с момента ее выхода, у меня и сейчас на виртуалках три тестовые сборки XP
разных редакций (SP2, SP3, XP-64), так что любые подобные предположения очень быстро
доказываются или опровергаются.
Вот и вторая ссылка, содержащая список исправлений для Windows XP после SP3, по
состоянию на сентябрь 2012:
http://blogs.technet.com/b/yon… p-sp3.aspx
Как нетрудно заметить, .NET Framework 2.0 нет и в этом списке.
Вот еще, для полноты картины. Здесь утверждается, что .NET Fx (1.0 или 1.1) предустановлен
только в редакциях Media Center и Tablet PC:
http://blogs.msdn.com/b/astebn… he-os.aspx
Есть желание спорить — жду ответных ссылок на авторитетные источники. Иначе разговор ни о чем.