Visual Studio 2013, 2015 Has stopped working - c#

I have a problem that when I try to open to create a new C# project in either VS 2013 or 2015, I get an error saying that the program has stopped working then it restarts. I tried disabling .Net Framework 3.5, but it didn't help, also I tried repairing it through the control panel, but it didn't help either. What shall I do?
Uninstall and do a fresh reinstall? – Jacobr365
I DID uninstall Visual Studio 2013 before installing 2015.
Clearing the component cache fixes some issues with Visual Studio: Delete C:\Users[User]\AppData\Local\Microsoft\VisualStudio[Version]\ComponentModelCa‌​che or try starting in Safe Mode first: C:\Program Files (x86)\Microsoft Visual Studio [Version]\Common7\IDE\devenv.exe /safemode – Mark
I tried both, but it didn't help.
Thanks

You should uninstall both 2013/2015
With related packages (.net, sql...)
Then reinstall it
Warning: do this only if anything else doesn't worked

I have had this issue before, Use iobit uninstaller or as mention above Ccleaner to fully remove all secondary packages, If you use iobit then when you uninstall it will give you the option to completely clean it from the registry. Restart machine and install again, try install from the web installer. If problem persists then you will most likely have to reinstall your windows OS.

Related

'vcxproj' cannot be opened because its project type (.vcxproj) is not supported

I am getting this error when a open a VS2010 sln file in the same version of
Visual Studio (VS2010).
I installed all windows updates and service packs in hope to resolve the issue but no luck.
I tried various things but ultimately the problem was that I had installed only C# in Visual Studio 2010 and I had to go back and install C++ as well. That fixed the issue.
I did try this but it didn't work for me (run devenv.exe /ResetSkipPkgs on VS2010 command line).
Here is another reference which I tried but didn't work for me (it adds devenv /setup to the above).

"Could not launch Visual studio" error (on Mac)

