Can't install/run/uninstall any version of Visual Studio - windows

I've been getting a major error coming from Visual Studio.I was working on a project from Team Foundation and I simply closed my notebook, making it on stand by. when I opened it back, windows 8.1 loaded perfectly but the visual studio crashed. Now, when I open Visual Studio it loads and after a few seconds it crashes, frozen! I Can't uninstall, install other versions or anything!
I restarted my Windows (kept user files). No change. When I try to install it it crashes.
This is the only warning on the Log (devenv /Log)
<entry>
<record>37</record>
<time>2015/07/18 22:02:22.994</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>The CTM file is out of date and should be deleted and rebuilt, but the file &apos;C:\ProgramData\Microsoft\VisualStudio\12.0\1033\devenv.CTM&apos; could not be deleted.</description>
</entry>

I offer 2 method to overcome this issue:
Try re-registering the actxprxy.dll and oleaut32.dll file in the
%SystemRoot%\system32 directory
Source: https://social.msdn.microsoft.com/Forums/vstudio/en-US/33dfdba4-4a11-4895-9554-0b2fd29e2578/visual-studio-2013-the-operation-could-not-be-completed-no-such-interface-supported?forum=vssetup
If first method didn't solve the issue:
Please go to Control Panel > Uninstall a program > Right click on the specified version of Visual Studio > Change. Then the uninstall menu for VS will come up and press Repair.
I hope it support your problem.

Related

InspectorPackage did not load correctly

I recently installed Xamarin. I experienced no issues with it for about a week. Now, when i load visual studio I get an alert that says:
The 'InspectorPackage' package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file
'C:\Users{redacted}\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml'.
Restarting Visual Studio could help resolve this issue.
Continue to show this error message?
Restarting Visual Studio does not resolve this issue.
Upon inspecting the xml file, I find:
<entry>
<record>503</record>
<time>2017/02/15 15:33:56.686</time>
<type>Error</type>
<source>VisualStudio</source>
<description>LegacySitePackage failed for package [InspectorPackage]Source:
&apos;&apos; Description: Not implemented
(Exception from HRESULT: 0x80004001 (E_NOTIMPL))
System.NotImplementedException: Not implemented
(Exception from HRESULT: 0x80004001 (E_NOTIMPL))
at EnvDTE.Project.get_FullName()
at Xamarin.Inspector.VS.VSAgentExecutionTarget..ctor(Project proj)
at Xamarin.Inspector.VS.VSInspectorSession.CreateAgentExecutionTarget()
at Xamarin.Interactive.IdeSupport.InspectorSession.Prepare()
at Xamarin.Inspector.VS.InspectorPackage.RefreshInspectorSession()
at Xamarin.Inspector.VS.InspectorPackage.Initialize()
at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)
</description>
<guid>{0FCBA9C6-0554-418C-8B79-FF2ED7DC658D}</guid>
<hr>80004001 - E_NOTIMPL</hr>
<errorinfo></errorinfo>
</entry>
What can I do to fix this?
This error seems to only appear when you have multiple startup projects in a solution.
I reproduced it by creating an empty solution with two empty console projects. When only one is set as startup everything works fine. However, when setting both as startup this error pops up.
I also came across this bug where the last post on 14 Jan 2017 states that the upcoming version 1.1 release will fix this issue: https://bugzilla.xamarin.com/show_bug.cgi?id=49417
You can check your version in the about box in VS. On VS2015 it is Help | About Microsoft Visual Studio and I reckon it is the Xamarin Inspector Support entry. Mine is at 1.0.0.0 so I assume I'll have to wait for the upcoming release :)
update:
Oddly enough, an update just arrived for the Xamarin Inspector (less than 30 min after answering). The first load of my test solution still popped up with the error but after that it seems fine.
update (28 Feb 2017):
I am still experiencing the issue with the following version:
Xamarin Inspector Support 1.1.2.0 (cdc01b9f4466b6dcc3095828824a12d041c9f55e)
Adds support for inspecting Xamarin and WPF apps.
This is what i did and it worked for me:
1) go to the path of Visual Studio and delete everything in that folder
(this will delete you visual studio set up ) Visual Studio wont work after this
C:\Users\<username>\AppData\Local\Microsoft\VisualStudio
2) uninstall Visual Studio. And install it again.
If this didn't work look around for xamarin files in that folder and delete everything inside.

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 2015 does not start

