0

I'm using Visual Studio 2012 Professional updated to SP5 under Windows 7 SP1 with latest updates. I needed Visual Studio 2015 for some time, installed then uninstalled it with standard uninstaller.

But today I needed to build Webkit for Windows, and its build script ran vswhere.exe and detected some parts from Visual Studio 2015 as "working" installation, so I needed "full" uninstall for VS2015, which I found here: https://github.com/Microsoft/VisualStudioUninstaller. I ran it once, and VS2015 disappeared from vswhere.exe output.

But now I have a problem: Every app I trying to compile with VS2012 gives "cl.exe terminated abnormally with code -1073741701".

I tried :

  • Reinstalled VS2012 with or without SP5 multiple times, including clean reinstall (uninstall main, uninstall dependencies, install again), still same error.
  • Tried to repair VS2012.
  • I tried to run C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cl.exe, it says "mspdb110.dll not found".
  • I copied Msobj110.dll, Mspdb110.dll, Mspdbcore.dll and Mspdbsrv.exe from C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE and added to the PATH C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE. Still same error.

If I switch project platform to x64, it compiles and runs without a problem. Only x86 compiler cannot run and gives the error above. Sometimes there is a popup in VS2012 that "cl.exe cannot run code 0xc000007b".

If I run C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat x86, I can run cl.exe and even compile working 32-bit apps, but inside Visual Studio 2012 IDE it fails to run cl.exe every time, no matter what I do.

Please help me to fix it.

I think maybe it's something to do with .NET Framework (I have 4.5, 4.6 and 4.7 installed) in the MSBuild folder. Maybe I need to reinstall .NET Framework SDK somehow? If possible, I want to avoid reinstalling OS.

EDIT: Started a bounty. Still have a same problem.

I tried to insert run cl.exe without parameters in "Run before build..." script, and it runs from there! But afterward the IDE runs cl.exe from .NET environment and gives:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(347,5): error MSB6006: "CL.exe" terminated error code -1073741701

If I select x64 platform, cl.exe runs everywhere perfectly fine. If I run vcvarsall.bat x86, I can run cl.exe and compile.

The only thing I need to fix is some path in environment which used for Win32 x86 build from Visual Studio 2012 IDE. I can reinstall .NET Framework or Visual Studio (tried it but anyway) or edit some MSBuild configurations. Please tell me where possible to fix. The only thing I cannot do is reinstall OS, as I have a lot of software and reinstall will take a LOT of time.

UPDATE: Tried to uninstall everything, including .NET Framework 4.5, 4.6, 4.7 and Microsoft SQL Server 2008, 2012. Then installed Visual Studio 2012 Professional RTM. After install on first run I opened test app and got same error as above... x64 version works. Same after installing SP5.

UPDATE2: Tried to bring files of Visual Studio 2012 and Windows SDK and msbuild from working Windows 7 SP1 virtual machine install. It doesn't fix an error, same problem. Also tried to replace cl.exe with dummy 32-bit app, still causes 0xc000007b every time I run build from IDE. Seems like when ran from IDE Visual Studio uses cl.exe 32-bit with some 64-bit DLL. But I don't know how to find it and how to fix.

0

The risk with uninstalling one Visual Studio version when several are installed, is to uninstall too much. Visual Studio versions can be installed side-by-side, but they may use common components.

It seems that this is what happened to you, and your efforts to fix it by copying DLLs and modifying the PATH have only added to the confusion. Currently I believe that your PATH and other environment variables cause the mix-up of 32-bit and 64-bit DLLs, unless you run vcvarsall.bat to reset them.

I do not think that I should offer more ideas for further patching of the situation, as it may only aggravate the problem and leave hidden time-bombs for the future.

This is the closest way for doing a clean install of Visual Studio and .Net that I can think of :

  • Clean-uninstall Visual Studio 2012 Professional using Revo Uninstaller freeware
  • Uninstall all .Net versions that you can from Control Panel > Programs and Features, as well as from Turn Windows feature on or off
  • Scrub all folders and the registry, manually or by running a cleaner such as CCleaner
  • Re-install the .Net version(s) while trying to minimize their number (normally you should only need the latest version)
  • Install Visual Studio 2012 Professional and update to SP5.

I cannot guarantee success, but this is how I would try to get a really clean installation and avoid reinstalling Windows.

I suggest taking as backup an image of the system disk, just in case, so you can go back to it. I recommend AOMEI Backupper Standard.

  • Thank You for answer. Unfortunately I tried my best to reinstall it all and .NET Framework too. Visual Studio installer doing pretty good and installs .NET Framework with all dependencies and all files. I think the only thing messed up is a path to mspdb110.dll. 32-bit cl.exe somehow tries to load 64-bit dll. There are exactly two mspdb110.dll on my PC, one in IDE folder(32 bit) another in amd64 folder(64-bit). Strange thing is it does it only when ran under IDE from msbuild. My idea is to make dummy cl.exe and check environment it uses. Still don't know where I can change path set by msbuild. – NoAngel Aug 24 '18 at 10:48
  • If you scrub everything real well, the PATH shouldn't be wrong. After total uninstall, verify that there is nothing left in the PATH (but CCleaner should detect that). – harrymc Aug 24 '18 at 10:51
  • OK, will try it later. Just want to see if there is some easier fix before uninstalling it all and scan. All this for one dll. If nothing will help, and CCleaner will do, +50 is Yours :). – NoAngel Aug 24 '18 at 11:00
  • 1
    I understand. Uninstalling or installing Visual Studio is a big pain and redoing it repeatedly is just abysmal. – harrymc Aug 24 '18 at 11:16
  • 1
    All in all, I don't think that you have managed to totally undo whatever caused the problem. Clean uninstall plus reinstall should have restored a healthy situation. If the problem was VS2015, perhaps reinstalling it and uninstalling using Revo might help this time for the above procedure to succeed. But all this is taking you many hours and days, so I start doubting whether I really should counsel the clean installation of Windows rather than spending this much time on manipulations that fail, even though this might also be time-consuming. – harrymc Aug 29 '18 at 6:05
0

Had the same issue with VS2015. In my case, deleting the following files from the project folder fixed the problem

\.vs\myProjectName\v14\.suo
\myProjectName.VC.db
\x64 (the whole x64 build output folder if there is one)
  • ...but only because that reset the VC target version of my project. Unfortunately, setting it back to the original version, the problem returned. – Philipp Preis Sep 5 '18 at 14:07
  • My issue is not about project settings. It occurs always on any new project, and on all projects too. There still can be a way to fix VS installation, but I see noone here knows how. – NoAngel Sep 6 '18 at 2:24

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.