Visual Studio 2012 won't start - visual-studio-2012

I installed VS2012 Premium from our MSDN subscription and it was working fine the first couple of days but then I installed a few extensions I can't now start VS2012 and it gives the error:
Faulting application name: devenv.exe, version: 11.0.50727.1, time stamp: 0x5011ecaa
Faulting module name: ntdll.dll, version: 6.1.7601.17725, time stamp: 0x4ec49b8f
Exception code: 0xc0000374
Fault offset: 0x000ce6c3
Faulting process id: 0xee8
Faulting application start time: 0x01cd89bb777fc1dd
Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe
Faulting module path: C:\Windows\SysWOW64\ntdll.dll
I'm running it on Windows 7 64 bit.
I've tried to repair, uninstall and install again and nothing. I tried to restore to a previous restore system point but nothing.
The extensions I installed I can remember:
VS10x Code Map
VSCommands
Visual SVN
Nuget manager
(all the above my colleagues have it too and it works fine for them) and:
Web Essentials
Visual Studio Color Theme Editor
SlowCheetah
Mobile Ready HTML5
Questions are:
Anyone else has had this problem?
Is there a way I can uninstall extensions from a command line or software? (I removed the extensions folder but that doesn't do
anything)
Can I repair the "C:\Windows\SysWOW64\ntdll.dll"? Is it really a problem with this dll?
I haven't been able to find any similar issue in other versions and because VS2012 is new doesn't seem to be much information either.

It is working now!. This is what I did:
Following the suggestion here:
Removed the key: [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]. VS2012 loading but then crashing before I could do anything else (error in C:\Windows\syswow64\KERNELBASE.dll)
Then I removed:
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0]
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config]
and started again and is working fine.
I obviously lost all my settings but no big deal as I can now do some work! :)

Running devenv.exe with the /SafeMode argument would probably have also fixed it.

I opened a different .sln and then went back to my faulting project and it loaded! Maybe something with a faulty close-down of the project

Removing all VS settings is a bit harsh unless all visual studio instances crash immediately.
What probably happens when you encounter this is that Visual Studio opens the designer window that caused it to crash in the first place... this is often an extension, but it might also just be a bug in VS. For example: I sometimes experience this when working with LINQ-TO-SQL and have the database-schema designer open.
The easiest resolution is to simply remove the SUO file with the solution settings, and open the SLN. You can then do whatever you want, except go to the file with the issue- once you know what that file is, you can fix it (f.ex. in the case of a DBML by simply removing it and regenerating it)

Just copy all dte*.olb files, from C:\Program Files (X86)\Common
Files\Microsoft Shared\MSEnv to C:\Program Files X86\Microsoft Visual
Studio 9.0\Common7\IDE.
From https://mycodepad.wordpress.com/2013/12/07/visual-studio-2012-4-run-as-administrator-the-application-cannot-start-error/

Simply running as Administrator seemed to be enough to get it running for me, at least temporarily.

I had a similar ntdll.dll issue ... C++ updating SQL Server ...
I fixed it by using the SQL Server OBDC connection rather than the SQL Server Native Client 11.0
We're trying to see why as it is working for some updates and not others ... but it works all the time for reading.

All the above solutions didn't work for me, but this one work.
Copy dte*.olb from C:\Program Files (X86)\Common Files\Microsoft Shared\MSEnv to
C:\Program Files X86\Microsoft Visual Studio 9.0\Common7\IDE.
http://www.clausconrad.com/blog/the-application-cannot-start-running-visual-studio-as-administrator

First launch devenv.exe with the /SafeMode option, then Uncheck the Allow macros to run from "Enviroment->Add-in/Macros Security" and test!

The problem is due to path variable. setting path variable in Environmental variables to below 2048 characters worked for me.

Related

error cannot open file 'kernel32.lib'

