Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions eng/Version.Details.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ This file should be imported by eng/Versions.props
<Project>
<PropertyGroup>
<!-- dotnet/roslyn dependencies -->
<MicrosoftCodeAnalysisAnalyzersPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisAnalyzersPackageVersion>
<MicrosoftCodeAnalysisCommonPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisCommonPackageVersion>
<MicrosoftCodeAnalysisCSharpPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisCSharpPackageVersion>
<MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
<MicrosoftCodeAnalysisEditorFeaturesPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisEditorFeaturesPackageVersion>
<MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>
<MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>
<MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>
<MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>
<MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>
<MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>
<MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>
<MicrosoftCodeAnalysisTestUtilitiesPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisTestUtilitiesPackageVersion>
<MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>
<MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>5.0.0-2.25406.1</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
<MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>5.0.0-2.25406.1</MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>
<MicrosoftNetCompilersToolsetPackageVersion>5.0.0-2.25406.1</MicrosoftNetCompilersToolsetPackageVersion>
<MicrosoftVisualStudioLanguageServicesPackageVersion>5.0.0-2.25406.1</MicrosoftVisualStudioLanguageServicesPackageVersion>
<MicrosoftCodeAnalysisAnalyzersPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisAnalyzersPackageVersion>
<MicrosoftCodeAnalysisCommonPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisCommonPackageVersion>
<MicrosoftCodeAnalysisCSharpPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisCSharpPackageVersion>
<MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisCSharpEditorFeaturesPackageVersion>
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
<MicrosoftCodeAnalysisEditorFeaturesPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisEditorFeaturesPackageVersion>
<MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisEditorFeaturesCommonPackageVersion>
<MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>
<MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>
<MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisExternalAccessRazorEditorFeaturesPackageVersion>
<MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisExternalAccessRazorFeaturesPackageVersion>
<MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisLanguageServerProtocolPackageVersion>
<MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisRemoteServiceHubPackageVersion>
<MicrosoftCodeAnalysisTestUtilitiesPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisTestUtilitiesPackageVersion>
<MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>
<MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>5.0.0-2.25418.8</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
<MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>5.0.0-2.25418.8</MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>
<MicrosoftNetCompilersToolsetPackageVersion>5.0.0-2.25418.8</MicrosoftNetCompilersToolsetPackageVersion>
<MicrosoftVisualStudioLanguageServicesPackageVersion>5.0.0-2.25418.8</MicrosoftVisualStudioLanguageServicesPackageVersion>
<!-- dotnet/arcade dependencies -->
<MicrosoftDotNetArcadeSdkPackageVersion>9.0.0-beta.25255.5</MicrosoftDotNetArcadeSdkPackageVersion>
<!-- dotnet/aspnetcore dependencies -->
Expand Down
84 changes: 42 additions & 42 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,89 +2,89 @@
<Dependencies>
<Source Uri="https://github.com/dotnet/dotnet" Mapping="razor" Sha="7f2a07b481a3d24677ebcf6a45e7e27c8ff95a4e" BarId="279809" />
<ProductDependencies>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CommonLanguageServerProtocol.Framework" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CommonLanguageServerProtocol.Framework" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Common" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.Common" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.EditorFeatures" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.EditorFeatures" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Features" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Features" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures.Common" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures.Common" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures.Text" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.EditorFeatures.Text" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Remote.ServiceHub" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.Remote.ServiceHub" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.Common" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.Common" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.VisualStudio.LanguageServices" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.VisualStudio.LanguageServices" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Test.Utilities" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.Test.Utilities" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.Razor.Features" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.Razor.Features" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.Razor.EditorFeatures" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.Razor.EditorFeatures" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.LanguageServer.Protocol" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.LanguageServer.Protocol" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.FSharp" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.ExternalAccess.FSharp" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="5.0.0-2.25406.1">
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="5.0.0-2.25418.8">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5759a992418f0fd3e206cc6f369b6f33e873dfca</Sha>
<Sha>8405da69a543a680aab32ede20062e22602d3aef</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Collections.Immutable;
using System.Threading;
using Microsoft.AspNetCore.Razor.Language.Legacy;

