Where to obtain Visual C++ Express runtime dlls - visual-studio-2010

I want to distribute msvcr100.dll and msvcp100.dll in the application local folder along with my .exe I don't want to use the vcredist_x86.exe installer, static linking or a msm merge module.
Where can I find the correct versions of these files? VC++ Express doesn't have a \Program Files\Microsoft Visual Studio 10.0\VC\redist\x86\ folder as described on msdn. I'm concerned about trying to take them from \Windows\System32 in case they're the wrong version or its somehow not correct.

Related

How to get Visual Studio 2008 to Program Files? (64-bit)

So I'm following the instructions to install MPIR (bigger integers library), which i chose before GMP, because of more information being availible on Windows download and just easier installation for typical user. Basically I found this simple tutorial: http://www.exploringbinary.com/how-to-install-and-run-gmp-on-windows-using-mpir/
The only thing I've done different from this tutorial is my Visual Studio 9.0 being stored in Program Files (x86) and when I then proceed to open Visual Studio 2008, it can't find any projects in my solution 'mpir'.
And so I need not to compromise the steps stated in the tutorial (must have Visual Studio in the exact directory) and then see how things will work out.
This is my current Visual Studio 2008 (Express Edition All-in-One DVD ISO) download: https://go.microsoft.com/fwlink/?LinkId=104679 , which i then open using WinRAR and run the setup aplication that allows me to choose from four (C#, C++, Basic, Web Developer). I choose C++ and proceed to change the destination folder, which is set to Program Files (x86) to Program Files, but after the installation I always end up with Visual Studio being in Program Files (x86). (I can create a file with random name and Visual Studio installs in that file, also I can move Visual Studio from Program Files (x86) or random file to Program Files, but then Visual Studio won't be detected and I won't be able to open 'mpir.sln' in it.)

How to determine a lib or dll is built from which Visual Studio?

For c++ lib,
I am wondering if there is a way or tool to determine if a lib is for which version of visual studio.
I think different visual studio should use different version of lib. Some libraries does not specify and using the wrong visual studio will have compile/link error.

My installation of Visual Studio 2010 Express doesn’t include a “redist” folder

I am using Microsoft Visual Studio 2010 Express and I’m building an application that needs to bundle the redistributable msvcp100 and msvcr100 libraries. The sources I’ve seen say that I should pull these files directly out of
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\redist\x86\Microsoft.VC100.CRT
My system has a “VC” directory in the indicated location but no “redist” directory. Furthermore, I can’t find an “msvcp100.dll” anywhere in the “Microsoft Visual Studio 10.0” directory, but there is an “msvcr100.dll” in
Microsoft Visual Studio 10.0\Common7\Packages\Debugger\X64
Should these libraries exist in the first directory I mentioned? If so, any idea why they aren’t present? If not, where should I get them?
(My question is similar to this question, which didn’t receive a satisfactory answer.)
Legally if the DLLs don't exist in the redist folder then you don't have permission to redistribute them. They're a copyrighted work and Microsoft only gives you permission under the Microsoft Visual C++ 2010 Express licence agreement to redistribute code included with the software and listed in REDIST.TXT. The file Common7\Packages\Debugger\X64\mscvcr100.dll isn't listed in the REDIST.TXT file, so you don't have permission redistribute it. Same with any other DLL you find outside of the redist folder. If you download vcredist_x86.exe separately from Microsoft then the VC++ 2010 Express licence agreement doesn't apply to it at all, and so you're bound by the different and separate agreement included with it.
If you want to redistribute an application built with Visual C++ on a strong legal basis you have three options. The first is not to redistribute the DLLs and point your end users at Microsoft's website to download them if they don't already have them installed. The second is to upgrade to Visual C++ 2010 Professional which includes the redist directory. The third is to upgrade (or downgrade) to a version of Visual C++ Express that includes the redist directory.

Does the PlatformSDK folder in VS2010 ever get updated?

