Visual Studio crash on F5 - visual-studio-2012

I'm using VS 2012 to develop SharePoint 2010 application.
I recently have installed Visual Studio 2013 RC, but I don't use it.
I still use VS 2012, but I can't start with debug (F5) anymore. Visual Studio crashes.
---------------------------
Microsoft Visual Studio
---------------------------
Unable to start debugging on the web server. The Microsoft Visual Studio Remote Debugging Monitor has been closed on the remote machine.
Click Help for more information.
---------------------------
OK Help
---------------------------
In the event log I get this message :
Faulting application name: devenv.exe, version: 11.0.60610.1, time stamp: 0x51b52140
Faulting module name: vsdebug.dll, version: 10.0.40219.1, time stamp: 0x4d5f149a
Exception code: 0xc0000005
Fault offset: 0x00007329
Faulting process id: 0xfe8
Faulting application start time: 0x01ceb51ac1e92518
Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe
Faulting module path: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\Debugger\vsdebug.dll
Report Id: 202357b5-210f-11e3-80bd-00155d67020d
Faulting package full name:
Faulting package-relative application ID:
I don't know if its related, but the faulting module points to the 10.0 folder instead of the 11.0.
I repaired VS 2012, with no more success.
Any suggestion?
[edit] I removed my answer, as the problem reappeared

Because I believe my question is too specific to my setup, I simply revert back to a previous state of my dev computer.
It works again.

Related

Visual Studio extension conflict when removing a project

After I save the changes of a solution and then remove an existing project, I'll get the following error message:
The operation could be completed. Not implemented.
Then I launched devenv.exe /Log and able to reproduce the problem and the errors are:
Extension will not be loaded because an extension with the same ID 'Microsoft.Windows.DevelopmentKit.Desktop' is already loaded at
C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.0\DESKTOP SDK\
C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.1\DESKTOP SDK\
Extension will not be loaded because an extension with the same ID 'Microsoft.WinJS' is already loaded at
C:\PROGRAM FILES (X86)\MICROSOFT SDKS\WINDOWS\V8.1\EXTENSIONSDKS\MICROSOFT.WINJS.SHARED\VSIX\
C:\PROGRAM FILES (X86)\MICROSOFT SDKS\WINDOWS\V8.0\EXTENSIONSDKS\MICROSOFT.WINJS.SHARED\VSIX\
It looks like it's trying to load two extensions but with different versions. I believe they are the Microsoft Advertising SDK for Windows 8.1 and Microsoft Advertising SDK for Windows Phone 8.1 but even if I launch VS 2012 with Admin, the Uninstall button is greyed out for me. I don't see them in the Add/Remove Programs either. So how can I get rid of this error?
A side note, I have both VS 2012 and VS 2013 installed and I had to do a repair on VS 2012 after VS 2013 was installed.
I had the same problem with Microsoft Windows Development Kit: two errors every time at Visual Studio start with description in the
%AppData%\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml
Sometimes (I think every time) Visual Studio Updater or Installer (when you try to install other version of VS) does not remove already installed version of a VS module.
In my case I had the second WDK with older version but installed after the newer one. I manually uninstalled the older version of Microsoft Windows Development Kit and problem with Visual Studio was solved.

PDFNet 5.7 .Net 4.5 Windows 8.1x64 crash