Expand All @@ -14,7 +15,9 @@ protected override void ExecuteCore(RazorCodeDocument codeDocument, Cancellation
!codeDocument.TryGetTagHelperContext(out var context) ||
context.TagHelpers is [])
{
// No descriptors, no-op.
// No descriptors, so no need to see if any are used. Without setting this though,
// we trigger an Assert in the ProcessRemaining method in the source generator.
codeDocument.SetReferencedTagHelpers(ImmutableHashSet<TagHelperDescriptor>.Empty);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,28 @@ private static (SourceGeneratorProjectItem?, Diagnostic?) ComputeProjectItems((A
var (additionalText, globalOptions) = pair;
var options = globalOptions.GetOptions(additionalText);

if (!options.TryGetValue("build_metadata.AdditionalFiles.TargetPath", out var encodedRelativePath) ||
string.IsNullOrWhiteSpace(encodedRelativePath))
string relativePath;
if (options.TryGetValue("build_metadata.AdditionalFiles.TargetPath", out var encodedRelativePath))
{
var diagnostic = Diagnostic.Create(
RazorDiagnostics.TargetPathNotProvided,
Location.None,
additionalText.Path);
return (null, diagnostic);
// TargetPath is optional, but must have a value if provided.
if (string.IsNullOrWhiteSpace(encodedRelativePath))
{
var diagnostic = Diagnostic.Create(
RazorDiagnostics.TargetPathNotProvided,
Location.None,
additionalText.Path);
return (null, diagnostic);
}

relativePath = Encoding.UTF8.GetString(Convert.FromBase64String(encodedRelativePath));
}
else
{
// If the TargetPath is not provided, we effectively assume its in the root of the project.
relativePath = Path.GetFileName(additionalText.Path);
}

options.TryGetValue("build_metadata.AdditionalFiles.CssScope", out var cssScope);
var relativePath = Encoding.UTF8.GetString(Convert.FromBase64String(encodedRelativePath));

var projectItem = new SourceGeneratorProjectItem(
basePath: "/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,10 @@ namespace Microsoft.VisualStudio.Razor.LanguageClient.Cohost;
[method: ImportingConstructor]
internal sealed class IncompatibleProjectService(IIncompatibleProjectNotifier incompatibleProjectNotifier) : IIncompatibleProjectService
{
private static readonly ProjectId s_miscFilesProject = ProjectId.CreateNewId();

private readonly IIncompatibleProjectNotifier _incompatibleProjectNotifier = incompatibleProjectNotifier;

private ImmutableHashSet<ProjectId> _incompatibleProjectIds = [];

public void HandleMiscFilesDocument(TextDocument textDocument)
{
if (ImmutableInterlocked.Update(ref _incompatibleProjectIds, static set => set.Add(s_miscFilesProject)))
{
_incompatibleProjectNotifier.NotifyMiscFilesDocument(textDocument);
}
}

public void HandleMissingDocument(RazorTextDocumentIdentifier? textDocumentIdentifier, RazorCohostRequestContext context)
{
if (context.Solution is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<Compile Include="$(MSBuildThisFileDirectory)OnAutoInsert\CohostOnAutoInsertTriggerCharacterProviders.cs" />
<Compile Include="$(MSBuildThisFileDirectory)RazorAnalyzerAssemblyRedirector.cs" />
<Compile Include="$(MSBuildThisFileDirectory)RazorSourceGeneratedDocumentSpanMappingService.cs" />
<Compile Include="$(MSBuildThisFileDirectory)RazorSourceGeneratorLocator.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Rename\CohostRenameEndpoint.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SignatureHelp\CohostSignatureHelpEndpoint.cs" />
<Compile Include="$(MSBuildThisFileDirectory)FoldingRange\CohostFoldingRangeEndpoint.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.ComponentModel.Composition;
using Microsoft.CodeAnalysis.ExternalAccess.Razor.Features;
using Microsoft.NET.Sdk.Razor.SourceGenerators;

namespace Microsoft.CodeAnalysis.Razor.CohostingShared;

[Export(typeof(IRazorSourceGeneratorLocator))]
[method: ImportingConstructor]
internal sealed class RazorSourceGeneratorLocator() : IRazorSourceGeneratorLocator
{
public string GetGeneratorFilePath()
{
return typeof(RazorSourceGenerator).Assembly.Location;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ internal abstract class AbstractCohostDocumentEndpoint<TRequest, TResponse>(
return SpecializedTasks.Default<TResponse>();
}

if (context.TextDocument.Project.FilePath is null)
{
// If the project file path is null, we can't compute the hint name, so we can't handle the request.
// This is likely a file in the misc files project, which we don't support yet anyway.
// TODO: Expose context.TextDocument.Project.Solution.WorkspaceKind through our EA to confirm?
_incompatibleProjectService.HandleMiscFilesDocument(context.TextDocument);
return SpecializedTasks.Default<TResponse>();
}

return HandleRequestAsync(request, context, context.TextDocument, cancellationToken);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ namespace Microsoft.CodeAnalysis.Razor.Cohost;

internal interface IIncompatibleProjectNotifier
{
void NotifyMiscFilesDocument(TextDocument textDocument);
void NotifyMissingDocument(Project project, string filePath);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ namespace Microsoft.CodeAnalysis.Razor.Cohost;

internal interface IIncompatibleProjectService
{
void HandleMiscFilesDocument(TextDocument textDocument);
void HandleMissingDocument(RazorTextDocumentIdentifier? textDocumentIdentifier, RazorCohostRequestContext context);
}
Loading