I have installed VS2013 and VS2015 on Windows 7.
I have an existing C++ Dll project that was building fine but now all of a sudden it wont build using VS2015 and gives me the error:
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
From this post: fatal error LNK1104: cannot open file 'kernel32.lib' I went looking for the kernel32.lib file and it is located here:
C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86
When I go to my Projects Properties-->Linker-->Input and select Macros I see that this path is indeed there:
My Platform Toolset is set to Visual Studio 2013 - Windows XP (v120_xp) which is what it always has been set to.
Why has my Project all of a sudden stopped building? What could have gone wrong?
I had this similar problem today with Visual Studio 2013 when I changed my VC++ Directories:
Project->Properties->VC++ Directories:
Include Directories
If the cause is some plug-in/extension that changes your props files, it may in consequence change the "Visual C++ Directories" settings of your project.
So, the solution that worked for me is described on my own answer Can't compile 64 bits Visual Studio 2010 projects, which I fully transcribe to here:
After I asked a colleague for help, we noticed, that even getting
clean builds of the projects from TFS, with overwrite option, the
Project's Configuration Properties > VC++ Directories on my computer
were always different from other computers.
Searching more we found the solution on the last post of Reset
include/lib path, which I will fully transcribe:
use "del %HOMEPATH%\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props"
is not always the right way.
Better use "del %USERPROFILE%\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props"
where the application data folder is normally placed in.
Then I've looked inside the contents of Microsoft.Cpp.x64.user.props
and I've seen that there were things added by Visual Leaks Detector.
Which is reasonable, as one month before, I did a memory leak analysis
using VLD.
So, I deleted the file and now everything compiles fine at 64bits!
I had to install the Visual C++ for Desktop Development.
Open Visual Studio Installer and go to Installed tab. Click on the Change Button on your installed Visual Studio Community Edition. -> On the Workloads Tab there should be a option Desktop Development with C++. Activate that option and modify the changes.
Afterwards it was working for me.
I had the same problem today. As it turned out somehow the SDK 10.0.15063.0 got installed on my system but without the Desktop C++ files. Selecting the SDK in the list of installed programs, doing a change install and there selecting the Desktop C++ options added the necessary files and now I can link again.
I got this error fatal error lnk1104: cannot open file 'kernel32.lib'.
this error is getting because there is no path in VC++ directories.
To solve this probelem
open visual studio 2008
go to Tools-options-Projects and Solutions-VC++ directories-*
then at right corner select Library files
here you need to add path of kernel132.lib
In my case It is C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib
Thank you.
I had this following upgrade of some projects from VS2013 to VS2017.
Original project had a manual modification to the "Library Directories" item under VC++ Directories in the project settings.
This meant it did not pick up changes from the upgrade.
Using the option will reset this to something that works (assuming the SDK is installed OK) provided anything other than the default is not needed of course. In my case it was trying to point at the v7.1 SDK but that was not installed for vs2017.
in vs 2019, just run the installer, click modify, and then in the individual components tab, remove windows 10 SDK. then again run the installer and add windows 10 sdk!
I had this similar problem today with Visual Studio 2017. My cause turned out to be a bad environment setting in NETFXSDKDir, specifically:
NETFXSDKDir=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1
It needed to have a value of:
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\um\x86
I have a more detailed response here:
fatal error LNK1104: cannot open file 'kernel32.lib'
In VS 2022 I was trying to compile an old solution that originally ran in VS 2010 then in VS 2019. It continually gave me the "cannot find Kernel32.lib" error. I spent 8 hours trying everything, including everything on this page. What worked for me: Configuration Properties -> VC++ Directories -> Library Directories and "inherit from parent" (guessing this sets to defaults) fixed this for me. Also note: I'm using winsock and directinput.

IIS Express 10 (64 bit) errors when starting web project in Visual Studio 2015

Starting a web project in IIS Express 10 and Visual Studio 2015 results in the following error when running the 64 bit version of IIS Express but works fine with the 32 bit version.
Process with an Id of 9172 is not running.
These are the fixes I have tried, all have failed:
Rename/Delete the IISExpress folder under my documents.
Run Visual Studio as Administrator at all times.
Reboot...because turn it off and on again.
I checked the _CSRUN_DISABLE_WORKAROUNDS environment variable as indicated here but it was already set.
Repair IIS Express 10 in Programs and Features.
There already seems to be a Connect issue registered with Microsoft which is Active but this has been ongoing since VS 2010. I have also done some investigation.
Running C:\Program Files (x86)\IIS Express\iisexpress.exe, starts fine. This is presumably the 32 bit version.
Running C:\Program Files\IIS Express\iisexpress.exe (Which I assume is the 64 bit version) results in the following error:
Filename:
\?\C:\Windows\Microsoft.NET\Framework64\v4.0.30319\CONFIG\web.config
Line number: 519 Error: The configuration section
'microsoft.applicationServer' cannot be read because it is missing a
section declaration.
It seems that you have updated C:\Windows\Microsoft.NET\Framework\v4.0.30319\CONFIG\web.config but not updated C:\Windows\Microsoft.NET\Framework64\v4.0.30319\CONFIG\web.config. So, please compare the two files and sync them to solve the problem.
I had a similar problem - the key to solving it was to run iisexpress from the the command line and then look at the error. In my case it said the XML was malformed. I then tried to edit the web.config in XmlNotepad which told me exactly where the bad XML was. In this case - something had put a bad comment in the file - I removed it (IE, fixed the XML issue) and then iisexpress was able to run OK on the command line and in VS 2015.