I've been battling error C2733 (second C linkage of overloaded function '_interlockedbittestandset' not allowed), and in doing some investigations, I've found what I believe to be the problem.
I have Visual Studio 2010 Professional installed on my system, along with SP1 and a number of hot-fixes, and I noticed that the PlatformSDK folder that came with the application is now down-level. The SDK that came with the application is located at:
Program Files (x86)\Microsoft Visual Studio 10.0\VC\PlatformSDK
As a result of installing SP1 and the various hot-fixes, I now also have this platform SDK available to me:
Program Files (x86)\Microsoft SDKs\Windows\v7.0A
The problem is that Visual Studio defaults all of the VC++ Directories to the former path, which results in the errors. If I manually change the include path to point to the newer location, the errors go away.
Were the Visual Studio 2010 SP1 installers supposed to update the PlatformSDK folder where Visual Studio is installed? Or is that always going to be down-level as updates are applied?
How do I force the VC++ Directories paths to be the same across all projects (since VS is defaulting to the wrong / outdated location)?

vcredist_x86.dll and version 8.0.50727.4053

Visual C++ 2005 I build on my system use CRT DLLs version 8.0.50727.4053. I believe it is the latest one and was automatically updated by Windows.
On user systems, this version of the DLL is not found. I have used vcredist_x86.exe in the past as a part of our installer to install runtime DLLs. It used to work.
My problem is that even the latest version of vcredist_x86.exe (
Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)) doesn't install this version of the DLL.
So which vcredist_x86.exe file do I need then ?
P.S. Would forcing my app to link to a specific version of the CRT solve the problem ? Is it a prefered method at all ?
Thanks,
Paul
UPDATE: There are other people who observe that vcredist_x86.exe (
Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)) doesn't install 8.0.50727.4053.
UPDATE2: At least one person suggests forcing using the previous version of CRT (http://tedwvc.wordpress.com/). This would however add a significant complexity to our projects.
Following the advice of JesperE, I found that there exists "Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update" which provides these distributables.
I think there's an important distinction for VS standard/professional users and VS Express users. For VC++ Standard, c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\ contains the 8.0.50727.4053 redistributable (after the security update is installed). There is no need to separately install an SDK, so (for instance), I don't even have a C:\Program Files\Microsoft SDKs\ directory on the machine with VC++ Standard installed.
When using VS 2005 Express, follow mikets' answer, and get the ATL security update version. I confirmed these fix the problem in my case.
Ok. I found the solution in an MS Forum:
If you installed the security update,
the 9.0.30729.4148 version of vcredist
should be in your Windows SDK folder,
typically C:\Program Files\Microsoft
SDKs\Windows\v6.0A\Bootstrapper\Packages\vcredist_x86
and C:\Program Files\Microsoft
SDKs\Windows\v6.0A\Bootstrapper\Packages\vcredist_x64.
Original thread
Microsoft release an update (google for KB971090) containing a security fix for the VC runtime. There is a corresponding update to the vcredist_x86.exe, but I don't have a link. If you have KB971090 installed, I think you should have an updated vcredist_x86.exe somewhere on your machine.
In practise (IIRC), it means that binaries built on machines which has KB971090 installed can only run on machines which have the corresponding updated VC runtimes, i.e. you need to ship and install the new vcredist_x86.exe on client machines.
I hope this could be a useful information:
The file you're looking for (2.0.50727.4053) has a size of 2.705.744 bytes (2.707.456 bytes on disk).
My understanding is that Microsoft hasn't released a vcredist_x86.exe for this version. They did, however, release Merge Modules with this version, so you should download them and include them in your installer. Now where do you get these is also a good question, but I somehow magically got them, probably through InstallShield update.
On my machine I found the 8.0.50727.4053 redistributable in \Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86
The one in \Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\vcredist_x86 was for VS2008.
-Greg
Note:
Installing the "Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update" mentioned by mikets above also may resolve the following problem:
Error 0xc0150004 upon starting devenv.exe (Visual Studio 2005) or reader_sl.exe (Autostart of Acrobat Reader).
Reason it fixes a corrupt installation of the above Assemblies. (Probably corrupted with an Windows update/service pack installation).
It looks like you can install a msm file directrly with the msiexec
see:
http://forums.winamp.com/showthread.php?s=&threadid=99668&highlight=msm

Resources