Skip to content

Commit

Permalink
Workaround for bug in Workspaces 4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftly1 committed Sep 11, 2022
1 parent 20701e0 commit 81d467d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Core/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" Version="4.3.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.3.0" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions src/Core/CsharpColourer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ private List<Node> GenerateInternalRepresentation(string code)
var host = MefHostServices.Create(MefHostServices.DefaultAssemblies);
var sourceText = SourceText.From(code);
var workspace = new AdhocWorkspace(host);

var doc = workspace
.AddProject("Test", LanguageNames.CSharp)
.AddMetadataReferences(_coreReferences)
Expand Down

0 comments on commit 81d467d

Please sign in to comment.