I updated Visual Studio on Mac and after it tried to start, it told me I need to install Mono and directed me to a web page for that. I installed Mono. Now every time I launch Visual Studio, it just says
Could not launch Visual Studio
This application requires Xamarin.Mac native library side-by-side.
Please download and install the latest version of Mono.
I tried restarting but that didn't help.
What now?
(I'm running the latest macOS, and updated XCode if that matters. Mono is 5.4.0.201.)
New EDIT:(2022)
Users are saying there's a better way than uninstalling and reinstalling. I haven't tested it myself. See comments and answers for more information.
Previous EDIT:
Uninstalling and reinstalling is still the only way as the answer suggests, on: 2019:
March
July
August
September
The fastest and easiest way will be to uninstall and reinstall Visual Studio.
I have just ran into the same problem. I did follow the alert instructions and installed the newest mono framework from Mono websites (6.10.0). After this still the same issue. So I downloaded and ran VS4M installer and it said, it need version 6.8 of Mono framework and it did offer me to download and install this "update". So i went ahead. Still the same warning after launching VS.
Desperately enough after reading this thread I started looking for uninstall instructions (on official site). I did not want to use the script to auto-uninstall as I rather do it all by myself just for ensuring it will be everything done properly. So manual uninstall said to delete the Visual Studio app from /Application folder first. I did it. And woala: All the sudden the new app called "Visual Studio (old)" appeared (or maybe it was there already but I did not notice? Anyway, it was there). It was certainly weird, but I ran it. And it did work! Working instance of Visual Studio! I did check the updates and there was one for the app only. That was my first step straight after launching. It did download the new update and installed it correctly. Now I have end up with fully working and fully updated version of VS4M!
Conclusion:
Use VS4M installer to install all updates and necessarities to run VS4M. After this go to your /Application folder and delete "Visual Studio" app. The "Visual Studio (old)" app should appear. Run this app and update it straight away. (you might have to rename it afterwards from "Visual Studio (old)" to "Visual Studio")
Did you try going to the Applications folder? You'll see a Visual Studio.app file there and you can run Visual Studio by opening that.
I have sovled the problem by brew install --cask mono-mdk rather than brew install mono, in case anyone is installing mono through brew.

"C# 2017 compiler could not be created" error message while opening project

I've Visual Studio 2017 community edition. I have a C# project created using Visual Studio 2015. When I try to open the project in VS 2017 I get an error message prompt:
--------------------- Microsoft Visual Studio
Project 'dataStructureInCSharp' could not be opened because the Visual C# 2017 compiler could not be created.
Please re-install Visual Studio.
--------------------------- OK
I'm trying to obtain help if anyone else has faced similar issue. I feel going the uninstall and then reinstall route is very costly for me and would try that option last if I've got no other resort.
What I've done so far :
Tried starting visual studio with administrative privileges
But problem remained same.
I tried creating a new console project solution from scratch but in that case I get very same error and an additional error error also shown below:
System Environment: Windows 7 Ultimate Service Pack 1
You can try to close all VS 2017 instances and delete the folder %localappdata%\Microsoft\VisualStudio\15.0_xxxx\ComponentModelCache, then open VS to create a new Console project.
Or
please re-run the VS 2017 installer as administrator, click the icon beside ‘Launch’ button and choose ‘Repair’ to repair as shown below:
Just to brief the history of my problem, I had first installed Visual Studio(VS) 2017 community when it was in RC stage. This was first time when I saw the workload based UI of visual studio installation. Initially I simply chose .Net desktop development workload to get started as I was interested in creating only console applications to get my hands dirty.
Initially it was all working well. One fine day I added all other workloads I was interested in namely Universal Windows Platform Development, Azure Development, ASP.NET and web development,Node.js development, and Mobile development with .Net. I'm not sure if there any of the specific workloads to be blamed for the issue I've posted.
Just to avoid the case if RC and RTM release builds might not have messed up my entire environment, I simply uninstalled the entire stuff, rebooted my machine and installed it again from scratch from latest RTM release for Visual Studio Community.
I would strongly recommend that you first try possible solutions suggested by #Sara-MSFT before doing clean reinstall just in case if it works. It can save you couple of hours required in whole reinstallation process if it works.

VS 2013 xaml editor and Microsoft.VCLibs.120.00.Debug

I recently installed VS 2013 on Windows 8.1. When I open up any xaml file I get this error message below.
This happens even if I create a project from scratch in VS 2013. I've tried re-installing Windows 8.1 and VS 2013.
Has anyone come across this issue?
System.Exception Package failed updates, dependency or conflict
validation.
Windows cannot install package
App.a94e67374.a8775.a4662.ab57f.a7f1805386d2c because this package
depends on another package that could not be found. This package
requires minimum version 0.0.0.0 of framework
Microsoft.VCLibs.120.00.Debug published by any publisher to install.
Provide the framework along with this package.
I had the same error just like you.
I registered myself and got a developer licence. After registerering
I debugged the program and it all got fixed by itself
I use windows 10, to fixed it, I go to Setting -> Update & Security -> For developers, I choose Developer mode. In windows 8 and 8.1, I don't know.
the figure of setting
It happened to me as well with both VS 2013 and VS 2015. I think it's a common problem when VS is freshly installed.
I solved it both the times with running VS with administrator privileges (right click on the VS tile on Windows 8 and select "Run as Admin") and opening a XAML file with the editor. It takes some more time than usual, but then the problem gets fixed by itself.
After that you can continue using VS with standard user privileges.
Sadly none of the above solutions seemed to work for me.
My windows 8 installation is quite old and over the years, I had installed several visual studio versions such as 2010,2012 and 2013.
Even uninstalling visual studio, there will be many files and packages left behind.
I managed to fix this issue with the following steps:
1. Install Revo Uninstaller and from the options menu I enabled the "Show system components".
2. For some reason along with the visual studio 2013 ultimate installation (main application - do not uninstall this) I uninstalled two installations related to the main visual studio 2013 application such as: vs 2013 premium and vs 2013 professional apart from the main application (Repeat: Do not uninstall the main app)
3. Uninstall all the Microsoft Visual C++ runtime packages
4. Performed a repair of the the visual studio
Something else that I would rather prefer doing than performing a full repair as it takes far too long, would be to uninstall all the visual C++ runtimes packages and anything related to them (you might brake some apps but they are easy to find and easier to install)
and simply reinstall those visual c++ redistributes starting from the latest version and see if it works.
Before anything however, make sure you have a developer license like said on a previous post (no developer account is required. You don't have to pay for anything yet).
I'll try to provide step-by-step guid to fix the issue.
Please create an MSDN account here https://msdn.microsoft.com and use your login credentials in VS 2013
You have to enable "Developer mode" option from UPDATE & SECURITY (Windows 10). Attaching the screen shot for more clarity.
This should solve the problem, but if it doesn't then,
Try restarting your Visual Studio as administrator.
Some nice reads about configuring your device for development Windows 8 and Windows 10

How can I fix the Microsoft Visual Studio error: "package did not load correctly"?

I installed Visual Studio 2012 and DevExpress 13.1. As Visual Studio started, it generated an error shown by this attached image,
The 'Microsoft.VisualStudio.Editor.Implementation.EditorPackage' 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\must\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml'.
Continue to show this error message?
This error also appears in Visual Studio 2017.
I started to see this on a fresh Windows and Visual Studio 2013 Ultimate with Update 2 installation (although others have also reported it on Updates 3 and 4, as well as the Professional version).
To resolve the problem, close all Visual Studio instances, then delete all files in the following folder:
Visual Studio 2013
%localappdata%\Microsoft\VisualStudio\12.0\ComponentModelCache
It worked fine for me. Thanks to this article.
Visual Studio 2015
%localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache
Visual Studio 2017
%localappdata%\Microsoft\VisualStudio\15.0_xxxx\ComponentModelCache
Visual Studio 2019
%localappdata%\Microsoft\VisualStudio\16_xxxx\ComponentModelCache
Visual Studio 2022
%localappdata%\Microsoft\VisualStudio\17_xxxx\ComponentModelCache
I encountered this problem in Visual Studio 2017 (15.7.4). After trying various solutions, eventually this worked for me: close all Visual Studio instances, and run this from the command line (possibly with administrator rights):
devenv.exe /clearcache
devenv /updateconfiguration
Close Visual Studio.
Backup and delete the following path:
C:\Users\{your_username}\AppData\Roaming\Microsoft\VisualStudio\11.0
Restart Visual Studio as Admin. Otherwise, the Roaming folder can't be repaired by Visual Studio.
Try devenv /setup on the Visual Studio Command Prompt with administrative rights.
I had the same problem with Visual Studio 2013 Ultimate. I tried the solution by Reza posted here, but it didn't work.
Eventually I couldn't close Visual Studio. It was showing a similar dialog when I tried to close, and it wasn't closing. I tried this: Error message "No exports were found that match the constraint contract name". Neither.
I noticed a message in the Team Explorer window saying "Page 'somenumber' cannot be found". I tried that way, and I found this answer: Page '312e8a59-2712-48a1-863e-0ef4e67961fc' not found using Visual Studio 2012. So I run devenv /setup on the Visual Studio Command Prompt with administrative rights.
It did the job, and everything is fine now.
Solution for Visual Studio 2017:
Step 1: open Visual Studio cmd in administrator mode (see start menu item: Developer Command Prompt for VS 2017 - Be sure to use: Run as administrator)
Step 2: change directory to the folder where Visual Studio 2017 is installed, for example:
cd C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
(You can copy/paste this command to your cmd prompt. For Visual Studio Professional, the folder will be called "Professional" instead of "Enterprise", etc.)
Step 3: copy/paste the below command
gacutil -if Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.Shell.Interop.8.0.dll
Hit Enter...
It will resolve the issue...
Otherwise, you can also add the following to the GAC as above:
Microsoft.VisualStudio.Shell.Interop.9.0.dll
Microsoft.VisualStudio.Shell.Interop.10.0.dll
Microsoft.VisualStudio.Shell.Interop.11.0.dll
I had a similar problem, and I went to Control Panel → Programs and repaired the Visual Studio installation. It worked for me.
I had the same problem. Try to remember the latest extension that you installed. I delete the latest extension from extensions and updates and restart Visual Studio. and the problem is solved. For me, the extension name is Productivity Power Tools
I had a similar issue (Tizen Project type package did not load correctly) with Visual Studio 2017.
After trying all the answers above, and spending a few hours searching for a solution for the errors inside ActivityLog.XML, nothing worked for me.
Eventually, the solution was a Visual Studio Repair.
I assume that the repair process overrides some configurations that caused the problem.
Repair Visual Studio 2017
Repair Visual Studio 2019
I also experienced this issue after installing Telerik Reporting. I was not able to launch any solution in Visual Studio 2013, nor could I close Visual Studio 2013.
After uninstalling the reporting package and deleting Local / Roaming AppData for Visual Studio 2012, the problem was fixed.
In my case the error message is "The 'IntelliCodeCppPackage' package did not load correctly" (Visual Studio 2019):
I solved this is issue with these steps;
Disable the Visual Studio IntelliCode extension
Restart Visual Studio
Enable that extension again
I tried everything except the repair. I even did an update. This is what fixed it for me:
Open "Developer Command Prompt for VS 2017" as Admin
CD into (your path may vary) CD C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\PublicAssemblies
Run command gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll
Restart Visual Studio
Based on this Connect feedback I fixed it by closing all opened documents and restarting Visual Studio. I use Visual Studio 2015.
You need to find file devenv.exe.config in C:\Users\{user_name}\AppData\Local\Microsoft\VisualStudio\14.0\ and update it. (Or C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\, depending on the location of your devenv.exe file.)
For this particular case, you should find rows that setup redirects for System.Collections.Immutable and change newVersion from 1.1.36.0 to 1.1.37.0.
The original article is How to restore Visual Studio 2015 after the Update 1 (dependency dance).
I had this problem, and projects were not loading correctly or stating that they needed migration. The ActivityLog.xml showed an error with a particular extension. I uninstalled the extension and restarted Visual Studio. That resolved the issue.
I also experienced the same error, "NPM package not installed correctly",
while creating a Node.js project in Visual Studio 2015.
I resolved my issue by performing two steps:
Delete all files present in this location:
C:\Users\<Your User Name>\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
Restart Visual Studio.
Open Visual Studio and go to menu Tools → NuGet Package Manager → Package Manager Settings →
On the left side: You will see a drop down list: select Node.js, Tools → Npm → ClearCache → *OK
Then again try to create the project. It resolved my issue.
I had the pleasure of experiencing this random problem in Visual Studio 2017 Enterprise.
I tried every solution here, and it didn't work, including the Visual Studio repair (which takes a while). Several hours in, I thought maybe I should actually check the ActivityLog.xml file.
I uninstalled the offending extension from the 'Developer Command Prompt for VS2017' as an administrator since Visual Studio just freezed after open and nothing could be clicked.
Steps to uninstall - courtesy of jessehouwing.net
Find the vsix file you used to install the extension.
Open it in your favorite archiver (mine is 7-Zip).
Grab the extension's Id from the Identity node from the extension.vsixmanifest.
Run (in my case) vsixinstaller /u:Microsoft.VisualStudio.LiveShare to remove the extension.
Find the ComponentModelCache folder
Delete Microsoft.VisualStudio.Default.cache
Restart Visual Studio
Enjoy using Visual Studio.
I had a similar problem.
After checking ActivityLog.xml and it said that it could not create an instance for the Extension/package name from a specific folder. I traced that path and I didn't find that folder it is looking for.
So I installed the extension again, I looked for the dll, and copied the containing folder contents to the folder Visual Studio is looking for.
So to recap:
Check if the folder in the error exists
If not, create a new folder with the same name
Look for the dll in the error in the Visual Studio folder, if not found, install the extension again
If the error resists, search inside the Visual Studio folder in Program Files (x86) for the dll and open the containing folder
Copy all the contents
Paste inside the new folder you have created with the name mentioned inside the ActivityLog.xml
Firstable, you need to be sure have the last Microsoft .NET Framework version, in my case, I had the 4.6 version and I have downloaded and updated the .NET Framework 4.8.03761 Developer Pack, from the official site:
https://dotnet.microsoft.com/download/dotnet-framework/net48
Once I restarted my PC, to continue fixing that, I solved this problem by clearing Visual Studio Component Model Cache.
Just delete or rename this folder:
%LocalAppData%\Microsoft\VisualStudio\11.0\ComponentModelCache
or
%LocalAppData%\Microsoft\VPDExpress\11.0\ComponentModelCache
and restart Visual Studio.
Since this is the top SO result in google for this issue, I'm going to leave my fix here for VS 2022 when experiencing this issue. I found it is commonly caused by an extension issue. In my particular case TypeScript Definition Generator was causing the issue and removing the extension solved it. To find which extension could be causing the issue, run VS with the /Log command line switch.
i.e.: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe" /Log
After the error occurs, close VS and locate ActivityLog.xml found at %AppData%\Microsoft\VisualStudio\<version>\ActivityLog.xml. Search the log for any extensions reporting an error and uninstall it.
I just wanted to mention that I got a similar error in SQL Server Management Studio 2016, where I basically ignored it. Later, I launched Visual Studio (2015), and this error occurred there as well.
I searched and found the answer here recommending that files be deleted from the
%localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache
folder. However, in my case, this folder was empty.
Since I remembered that I saw the error in Management Studio first, I checked, and there was a similar folder at
%localappdata%\Microsoft\SQL Server Management Studio\13.0\ComponentModelCache
This folder was not empty. I closed both Visual Studio and Management Studio, and deleted the files from this folder.
Afterwards, both Management Studio and Visual Studio launched without error.
I had this problem after installing Crystal Reports for Visual Studio. I solved it by closing all Visual Studio instances and reinstalling Crystal Reports.
I solved it:
Go to install
Modify
Go to "Installation location" tab
Check "keep download cache after the installation"
Modify
My issue was Mysql connector net 6.4.4, Nuget, xamarin, VSPackage, EditorPackage and etc.. package did not load correctly.
My solution is below for vs2015
Open AppData location // all the configurations are updating on it.
Backup and Remove the folder in which configuration error is thrown in the visual studio.
forex. If you have Nuget package did not load correctly error - Remove Nuget folder in Local and Roaming directories.
And also clear the data on AppData/Microsoft/visual Studio/14.0 for vs2015
that's it and it worked for me!...
For Visual Studio 2019: I have done the following things to solve the problem
Backup the following Folder. After Taking backup and Delete This Folder C:\Users\munirul2537\AppData\Roaming\Microsoft\VisualStudio\16.0_add0ca51
Go to the installation panel of visual studio and do the following things
1.Go to install
2.Modify
3.Go to "Installation location" tab
4. Check "keep download cache after the installation"
5. Modify
For Visual Studio 2017, 2019. I got this error and able to fix it just by enable the Live Share extension from extensions.
see the VS community page for detail.
For others that have a similar problem but with live share.
In the visual studio installer there was a warning that live share was not installed correctly and a modification was pending, that would download live share again.
After completion of the modification the error was resolved.
I had the same problem for Visual Studio 2019 v16.8.6. It was fixed after repair Visual Studio from Visual Studio Installer.
After trying lots of options this worked for me (VS 2019):
Launch Developer Command Prompt for VS 2019 (Run as Administrator)
cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\PublicAssemblies" Replace Community with your specific distribution.
Execute the next line: gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll
One more solution that worked for my colleague after trying all the others that did not work (for Visual Studio 2022).
Try this:
Close all instances of Visual Studio
Go to: C:\Program Files (x86)\Microsoft SDKs\Windows
You should see a number of vX.0-like directories (e.g. v10.0A for Visual Studio 2022 Enterprise). Back-up and remove all those directories except the one matching your Visual Studio (in my case I'd remove everything except v10.0A).
Start Visual Studio. The "package did not load correctly" warning will be gone.
Rationale:
If you had older versions of Visual Studio installed previously, they will come with their own NETFX Tools which might not uninstall correctly together with those older instances of Visual Studio. The new Visual Studio will for some reason pick the old Tools and fail using them. Removing the redundant directories fixes it.

Categories