Visual Studio 2010 crashes on opening! I'm starting to hate everything! - visual-studio-2010

Howdy, I noticed that Visual Studio crashed when I tried to open a .SQL file. Perhaps this was due to me installing SQL SERVER 2008 last week. Anyway to overcome the issue I repaired Visual Studio using the install disc. One hour later and a couple of reboots the issue remained. However now the thing crashes as soon as I select a project!
Here's what the event viewer says:
EventType clr20r3, P1 devenv.exe, P2
10.0.40219.1, P3 4d5f2a73, P4 microsoft.visualstudio.editor.implementation,
P5 10.0.0.0, P6 4d5f2b24, P7 d2, P8
9a, P9 system.nullreferenceexception,
P10 NIL.
I'm starting to lose the will to live.
With Regards to Andrei Drynov's answer / comment **
Okay, the service pack is on there, the contents of the SQL file are irrelevant as the files opened with ease previously and it happens on that file type not a specific file also the crashing happens regardless of the project/solution I select? I do agree that I am being dramatic!
After starting in safe mode **
I got the following error
"An exception was encountered while
constructing the content of this
frame. This information is also
logged by running the application with
the /log parameter on the command
line, which stores results in
"C:\Documents and
Settings\XXXXXXX\Application
Data\Microsoft\VisualStudio\10.0\ActivityLog.xml".
Exception details:
System.UnauthorizedAccessException:
Package
'Attrice.TeamFoundation.Sidekicks.VisualStudio.MainPackage,
Attrice.TeamFoundation.Sidekicks.Package.10,
Version=3.0.3.1, Culture=neutral,
PublicKeyToken=14bece0700b6dc89'
failed to load. at
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32
errorCode, IntPtr errorInfo) at
System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32
errorCode) at
Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()
at
Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()
I then got the following
Microsoft Visual Studio
'C:\Dev\XXXXXX.Deploy.wdproj'
cannot be opened because its project
type (.wdproj) is not supported by
this version of the application.
To open it, please use a version that
supports this type of project.
So I'll reinstall the Visual Studio® 2010 Web Deployment Projects to see if that works? How odd.

This worked a treat!
Thank God!
Visual Studio 2010 hangs up when opening a .sql file

You are being quite dramatic )))
Please provide more information, e.g. post the SQL file contents, tell more about the project type, etc.
BTW, did you install service pack 1?

I had a VS2010 solution with two Database projects that, on and off, crashed VS2010 on opening.
After a few attempts I noticed that the .SLN file had the two projects correctly referenced BUT the TAG SccNumberOfProjects referenced 3 instead of 2.
Global\GlobalSection\SccNumberOfProjects = 3
I "text-edited" for 2 and it worked, at least for now.
As the crash was happening on and off with no apparent reason, I cannot guarantee that this was in fact THE solution; use at your own risk and of course, backup files first. ;)

Related

Windows 7 visual studio 2013 launching deveoped extension gets "The operation could not be completed-no such interface supported"

I'm working on a vs 2013 C# Extension project. Using Windows & and .NET 4.5 The vsix extension, when installed, works fine. However, something happened a while back, just after adding some changes, and I can no longer start the extension in the debugger. Selecting the extension project in visual studio and then selecting debug->start new instance causes VS to run through its compilation step and then launch a new version of vs with the extension in place. However, shortly after the VS black splash rectangle appears a pop up appears giving the message "The operation could not be completed-no such interface supported". The debugger has launched and is showing the modules being loaded in the "Progress Window". The last module loaded is ENVDTE80.
Running devenv with /log and copying the log file while the "Operation could not..." message is being displayed shows the last entry to be
<entry> <record>1294</record> <time>2016/02/09 16:53:22.122</time> <type>Information</type> <source>VisualStudio</source> <description>Leaving function VBDispatch::GetTypeLib</description> <guid>{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}</guid>
</entry> </activity>
The guid cited appears many times throughout the activity.log.
I've looked at the odd little error messages from the devenv /LOG log. I've uninstalled the VSIX app from visual studio and then tried debugging > but no joy there. I've uninstalled visual studio and reinstalled. I've repaired the .NET installs. I've repaired the SDK. Nothing has worked. There are a few other earlier and simpler versions of the extension and test versions that debug fine. I'm inclined to think there's some bit of registry entry somewhere that finds a reason not to run this code.
From the devenv activity log I see these error messages:
<description>PkgDef configuration error. ApplicationExtensionsFolder omitted from PkgDefSearchPath</description>
The clients rights token could not be found at ....
Extension will not be loaded because an extension with the same ID &apos;Microsoft.Windows.DevelopmentKit.Desktop&apos; is already loaded at > C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.0\DESKTOP SDK\...</description>
I also have run procmon and captured the events between debug->start separate instance and the presentation of the error message. Two pids are > traced: one for the original devenv and one for the extension being debugged. All registry transactions for the debugged extension fall into: SUCCESS, NAME NOT FOUND, NO MORE NAMES FOUND, or BUFFER OVERFLOW. There is no distinct (to me) single error condition.
The pid associated with the launching devenv, after the last pid entry for the extension being debugged, has several entries ACCESS DENIED associated with HKLM\SOFTWARE\Microsoft\SQMClient\Windows\CommonDatapoints.
Comparing the devenv.log to the procmon, it is obvious that processing continues after the last entry in the devenv.log for ENVDTE80. I don't > seem to be getting anywhere with that correlation.
I've googled this a lot.
The common suggestion for re-registering dlls has not proven to be useful here (yet) (although it seems to have fixed an IE problem which makes it seem to be an attractive approach).
Have also un/re-installed .Net 3.5(.1) with no effect. Have run sfc /scannow with no effect. Have run NetFxRepairTool with no effect. Have rebuilt the VS extensions experimental hive (12.0-Exp) with no effect. Have un/re-installed vs2013 and the SDK with no effect Have uninstalled other versions of VS and paired SDKs to no effect
I got a little more time to look at this. I uninstalled vs sdk and vs 2013 pro and rebooted. In reinstalled 2013 pro and vs. I downloaded the dotnetframework analysis tool are ran it. I repaired dot net 4.5.1. Analysis then said to repair dot net 4.6.1 which I did. Rebooted again. Tried to run the vs extension in debug and got a different error related to the Ext hive lock file. This was an improvement from the unknown interface message previously. Ran the debug again with the devenv log file enabled. The lock file referenced in the devenv log had a "%&00A%&00D"notation in between the path ending in the /Exp directory name and the /....lock filename. Edited the profile to remove cr/lf from the end of the /RootSuffix Exp entry and thereafter debug worked.

Visual Studio error on new project creation

Situation.
I have Web developer Express Studio 2008 installed on my system.
Until recent windows update it worked fine, but about 2 weeks ago it start giving me an error every time I attempt to create any new project. Screen shot of an error below:
Express 2008 error
I did try to do windows restore to point before update and it did not worked.
As a next step I installed Visual Studio 2010(same result) and VS 2015 same result but a bit more descriptive error. Screen show below.
VS 2015 error
But there is no clear information on Microsoft MSDN forums about this error or how to fix it.
I did try to do reset(devenv.exe\resetsettings) but so far no luck.
Any idea what is going on and how to fix this?
Right now I can not create ANY new project and some of older projects are not opening as well. There is no system of or any kind of similarity between projects which opens or not.
This is a fairly vague error as the dll in question isn't listed here and 0x8007045a is just the error code for this dll initialization error. As a next step in troubleshooting to find the issue (outside of a windows repair) I'd go ahead and run Process Monitor and watch the file system activity for Visual Studio (once you see devenv.exe show up, right click on it and include just that process.
There's a blog post with some troubleshooting steps here but really though, you need to find which library is the culprit to track down what you'll need to reinstall (likely from a system or shared library side).

SSIS Script Editor throws an exception

I have SQL Server 2012, SSIS, SSDT and Visual Studio 2010. I can create a new SSIS package and add a Script Task, but if I attempt to open the Script Editor for that Script Task I get the following error:
TITLE: Microsoft Visual Studio
------------------------------
Cannot show Visual Studio 2010 Tools for Applications editor.
------------------------------
ADDITIONAL INFORMATION:
Could not load file or assembly 'Microsoft.VisualStudio.Tools.Applications.Core, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. (mscorlib)
------------------------------
BUTTONS:
OK
------------------------------
From my own investigation into this error, I found that Visual Studio Tools for Applications appears to be a part of MS Office 2007 and higher. This seemed like an odd dependency for to have, but I installed MS Office 2010 just for grins. It didn't change anything. What else should I try?
You will also get this error, if you are trying to debug a script task in VS 2010 and Run64BitRuntime is set to true. In order to debug, set it to false.
I was getting this error and nothing I came across corrected the problem until I logged off as my normal user and logged in as my local admin user. Once I logged in as an admin I could edit the script in my package. Once I logged back in as my regular user the edit script button worked for it too.
I assume it needed to register the assembly on the first launch and couldn't with my regular domain user.
I also got this same error when trying to open the Script Editor, but for a different reason. Not sure how it happened, but I had 3 copies of VSTA (different versions) installed. Once I removed all of them and re-installed SQL Server 2012, problem solved. Hope that helps.
For me the solution was:
close bids (I'm on 2008r2)
reopen
edit the script (it allowed me to edit it once after restarting bids)
delete all breakpoints
make a trivial change, such as adding a blank line
save
That solved it for me.
This worked for me without doing any kind uninstall.
My environment:
Microsoft Visual Studio 9.0 (2008)
Solution:
Go to cd "C:\program files (x86)\microsoft visual studio 9.0\common7\ide\"
Execute command vsta.exe /setup /hostid SSIS_ScriptTask. This will open VSTA with blank project. Let it open and then close it.
Execute command vsta.exe /setup /hostid SSIS_ScriptComponent. This will open VSTA with blank project. Let it open and then close it.
Open your solution/packages that contains the script task.
Click Edit button in Script task and it should open now. Just in case if it dont, I would suggest to keep the blank vsta of step 2 & 3 open and then click the Edit button in script task.
Took almost two hours and thankfully it worked for me. I did not have admin right to perform all that nasty uninstall and registry edit solutions.
Hope it helps someone!!!
Reference : http://blogs.msdn.com/b/jason_howell/archive/2010/08/18/vsta-setup-and-configuration-troubles-for-ssis-2008-and-r2-installations.aspx
Cannot show Visual Studio 2010 Tools for Applications editor.
Just follow the below solution:
Go to SQL Server Setup folder.
Inside that folder "redist".
Under that one more folder "VSTA".
Under VSTA folder "X86" and "X64"
Install the VSTA_RT30.
It works fine.
I figured out my problem this morning. When I uninstalled SQL Server 2012 (and the remnants of 2008 left behind when I upgraded last month) I also uninstalled 3 packages that were actually part of Visual Studio 2010. Had I not done this, a reinstallation of SQL Server 2012 would probably have done the trick, but instead I found new errors. When I reinstalled these 3 packages from the Visual Studio 2010 distribution media, everything started working.
The 3 packages in question were:
Microsoft SQL Server 2008 R2 Data-tier Application Project
Microsoft SQL Server 2008 R2 Data-tier Application Framework
Microsoft SQL Server 2008 R2 Transact-SQL Language Service

Visual Studio 2010 Build Fails to File Copy Error

I'm building a project in Visual Studio 2010 and the build fails because it cannot copy the assemblyname.dll file from obj to bin folder. The exact error message is:
Error 7
Unable to copy file "obj\Debug\AssemblyName.dll" to "bin\AssemblyName.dll". The requested operation cannot be performed on a file with a user-mapped section open.
I think this is because the previous file in bin-folder is not accessible. When I try to delete the file manually, I get an error "The action can't be completed because the file is open in another program". If I try to see what application locks the file with Unlocker, I don't get any results (No Locking handle found).
If I restart Visual Studio, the error goes away but happens again after a build or two. Goes without saying that this is seriously slowing me down. Any advice how to start solving this?
VIsual Studio 2012 on Windows 8. I was receiving the same error message on my project. Restarting Visual Studio or cleaning the obj folder manually did not help. Finally I closed all open files (Windows -> Close All Documents) and the problem went away.
This behavior was due to a newly installed Visual Studio extension called Visual Studio Achievements (http://visualstudiogallery.msdn.microsoft.com/bc7a433b-b594-48d4-bba2-a2f24774d02f)
I noticed that the .pdb file was locked by FxCop (using Unlocker) and I think that the Achievements -extension uses it. After disabling the extension I've no longer got the error mentioned above.
This bug has been fixed in recent versions of the extension (>1.7). It was released as a beta, btw...
This behavior of VS happen very often even on my computer (and on computers of my coworkers).
In my experience it happen more frequently when:
I have some form opened in design when i compile
I stop the execution od the application by pressing the "stop" button
in VS instead of exiting the application
So, closing the form in design before compile, and exiting the application instead of stopping it, somewhat mitigate the issue... but it still happen :-|
My computer is Win 7 x64 SP1 with VS 2010 SP1, 8Gb ram, and no swap file
Platform: Windows 8 Pro, Visual Studio 2012
I found that I receive this error when I am accessing the folder in Windows Explorer.
I was creating PDF documents with Visual Studio 2012. To review the sample document I would right click in Solution Explorer and use Open Folder in File Explorer.
On Windows 7 I would get a SYSTEM.IO error if the actual PDF document was open in Adobe Reader which is expected. With Windows 8 I found that I receive the above error if I have the folder open. I suspect there is a conflict with the Windows 8 preview.
If I close the folder and run the program it works fine.
Check if you open the dll in visual studio.
I open the dll in visual studio and this error happen!!

Visual Studio 2005 - Debugger stopped working

More fun and pain with Visual Studio. Visual Studio 2005.
About two months ago, I started an assignment. In my role, I cannot install or configure development software. Trust me this has given me plenty of heartburn. No IIS is involved here, just File Sharing.
That being said, when I first started I had a problem with my debugger not working. The debugger just stopped. I was able to get it working. Now the problem has returned and I am pulling every last hair on my head.
Almost none of my symbols loads. It can't find the PDB files.
In Debugger options, I checked the Symbol section.
My symbol file location entry is completely blank. ? I don't know why. I did not touch this prior to the problem occurring.
I have cleared the Temporary ASP.NET folders.
Example:
Here is my Module Output
CppCodeProvider.dll C:\Windows\assembly\GAC_MSIL\CppCodeProvider\8.0.0.0__b03f5f7f11d50a3a\CppCodeProvider.dll No No Cannot find or open the PDB file. 17 8.0.50727.762 12/2/2006 4:23 AM 6A510000-6A52C000 [1844] WebDev.WebServer.EXE: Managed
WebDev.WebHost.dll C:\Windows\assembly\GAC_32\WebDev.WebHost\8.0.0.0__b03f5f7f11d50a3a\WebDev.WebHost.dll No No Cannot find or open the PDB file. 3 8.0.50727.42 9/23/2005 4:20 AM 6D040000-6D050000 [1844] WebDev.WebServer.EXE: Managed
So I enabled the SHFUSION.dll in my versio of the the Framework I am using...
In my GAC, I can see this version of WebDev.WebHost.dll for example:
ProcessArchitecture(x86)
Public key token matches:
b03f5f7f11d50a3a
8.0.50727.42
I then see some custom dlls.
I should note, I created a new project. Recreated my files manually by importing them. The debugger worked 5 times and died.
I'm at a loss of what to do next?
The obvious has been checked: The project is set to Debug
Configuration Manager Configuration Debug Platform .NET Build : checked.
Web.Config:
I have attempted to manually attach to the Webdev process from the Debug window and that doesn't work.
I have googled this and this problem seems to occur quite a bit.
You mentioned that your symbol server settings are blank. Have you tried adding the Microsoft Symbol Server location?
Go to Tools -> Options -> Debugging -> Symbols
Add the following to the symbol file locations:
http://msdl.microsoft.com/download/symbols
You can also use this to point to more symbol locations. For instance, if you have a directory for all of the debugging symbols for your software, you could place the .pdb files there and add the directory to Visual Studio to load them.
Pick a directory for the symbols to save to and try again.
Yesterday, I reset my environment variables on my laptop from
VS2005 prompt, blew away the Temporary ASP.NET files and I was debugging again.
After 4 rounds of debugging it quit again. I cleaned the folders again, and I was debugging again.
It get's better. They replaced laptop today with a desktop.
I no longer have admin priviledges. A lot of common troubleshooting
steps are now off the table ( i.e. cleaning Temporary ASP.NET folders, installing
new symbols from MS site.)
Get this, first thing I did was download the code from our Subversion repository.
Built it. I was able to debug it 1 time.
I made some changes based on the problem I'm working on. 2nd time, debugger would not work.
I've been neutered as well as having to deal with this problem. Isn't life grand.
I'm beginning to wonder if the issue is not related to some folder permission/configuration of my account on the network. But I'm also considering a wide variety of tin foil hats as I pull out my hair. . .
Thanks for your help....
Visual Studio is probably installed in %ProgramFiles%. On Windows 7 or higher, you will need administrator rights to use programs like Visual Studio. Companies should trust their developers enough to give them accounts with Administrator rights.
If you're in the unfortunate situation of not having Administrator rights, you may be able to add the following registry key (or ask your IT department to add this key manually for you). Be sure to check that your Visual Studio 2005 installation path in the .reg file is correct.
Windows Registry Editor Version 5.00
; Run Visual Studio 2005 with administrator rights
; This is required to run / debug the program directly from the IDE
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Program Files (x86)\\Microsoft Visual Studio 8\\Common7\\IDE\\devenv.exe"="~ RUNASADMIN"

Resources