I've encountered a crash when using PDFNet 5.7 in a .Net 4.5 64 bit application running on Windows 8.1 The issue is only occurring in this scenario. .Net 3.5 works fine with Windows 8.1 and .Net 4.5 works fine on Windows 8.1 64-bit when run in 32 bit application.
The actual crash is (from EventLog):
Faulting application name: PdfNetDriver.exe, version: 1.0.0.0, time stamp: 0x543f4825
Faulting module name: KERNELBASE.dll, version: 6.3.9600.17055, time stamp: 0x532954fb
Exception code: 0xe0434352
Fault offset: 0x0000000000005bf8
Faulting process id: 0x1174
Faulting application start time: 0x01cfe98da8d3f94c
Faulting application path:
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: e6be82fb-5580-11e4-8263-b8ca3a956626
Faulting package full name:
Faulting package-relative application ID:
FileLoadException
Faulting application name: PdfNetDriver.exe, version: 1.0.0.0, time stamp: 0x543f4825
Faulting module name: PDFNet.dll, version: 5.7.0.0, time stamp: 0x4f061bd8
Exception code: 0xc0000005
Fault offset: 0x00000000007682d3
Faulting process id: 0x1174
Faulting application start time: 0x01cfe98da8d3f94c
Faulting application path:
Faulting module path: \bin\x64\Debug\PDFNet.dll
Report Id: e6a6ab32-5580-11e4-8263-b8ca3a956626
Faulting package full name:
Faulting package-relative application ID:
When the exception occurs - the exe dies straight away. No exceptions pop up. Nothing can be done. The program never makes it through the method that initializes the PDFNet component, eg.:
public static void SubMain()
{
// Initialize PDF
PDFNet.Initialize(LIC_KEY);
PDFNet.Terminate();
}
Any ideas?
PDFNet for .Net comes in four flavours, and each has a dependency on VC++ Redistributable
.Net 2.0 x86 : http://www.microsoft.com/en-us/download/details.aspx?id=29
.Net 2.0 x64 : http://www.microsoft.com/en-us/download/details.aspx?id=15336
.Net 4.0 x86 : http://www.microsoft.com/en-us/download/details.aspx?id=5555
.Net 4.0 x64 : http://www.microsoft.com/en-us/download/details.aspx?id=14632
So you say
PDFNet 5.7 in a .Net 4.5 64 bit application running on Windows 8.1
does not work
I don't think the PDFNet .Net 2.0 build will work in .Net 4.5, so make sure you are using .Net 4.0 version. Since it is 64 bit you can use either the 32 or 64 bit versions. You just need to ensure the VC++ redistributable is available.
You can check what a particular PDFNEt.dll is by checking the details tab, in the properties menu, in Windows Explorer.
Make sure to expand the filename column as if it is 64bit that will be indicated at the end of the line.
.Net 4.0 PDFNet Getting Started Guide

Visual studio 2012 wont 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
but now VS2012 does not start and it gives the error:
Faulting application name: devenv.exe, version: 11.0.50727.1, time stamp:
0x5011ecaa
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc000041d
Fault offset: 0x77cc11f1
Faulting process id: 0x12c0
Faulting application start time: 0x01cf525c0d374f44
Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio
11.0\Common7\IDE\devenv.exe
Faulting module path: unknown
Report Id: 4cd88dc0-be4f-11e3-bf75-0023245b4b3a
I'm running it on Windows 7 64 bit.I tried to repair \ Uninstall and install again.But it doesnt work.
You may try to to run devenv.exe with the /SafeMode
Also check VS 2012 will not start:
I had similar issue, you may be in the same boat.Found this from
somebody else when looking around.
The problem is with VS2012 Commands extension. It puts the registry
entry below that somehow causes the ntdll error. What I did was take
out the whole Layers key, start VS2012 and remove the extension. You
may have to do it twice if VS manages to put it back when you start
the first time.
[HKEY_CURRENT_USER\Software\Microsoft\Windows
NT\CurrentVersion\AppCompatFlags\Layers] "C:\Program Files
(x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe"=""
So you follow the instruction from above:
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 remove:
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0]
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config]
and start again.

Visual Studio dies when opening solution

When opening a particular solution in VS2012, the process is killed. Event viewer shows Error 1026
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.BadImageFormatException
Stack:
at Microsoft.VisualStudio.Enterprise.Common.AspNetHelper.CleanupListener()
at Microsoft.VisualStudio.Enterprise.Common.AspNetHelper.Finalize()
Any ideas of cause?
EDIT
I do seem to be able to open other solutions. Just trying to reinstall .NET framework. Will try deleting the SUO file if that doesn't work
I ended up reinstalling Visual Studio and it fixed this

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