-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After upgrading Microsoft.CodeAnalysis.CSharp.Workspace from 4.2.0 to 4.3.0 it started throwing at runtime #63921
Comments
dotnet-issue-labeler
bot
added
Area-IDE
untriaged
Issues and PRs which have not yet been triaged by a lead
labels
Sep 11, 2022
arkalyanms
added
Bug
and removed
untriaged
Issues and PRs which have not yet been triaged by a lead
labels
Sep 14, 2022
This was referenced Dec 9, 2023
sharwell
added a commit
to sharwell/roslyn
that referenced
this issue
Mar 25, 2024
…layer The default implementation of IEmbeddedLanguageClassificationService is provided in the features layer, so make sure it is consumed as optional in the workspaces layer. Fixes dotnet#63921
GrahamTheCoder
added a commit
to icsharpcode/CodeConverter
that referenced
this issue
Apr 21, 2024
The issue says it's fixed, but the tests can't run due to the issue
GrahamTheCoder
added a commit
to icsharpcode/CodeConverter
that referenced
this issue
Apr 21, 2024
This is fixed again in a later version of roslyn but we can't update due to another bug dotnet/roslyn#63921
GrahamTheCoder
added a commit
to TymurGubayev/CodeConverter
that referenced
this issue
Jul 20, 2024
Require roslyn , >=4.8.0 for ref return fix: dotnet/roslyn#68194 Require roslyn <= ~4.1.0 or >=4.11.0 for span classification fix: dotnet/roslyn#63921
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version Used:
4.3.0
Error Thrown:
Unhandled exception. System.InvalidOperationException: Service of type 'Microsoft.CodeAnalysis.Classification.IEmbeddedLanguageClassificationService' is required to accomplish the task but is not available from the workspace. at Microsoft.CodeAnalysis.Host.HostLanguageServices.GetRequiredService[TLanguageService]() in /_/src/Workspaces/Core/Portable/Workspace/Host/HostLanguageServices.cs:line 39 at Microsoft.CodeAnalysis.Classification.Classifier.GetClassifiedSpans(HostWorkspaceServices workspaceServices, Project project, SemanticModel semanticModel, TextSpan textSpan, ClassificationOptions options, CancellationToken cancellationToken) in /_/src/Workspaces/Core/Portable/Classification/Classifier.cs:line 61 at Microsoft.CodeAnalysis.Classification.Classifier.GetClassifiedSpansAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken) in /_/src/Workspaces/Core/Portable/Classification/Classifier.cs:line 31 at Program.Main()
Workaround:
Adding:
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" Version="4.3.0" />
Repro:
/cc @sharwell
Suspected patch
#61994
The text was updated successfully, but these errors were encountered: