Visual Studio error when opening cs|html files - visual-studio

When opening a Cshtml or an html file i get 2 errors messages:
Microsoft Visual Studio
An exception has been encountered. This may be caused by an extension.
You can get more information by examining the file
'C:\Users***\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml'.
Log as JsFiddle (to preserve readability):
https://jsfiddle.net/gze67y0u/
the interesting part of the log might be this line:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Web.Editor, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies
I tried to google the dll and where it belongs to but had no success.
The other message is may just a side effect of the missing dll:
Microsoft Visual Studio
The Visual Studio language support for Style has not been installed.
Code-editing IntelliSense will not be available. Markup IntelliSense
for server controls may not work.
I tried to reset the settings, i tried to repair also an complete reinstall.
What component am i missing?

Related

Could not load file or assembly 'Microsoft.VisualStudio.VisualC.Utilities' creating/loading any C++ project in VS 2019

Trying to open/create C++ projects in VS 2019 (v16.9.6) gives me errors like this:
---------------------------
Microsoft Visual Studio
---------------------------
Could not load file or assembly 'Microsoft.VisualStudio.VisualC.Utilities, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.
---------------------------
OK
---------------------------
I still get it after updating to latest VS 2019, rebooting, cleaning up %APPDATA%\Local\Microsoft\VisualStudio, and disabling all the extensions.
Actually I don't even get that much detail trying to create a simple empty or console C++ app, I get a messagebox with "Exception has been thrown by the target of an invocation".
Google gives me 0 hits for that exact Microsoft.VisualStudio.VisualC.Utilities error, some similar ones suggest it might be a problem with Lightweight solution load mode, but I think that's only an option in 2017?
Any help much appreciated!
Solved it by using the "Repair" function in the Visual Studio Installer.

Can't load EntityFramework.dll 5.0.0.0 inside Visual Studio 2013 extension

I'm writing a Visual Studio extension which depends on EntityFramework 5.0.0.0. I included EntityFramework in my project. When I install my extension, my extension's DLL appears in VS extensions folder, and EntityFramework.dll appears with it as well.
However, when I run my Extension in Visual Studio 2013 (update 5), it can't load EntityFramework: System.IO.FileNotFoundException: Could not load file or assembly 'EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
Looking in Process Monitor, I saw that when I run my extension, VS2013 tries to load EntityFramework from a different path, which has it in a different version - 4.2. I'd expect VS2013 to continue to search for EntityFramework, and find it in my extension's folder, like it does for other dlls included in my extension, but it doesn't.
In VS2015, VS does manage to load EntityFramework 5.0.0.0, but it does so also from yet another different path.
Why doesn't VS2013 continue to search for EntityFramework in my extension's folder?
You need to specify a ProvideCodeBase attribute to specify that your extra assemblies should be loaded. "Sometimes" you get lucky and it finds something else, but that's never guaranteed to work. You can see a few examples of that being used here.

TeamFoundation.VersionControl.HatPackage failed to load

I'm getting this error in VS2013 when loading a project under source control:
Package 'Microsoft.VisualStudio.TeamFoundation.VersionControl.HatPackage, Microsoft.VisualStudio.TeamFoundation.VersionControl, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed to load.
HOWEVER, unlike all the other posts about this there is NO config file to delete under
C:\Users\username\AppData\Local\Microsoft\Team Foundation\5.0
\Cache
The folder is simply empty. I tried repairing the whole installation as well
I had the same issue after I installed Update 4 for VS 2013 (I have Premium edition)
The Team explorer / source control Explorer were drawing blanks.
After a couple of wasted hours (I was avoiding uninstall/re-installing),
I could resolve this issue after I re-installed the Team Explorer for VS 2013. http://www.microsoft.com/en-us/download/details.aspx?id=40776

designer crash visual studio 2010 for windows phone 7

I'm having all kinds of problems getting Visual Studio 2010 to work with the Windows Phone 7 templates. All I have is a default portrait view added to the project, and the designer gives me the following error:
System.IO.FileNotFoundException
Could not load file or assembly 'Microsoft.Phone, Version=7.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e' or one of its dependencies. The system cannot find the file specified.
followed by a bunch of crap that doesn't seem too helpful. If I rebuild the project and refresh the designer, it momentarily appears correctly (less than a second), and then Visual Studio crashes and tries to restart.
Anyone have any idea why this might be happening?
Well, sounds like the install didn't go well. Verify that this reference assembly is located where it is supposed to be, the default install location is c:\program files\reference assemblies\microsoft\framework\silverlight\v4.0\profile\windowsphone. Randomly retrying to reinstall might pay off but do check your machine health first, this doesn't go wrong very often. Ask questions about that at superuser.com

What does "Unauthorized zone" mean when browsing xsd files with Visual Studio 2010?

When I open up an xsd file that includes other xsd files, all of the included files are added to a section called "Unauthorized zone". Visual Studio highlights the xs:include element and gives the following error when trying to resolve the schemaLocation attribute:
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I've read the following blog post, but I'm not familiar enough with xsd yet to fully understand it.
Can anyone explain why this is happening or point me to a good resource that can help?
[Edit]
All of the xsd files that are to be included are in the Visual Studio project.
For me it worked after going to the properties of the XSD file and clicking on Unblock. i got this answer from How do I modify my settings to allow VS2010 to load 3rd party XSD files from the "Unauthorized Zone"?
Visual Studio caches XSD schemas at %VsInstallDir%\xml\Schemas with Target Namespace attribute (url of schema file) when you add them to your editor.
Blog post says that
The inclusion of Local.xsd in the “Unauthorized Zone” and the warnings in the error pane about not being able to resolve the schema location are an indication to the end user that the schema they were visiting attempted to bring in a schema from a zone that it is not authorized to access.
Reason the IO Permission error shows itself is your machine has no authority to download external xsd file(s) from the location.So there is no cache that Visual Studio might validate your other xsd files.
You should check your networking options so you may download those xsd files.While you can it means you have access to that location,so Visual Studio can cache them.If you're sure that you have access,you may also download those xsd files and put them Visual Studio's default schema location and indeed add them in editor.
Also check about cache here
Hope this helps
Myra
Need to do 2 things:
Unblock the xsd file, in windows do right click in properties a click unblock.
Go to visual studio, options, tools, text editor, xml, and check downloads dtd and schemas.
These warnings will disappear when you run Visual studio as administrator.

Resources