We have installed Visual Studio 2015 Professional on Windows 7. It was working fine. But after we installed updates from the menu Tools-->'Extensions and Updates' today the Visual studio does not start anymore. we tried using 'run as administrator' as well. From the Start menu we right click on 'Visual Studio 2015', then 'run as administrator', the usual dialog box asking for permissions appears, we click on 'Yes', splash screen for Visual Studio appears for a second and then disappears. On the Task Manager, it does not appear as well.
Re-starting the system does not help either. .NET 4.6 is installed and Visual Studio 2012 on the same system is working fine.
UPDATE 1
The issue started after we installed the last update (from within VS2015) that had something to do with universal apps I think.
UPDATE 2
At the exact time when I start VS2015, one Windows Event log gets generated under security section as follows:
EventID 6281
Microsoft-Windows-Security-Auditing
Audit Failure
Message: Code Integrity determined that the page hashes of an image file are not valid.
The file could be improperly signed without page hashes or corrupt due to unauthorized modification.
The invalid hashes could indicate a potential disk device error.
File Name: \Device\HarddiskVolume3\Windows\System32\l3codeca.acm
I had the same problem recently after I upgraded one of the packages. I tried "everything" and the only option that worked was the /Setup switch (I was logged in as Administrator, but don't think that's required).
c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>devenv.exe /Setup
c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>devenv.exe
https://msdn.microsoft.com/en-us/library/ex6a2fad.aspx
Here's what worked for me.
Go to the Command Prompt and navigate to the folder with devenv.exe
In my case it was C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
then execute
Devenv.exe /ResetSettings
https://msdn.microsoft.com/en-us/library/ms241273.aspx
I had the same problem. It was caused by Visual Studio Extensions adding paths to $PATH, which made $PATH grow too long (>2048 bytes).
This breaks VS and lots of other stuff on your machine.
Removing outdated and duplicate lines from $PATH made it short enough and VS2015 and everything worked again.
If nothing above works (like in my case) then open a registry editor, go to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio and delete all 14.0 directories.
It will reset all VS settings and next launch will be like first one after installation.
Found answer here
After trying the other solutions in this thread, what finally worked for me was:
From an elevated Command Prompt, navigate to "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE".
Execute:
devenv.exe /Log C:\temp.log
https://msdn.microsoft.com/en-us/library/ms241272.aspx
The log should contain a matching set of Begin and End entries for every extension:
<description>Begin package load ...
...
<description>End package load ...
If the last extension is missing the End package load entry, you need to uninstall that extension.
Execute:
devenv.exe /SafeMode
https://msdn.microsoft.com/en-us/library/ms241278.aspx
Go to "Tools -> Extensions and Updates" and uninstall the offending extension.
Exit VS. Start VS as normal. In case it still doesn't work, repeat the procedure.
Nothing of above helped me, What helped me was to copy devenu.exe from other computer which had VS installed and then replacing it with mine computers devenu.exe.
Run C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Blend.exe
Right click on some file in "Solution Explorer" such as "default.aspx" and select "Edit in Visual Studio"
For me it only shows Visual studio 2015 window without disappearing and showing IDE or any error.
Non of following solutions worked for my normal domain user but there was no issue running it with administrator.
Devenv.exe /ResetSettings
Reinstalling
Repairing
Watching event viewer for more details
Cleaning temp and cleanup and finally seeing some error
Finally I deleted my whole profile from admin via [System properties]-> [Advanced] -> [Profile] and it resolved the problem.
Just before that copy your user folder somewhere or at least your desktop and user folders and also your bookmarks and settings.
I tried several methods above and even re-installed VS but it did not work. The final solution was to really completely remove all the settings and registries of VS with the tool VisualStudioUninstaller. After uninstalling and re-installing it, it is up again.

Unable to start debugging because the object invoked has disconnected from its clients