VS 2012 not starting

I tried to start my Visual Studio 2012 Professional as every day.
Out of nothing, it will not start anymore.
Already googled around but can't find a solution that realy solves my problem.
If possible I would like not reinstallin Visual Studio completely.
Some facts I already figured out:
I did not install any new packages/updates since yesterday
It starts with devenv.exe /SafeMode
It does not start with devenv.exe /ResetSettings
Starting with devenv.exe /Log will fail, but it shows the following:
Could not load file or assembly 'Microsoft.VisualStudio.SmartDevice.ProjectSystem.Base.dll' or one of its dependencies. The system cannot find the file specified.
C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW......\PrivateAssemblies\Microsoft.VisualStudio.SmartDevice.ProjectSystem.Base.dll
The file mentioned is locally not existing. At my colleagues computer this file also not exists but Visual Studio is running normally.
I'm currently running sfc /scannnow in case any system-files are somehow corrupted. (Nothing found)
Any ideas what I can do next to find the issue?
Plugins/Extensions installed:
ReSharper 7
GitExtensions
Update:
Repairing ReSharper through Programs and Features seems to fix the problem. After restarting same error occurs

Visual Studio 2012 crashes after opening

A few days ago I opened VS2012 just like I do every day and after getting the page where you select the project to open, VS2012 crashed. Restarting the computer, getting all latest Windows updates and playing with registry values did not help at all. See below for answer on how to fix this issue.
It turns out the problem is Internet Explorer 11. It turns out that installing IE11 is what caused VS2012 to crash and be useless. This will fix the issue:
You need to re-register ieproxy.dll - after this VS2012 started to work again.
32 bit systems:
regsvr ieproxy.dll
64 bit systems:
regsvr32 ieproxy.dll
This worked like a charm for me:
FIRSTLY: To minimize the potential loss of your personal environment, you should consider creating a backup of your environment using the Export Settings wizard, and the Import Settings wizard to restore the settings if and when needed.
Delete the contents from the following folders:
C:\Users\..\AppData\Local\Microsoft\Team Foundation
C:\Users\..\AppData\Local\Microsoft\VisualStudio
C:\Users\..\AppData\Local\Microsoft\VSCommon
Go to the Visual Studio IDE folder in command prompt and Run the following command:
.\devenv.exe /resetuserdata from the Visual Studio IDE folder.
Typical location of Visual Studio IDE folder for 64 bit: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
Typical location of Visual Studio IDE folder for 32 bit: C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE
Reference: Microsoft's article- If you have problems with TFS or Visual Studio flush the user cache … or not?

Failure during conversion to COFF: file invalid or corrupt

When I try building just a simple program into VS2010, compiling succeeds yet when I try to build the solution it gives me this error:
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
What am I doing wrong?
I had this issue and I solved it with this thread
disable incremental linking, by going to
Project Properties
-> Configuration Properties
-> Linker (General)
-> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"
This issue occurred after Visual Studio 2012 installation.
The issue resolved by replacing the cvtres.exe from VS2010 with the one from VS2012.
Thank you to "social.msdn"!
I had this issue after installing dotnetframework4.5.
Open path below:
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin" ( in 64 bits machine)
or
"C:\Program Files\Microsoft Visual Studio 10.0\VC\bin" (in 32 bits machine)
In this path find file cvtres.exe and rename it to cvtres1.exe then compile your project again.
Had to install VS 2010 SP1 in order to get it to work again for myself. Lame microsoft.
Do you have Visual Studio 2012 installed as well? If so, 2012 stomps your 2010 IDE, possibly because of compatibility issues with .NET 4.5 and .NET 4.0.
See http://social.msdn.microsoft.com/Forums/da-DK/vssetup/thread/d10adba0-e082-494a-bb16-2bfc039faa80
I am using Visual Studio 2010.
This happened to me when I installed .NET 4.5.
Uninstall of .NET 4.5 and install of .NET 4.0 helped me and error messages disappeared.
If you have installed VS2012 as well, the old cvtres file will no longer work.
Try removing the file (I simply renamed):
C:\Program Files
(x86)\Microsoft Visual Studio 10.0\VC\BIN\cvtres.exe
You can also debug using the /VERBOSE linker option in order to get more information regarding the linker error. There you should see an error message that the invoke to cvtres fails.
In my case it was just caused because there was not enough space on the disk for cvtres.exe to write the files it had to.
The error was preceded by this line
CVTRES : fatal error CVT1106: cannot write to file

Resources