When I start visual studio express 2012 for web I get this error in the package manager console.
Cannot load Windows PowerShell snap-in Microsoft.PowerShell.Core because of the following
error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions
property for more information.
Loader Exceptions:
Exception of type 'System.OutOfMemoryException' was thrown.
I don't remember adding anything new to visual studio. I searched other related problems but they don't work for me.
I tried repairing visual studio. I also tried re-installing visual studio which temporarily removed the problem but it is back again.
Anyone has a solution?
I finally made it work. I suspected it is something from windows update that messed up with my VS since I didn't really add anything to VS. I am not sure which updates to remove so I just uninstalled all the windows update that starts in a certain date. Here are the actual steps that I did:
What I did is uninstalled visual studio 2012 express for web following this tutorial.
And then uninstalled windows updates starting from the date I believe the error started appearing.
After I used CCleaner to clean my registry. Had to run it 2 times to just to make sure it is clean. I'm not sure if this actually helps. I just heard from my friend that uninstalling applications sometime leaves registry keys behind.
Finally, I installed visual studio again. Package manager is back to normal.
Restarted my laptop and it is still working. So I guess it is solved.
I think System Restore would do solve this instead of doing all this steps. But system restore was not an option for .
Related
I'm seeing this error in a pop-up window when attempting to run/debug my web project from Visual Studio
The following error occurred when trying to configure IIS Express. Opening and creating websites on iis requires running visual studio under an administrator account
This happened completely out of the blue. One second I was working as normal, regularly going in and out of debug in my browser, then this error pops up. It happens when attempting to run any web project, and it doesn't matter if it's in debug, release mode or what.
Stuff I've tried:
Run Visual Studio as Administrator
Uninstall/Reinstall IIS Express (via "Turn Windows Features On or Off" in Control Panel)
Update Visual Studio
Delete project's .vs folder
But still the error persists.
Is there anything else I can reinstall, update or otherwise check?
Thanks.
Solved it by going through a day of hell, and to be honest the 'solution' was very brute force...
TL;DR: Fully deleting and reinstalling Visual Studio seemed to do the trick.
Since the usual methods weren't working, I tried a full reinstall of Visual Studio. That didn't help. I then tried a System Restore. That made everything far worse, with my project showing about 500 error messages!
I then undid the System Restore, completely deleted all traces of Visual Studio from my computer, reinstalled everything, then tried VS2019 preview edition, tried 2017 edition again, uninstalled and reinstalled NetCore 2.0, 2.1, 2.2... all just to get around the minefield of error messages I'd created for myself.
In the end I just needed to do a full NuGet clear and restore then run dotnet restore --force in the NPM console, after which all those error messages were gone. As well as this, the original IIS Administrator error was gone too, presumably fixed via the original reinstall of Visual Studio.
Lost a whole day to this quagmire.
Downloading & Installing IIS Express from Microsoft worked for me. No need to update VS or remove/re-add the project.
I'm getting the following error when opening VS 2017 on Windows 7 64-bit:
Package management initialization failed: Access Denied.
You can get more information by examining the file:
C:\Users\<username>\AppData\Roaming\Microsoft\VisualStudio\15.<version>\ActivityLog.xml
It all started after I added my solution to SVN. I had no problems until I tried to add a file and got the following error:
Value does not fall within the expected range
I followed the steps mentioned in this answer and did a 'devenv /setup', after that I started getting the Package management initialization failed: Access Denied. error when opening VS. Now Visual Studio doesn't even start.
Has anyone else experienced this problem and resolved it?
Edit:
I tried starting as an administrator and it worked. But otherwise it doesn't.
It turns out that this is a bug, that hasn't yet been resolved. This error also occurs when starting Visual Studio after an update.
But there is a workaround from this thread that worked for me,
Delete the privateregistry.bin file from the following folder:
C:\users\%username%\Appdata\Local\Microsoft\VisualStudio\15.0_<version id>\
This is however a temporary fix and resets the user's preferences. That's why it worked when I started it as an administrator, since the problem is user specific.
Update
This bug is supposedly fixed in the latest versions of Visual Studio. But for the bug fix to work, the old privateregistry.bin file still needs to be deleted.
#Xpleria, the answer works fine. To open the AppData folder, you can type:
%AppData%
directly in the Address bar.
https://support.pointlogic.com/faq/troubleshooting/accessing-the-appdata-folder
I had this issue after installing SSDT for VS 2017 in a new vs instance.
So it's like I have two visual studio in my machine.
To fix that, I uninstalled the SSDT package, restart my machine and reinstall it on the initial installed visual studio instance.
I had the same problem and when I looked at
C:\Users\UserName\AppData\Local\Microsoft\VisualStudio
I noticed that I had miltiple versions of visual studio meaning the current update might not have been successfull, as I was not able to delete the file that #Neil Patro says, I simply deleted the entire updates and all was ok.
I guess adding this as an answer might help.
Happened to me with an existing VS instance running, where I disabled an extension (VsChromium). Closing all VS instances solved the error and VS starts normally.
Env: VS 2019 Pro, Win 10 x64, running as current user.
When I try to install Microsoft visual studio 2015 community it gives me error "setup blocked" and writes "The computer needs to be restarted before setup can continue. Please restart the computer and run setup again"
visual studio error
I tried to restart in various ways (for example canceling hibernate), but every time I get the same error. I tried to look it up, but couldn't find any solution that worked for me.
The full log of the error can be found here.
It might be important to mention, that at the moment I have visual studio 2012 on my computer, but if I try to uninstall it, I get the same error that the computer needed to be restarted.
Thanks.
edit:
I found a solution that worked for me (for all who encountered this problem):
http://www.itexperience.net/2009/06/25/bypass-pending-reboot-of-automatic-updates-0x8ddd0007/
In the registry there is a key (RebootRequired) which tells that you need to reboot your machine.
The problem was that the key existed when it shouldn't have (created on another time, but wasn't deleted afterwards).
By entering to registry and deleting this key, the problem is solved.
You can find the key at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\
based on:
http://www.itexperience.net/2009/06/25/bypass-pending-reboot-of-automatic-updates-0x8ddd0007/
You can temporarily override "Restart" requirement for Visual Studio installation.
Use
ignore-restart for Visual Studio .
Env: Visual Studio 2015 Community Edition on Windows 8
Trying to open Tools --> Extensions and Updates results in the following error in a message box:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Tried running as Admin, same result.
I've tried looking at the log but nothing mentions that error.
In the log there are 3 error entries related to extensions which could be related, they say the following:
Error loading extension: Could not find a part of the path 'C:\path\to\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\14.0\EXTENSIONS\ZW2UF5JV.JVN\extension.vsixmanifest'.
The other 2 are identical except the odd string at the end is HQ1Y5EQD.TMG and 3KWE1LJF.Z1W.
Interestingly, just before those errors in the log appear, there is a line for each saying the extension was loaded successfully but if I try to go to the path it's got listed, it doesn't exist.
I can't find any reference to those strings on my machine. I've also searched the registry but can't find any reference in there either.
I can get into the Extensions manager if I click on one of the update notifications but the original error message just displays in the main pane and I can't do anything else. I can get to the online window but as soon as I click an extension, I am prompted with the original message.
I haven't installed any extensions or VS updates for a while but my Web Compiler extension extension has stopped auto compiling JSX files which is why I started trying to look at the Extension manager. I'm guessing the issues are related.
I can still work, compiling can be done manually which is inconvenient but not the end of the world. My worry is some other extensions are also misbehaving and I just haven't noticed yet.
Don't really want to re-install VS as a) it took ages last time and b) it might not fix the issue. Is there any good advice on troubleshooting the error or anything else I can try before I re-install?
I refreshed the GitHub extension on VS 2015 and got this error. Deleting the two cache files:
extensions.en-US.cache
extensionSdks.en-US.cache
from the AppData\Local\Microsoft\VisualStudio\14.0\Extensions causes them to be rebuilt and eliminates the error.
No reinstall needed.
Problem got worse, I started getting the error message when starting Visual Studio and things like the package manager wouldn't load. Each restart seemed to yield a different combination of windows not loading, sometimes Solution Explorer, sometimes Team Explorer etc. Not good.
A repair to VS 2015 via the Control Panel took a while but didn't help, same problems.
I ended up completely uninstalling and trying to re-install. However the installer threw an index was out of range error but weirdly VS 2015 was now listed as an installed application again.
So I'm guessing the original uninstall left some problematic files lying around which messed up the next install. So I uninstalled again, renamed Microsoft Visual Studio 14.0 folder, cleared all files from AppData\Local\Microsoft\VisualStudio\14.0\Extensions and re-installed.
It installed and ran fine.
The problem I now had was that I couldn't find the SQL Server Object Explorer window anywhere. I tried repairing SQL Server Data Tools but still no luck. So I uninstalled SSDT and then re-installed. This seemed to fix it.
Now I realised I also couldn't connect to Azure through the Server Explorer window, the option was simply not appearing in the list like it used to. This time a repair to Azure Tools for Microsoft Visual Studio 2015 - v2.9 and a repair to Azure App Service Tools v2.9 - Visual Studio 2015 fixed that problem.
I confronted same issue and found this thread. I tried the above suggestions, but unfortunately, it went all unsuccessful. I even tried to uninstall/install with even worse result as Visual Studio became unable to start due to new "missing components" issue. Reinstallation was nothing better.
I finally came by a piece of magic. It was Visual Studio Uninstaller which although would remove all your installed extensions, it would perform a complete cleanup. It would save you from installing new Windows (at least it was my case.
Just go to releases and download the first zip file
This way you will be able to perform clean install of Visual Studio.
My Visual Studio began crashing at start-up. In my search for finding a remedy, I found these two suggestions, but neither worked for me:
Launching Visual Studio while running in safe mode, and
Running repair on Visual Studio.
However, I found that if I logged into a different Windows account, Visual Studio was able to run from that account without crashing.
Here is an error code that that I observed in the crash report:
LCID: 1033
Can anyone provide a solution for returning my Visual Studio to working order?
For me it turned out to be the plugin that GitExtensions installed into Visual Studio 2013.
-- UPDATE: try this before uninstalling GitExtensions
#Enceradeira proposed in the comments to uncheck the Show current branch in Visual Studio option. In GitExtensions, you get there via Tools -> Settings -> Appearance:
-- END OF UPDATE
After uninstalling GitExtensions and reinstalling it with all VS plugin unselected my VS runs smoothly again.
I even put together a blog post about this issue because it bugged me so much.
Since you're able to run with another user login, something may be wrong with your local settings, you can try to reset them: devenv /resetsettings in Start menu -> Run.
Warning: this will restore visual studio to default settings.
In my case VS used to crash on a single solution. I resolved the problem by deleting the respective solutions's user file: SolutionName.suo
My colleague recently experienced a problem with Visual Studio 2013 crashing on start-up. Unfortunately, we found that the approach recommended in the answer by #Arun M did not solve the problem:
devenv.exe /ResetSettings
...however, using a different command line argument did:
devenv.exe /ResetUserData
An easy way to run devenv.exe is via the Visual Studio command prompt; on Windows 10, it can be found here:
Start Button => All Apps => Visual Studio 2013 => Visual Studio Tools =>
VS2013 x86 Native Tools Command Prompt
For more about these command line arguments for devenv.exe, see this answer to this related question: How do I truly reset every setting in Visual Studio 2012?. ⚠ In particular, please note the cautionary statement in that answer about the /ResetUserData command line argument!
Try to run VS as administrator. That's necessary in my case.
If coincident to these Visual Studio crashes you are getting "Heap corruption" (Exception code: 0xc0000005) errors in your Windows Application log (Faulting module name: WindowsCodecs.dll), here is something worth checking into: A faulty WIC component within Expression Blend can cause ALL versions of Visual Studio to crash upon launch, as well as cause Internet Explorer to crash upon visiting many, if not most sites. Even though Microsoft distributes this component, they call it a "non-Microsoft component". As such, a Visual Studio reinstall won't fix this,, an OS reinstall over existing Windows installation won't fix this, and a system file integrity check won't detect it.
If my case, the misbehaving codec was "C:\Program Files (x86)\Microsoft Expression\Common\Imaging\4.0.360.0\PSDCodec.dll", and simply unregistering this component got my Visual Studio working again from consistent startup launch crashes.
I post this in hopes this solution to one source of Visual Studio crashing might save others from the $500 Microsoft support incident fee and week of downtime this caused me.
I just changed the windows language in the bottom right to "EN", then started as admin. And it worked, interesting..
I had the very strange phenomenon that both Visual Studio 2010 and 2013 on a Windows 7 machine crashed when run in a remote desktop session, started from a Windows 10 pc. Debugging the crash showed a CultureNotFound exception. It was caused by regional settings on the Windows 10 pc, which could not be translated in something understood by Windows 7. I had language English(Belgium) with an Azerty keyboard. I added and selected English(UK) with an Azerty keyboard and the crashes disappeared. No other programs suffered from this.
For me it was being caused by Web Essentials and I was able to resolve by disabling it, restarting VS, enabling it back , restart again. Works now.
I had a crash on startup (or soon after startup, before opening any solution) occurring in git2-msvstfs.dll, caused by placing a 3GB temp file into a directory within my solution. Deleting the file fixed it.
Once I accidentally pressed a random key combination (maybe something like ctrl+', but I didn’t realize I was holding ctrl down so I forgot what keys I hit by the time I realized something bad had happened) that resulted in VS Professional 2017 15.3.5 crashing within half a minute. After relaunching, I found that VS would be interactive for a few seconds before it would crash within half a minute. It was really too fast for me to try to figure out what I had accidentally activated or for me to disable it before VS would crash. Also, it would even crash if I didn’t open any solution, so I figured it was not something that deleting a .vs (per project/solution Solution Explorer/open files state) folder would fix.
To fix, I followed Arun M’s comment and renamed my %LOCALAPPDATA%\Microsoft\VisualStudio\15.0_3f4d04be folder. You will need to adjust the path for the edition/version of VS that is crashing. On my machine, I think 15.0_3f4d04be is Professional and 15.0_0fed6c59 is VS Community Edition. You’ll probably have to guess based on the folder’s modification timestamp which is probably going to reflect the date you last used that edition of VS.
After renaming the versioned dotfolder, VS launched without crashing. It started with default settings but automatically restored some of my settings through the cloud sync stuff after a minute of running and it even remembered my account information so I didn’t need to sign in.
I did not need to rename my %LOCALAPPDATA%\Microsoft\VSCommon folder (which Arun M had also suggested).
I had a similar problem, both VS2015 and VS2013 would crash at startup. Tracked it down to an application I installed which put .net 4.7.2 on the system. Once i removed that app, removed .net, and reinstalled .net 4.6, Visual Studio started working again.