I'm running Visual Studio 2012 (version 11.0.61030.00 update 4). When debugging a local console application I get the following error when I start debugging (F5):
---------------------------
Microsoft Visual Studio
---------------------------
Error while trying to run project: Unable to start debugging.
The object invoked has disconnected from its clients.
---------------------------
OK
---------------------------
This only happens if I leave visual studio alone without debugging for a couple minutes. If I close visual studio and re-open the error goes away (until I leave it untouched for another couple of minutes). Has anyone experienced this? I can't find any threads of other people experiencing it.
This may be a possible answer for the problem.
Some from the answer:
Check which files were changed (why and how) after update from a source control engine
Review the list of extensions and plugins. Try to disable all or some of them
Close Visual Studio and kill all the development processes: devenv, mspdbsrv, vcpkgsrv, msbuild, msvsmon, vshub, vstest etc
Remove .suo, .ncb, .VC.db, .VC.VC.opendb files of the solution as well as .vs directory, which sometimes cause problems
Remove project setting files, sort of YourProjectName.vcproj.DOMAINNAME.LOGINNAME.user or YourProjectName.csproj.user. The setting file name depends on a project kind you use
Run "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" /setup or "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" /setup for x64 environment
Just Close the VIsual Studio and start again the project.Its work Perfectly for me.
Thanks
While restarting Visual Studio does provide a workaround, it doesn't solve the actual problem. In my case, I was working with a C# solution in VS2017 and the following resolved the issue:
Close Visual Studio
Delete the .vs folder that was created in the Solution's directory
Re-open the Solution
I corrupted my App.config file with NLog settings without section Handler in the top of the document. Gist is check out your config file settings either corrupted in format or not properly handled any section. once I remove corrupted config section, it did not raise the error again (VS 2017)
Hope it helps!
In my case I have just reinstalled Windows 10 and so the Visual Studio 2022..
My project was targeting .net 5 SDK, but I only had .net 6 SDK installed. The solution was to install earlier version of the SDK.

How do I remove the popup about "The 'VSTS for Database Professionals' package did not load correctly."?

I'm not sure exactly when, my VS2010 started showing me the same error popup every time I loaded it. Clicking "No" has no effect, since the message will show up again each and every time I open VS.
I really don't see any adverse effect without this "VSTS for Database Professionals", but the error popup is getting annoying. Can anyone tell me how to disable it without having to uninstall anything?
---------------------------
Microsoft Visual Studio
---------------------------
The 'VSTS for Database Professionals' package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by running the application together with the /log parameter on the command line, and then examining the file 'C:\Users\peter.mounce\AppData\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml'.
Continue to show this error message?
---------------------------
Yes No
---------------------------
Edited to add: I did a google search to see if anyone else had this problem, but the only cases are found are not applicable to my situation, since I have neither LightSwitch nor PostSharp installed.
I do have ReSharper 6.1, if it helps any.
Do you have .NET Framework 4.5 installed? If not, installing that can help with this popup. I have not investigated why, but this package appears to depend on .NET Framework 4.5 for some reason. Even if using Visual Studio 2010 (which does not even support 4.5).
From your log file, it appears Resharper is somehow interfering. Try uninstalling/repairing and seeing if that makes it better.
<entry>
<record>288</record>
<time>2013/04/11 18:30:06.996</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [VSTS for Database Professionals]</description>
<guid>{068E2583-0872-403B-AF4C-6C2A8F2D8C3E}</guid>
<hr>80131522</hr>
<errorinfo>Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'JetBrains.Platform.ReSharper.Util, Version=6.1.1000.82, Culture=neutral, PublicKeyToken=1010a0d8d6380325'.</errorinfo>
</entry>
Visual Studio 2010 installation media: \WCU\DAC folder, find and run-install:
DACFramework_enu.msi
DACProjectSystemSetup_enu.msi
TSqlLanguageService_enu.msi
Reapply Visual Studio 2010 SP1
Details:
http://connect.microsoft.com/VisualStudio/feedback/details/532121/tons-of-package-did-not-load-correctly-errors
The solution is to reset the settings (in case something went wrong with the SQL side of installation):
1) Launch DOS in ADMIN mode (hold WindowsKey+X), Select "Command Prompt (Admin)"
2) Go to your developer studio folder, usually it's under "C:\Program File(x86)\Microsoft Visual Studio 10.0\Common7\IDE"
3) Reset the settings by typing:
devenv.exe /ResetSettings
4) Once done, close DOS, and then launch Visual Studio, the error should disappear.

Resources