VS 2012 not starting - visual-studio-2012

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

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.

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?

Duplicate Menu Items VS 2012

anyone ever run into this issue with VS 2012?
I've tried resetting my development environment back to default and that did not resolve anything. This is really frustrating.
I had the same problem in Visual studio 2011. I fixed it using /setup.
I'm still in the dark about the cause. DevEpxress? ReSharper? VSCommands? The combination?
The fix:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE>devenv.exe /safemode /setup
after that I started Visual Studio:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE>devenv
I just resolved the issue by deleting the devenv.CTM
From the path C:\ProgramData\Microsoft\VisualStudio\12.0\1033
Hope this will help.
Seems answer to this a bit deeper than people says above. Need to delete registry key and the config file and perform application reset to apply solid fix:
(Paths are question of version ran, but I'm sure who ever reads this can figure what path their installations are at.)
File: C:\ProgramData\Microsoft\<version>\12.0\<countrycode>\WDExpress.CTM
Registry Key: HKEY_CURRENT_USER\Software\Microsoft\<version>\<vernum>_Config\Menus
Express: "C:\Program Files\Microsoft Visual Studio <vernum>.0\Common7\IDE\WDExpress.exe" /resetuserdata
Other Versions: "C:\Program Files\Microsoft Visual Studio <vernum>.0\Common7\IDE\devenv.exe" /resetuserdata
This seems to fix the issue permanently (used 60 mins, lol, what a waste).
Open cmd in admin mode
Change dir to dev instal path
Run below command . ( but it will reset your initial settings , like c# preference setting on starting – that’s not a big issue I think )
Devenv.exe /resetuserdata

missing header file on a new installation of visual studio 2012

I just installed visual studio 2012 and tried running my C++ project on it.
compilation fails due to missing "SDKDDKVer.h", "windows.h", etc.
I installed the windows 8 sdk from Windows Software Development Kit (SDK) for Windows 8, but after successfully running the installer with the default components (including the windows headers), I can't find any include folder under C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0 or C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A.
I ran the SDK installer twice + tried to repair and still I can't find any trace of the windows header files.
Did anyone encounter something similar?
what am I missing? my OS is win7 x64. I uninstalled VS2010 before installing VS2012.
thanks,
It's a bug caused by VS2012 using the configuration of VS2010.
You have to manually fix the include libraries to get around this (through the property manager).
The substantial modifications needed are :
adding $(WindowsSDK_IncludePath) to the include paths
adding $(WindowsSDK_LibraryPath_x86) or $(WindowsSDK_LibraryPath_x64)
to the library path depending if your building for x84 or x64.
The same problem also exists when you upgrade a VS2010 project to VS2012.
To me, manually fixing the include dirs (see step 1 in previous answer) took care of the problem.

Visual Studio 2012 won't start

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.

Resources