Skip to content

Error on extension load #227

@GrahamTheCoder

Description

@GrahamTheCoder

Product in use: VS extension
Version in use: Probably 6.2.0
VS version: 2017 - exact version unknown

2 reports nearly 2 months apart of this error, reported at https://marketplace.visualstudio.com/items?itemName=SharpDevelopTeam.CodeConverter#qna

LegacySitePackage failed for package [REConverterPackage]Source: 'CodeConverter.VsExtension' Description: Could not load file or assembly 'Microsoft.VisualStudio.LanguageServices, Culture=neutral' or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.LanguageServices, Culture=neutral' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.LanguageServices, Culture=neutral'
 at CodeConverter.VsExtension.ConvertCSToVBCommand..ctor(REConverterPackage package)
 at CodeConverter.VsExtension.REConverterPackage.Initialize() in D:\GitWorkspace\CodeConverter\Vsix\REConverterPackage.cs:line 100
 at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 

This could be due to a change in the assemblies shipped with Visual Studio, caused by corrupt installs (or ones with certain features not installed). Needs investigation, but it's very hard without being able to repro the problem. It basically comes down to having a look in the visual studio folder for this assembly, then finding out from the fusion log why it isn't loaded.

On my machine (where this works), the assembly is this one:

Microsoft.VisualStudio.LanguageServices.dll	2.10.0.0
c:\program files (x86)\microsoft visual studio\2017\professional\common7\ide\commonextensions\microsoft\managedlanguages\vbcsharp\languageservices\Microsoft.VisualStudio.LanguageServices.dll

The version number matches with this extension in the Extensions and Updates window:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-reproNeeds either the input that caused the error, or more information to allow reproducing the error

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions