diff --git a/NuGet.config b/NuGet.config
index 119b69e2e5..64a3ca3fe4 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -22,6 +22,7 @@
+
+
+
+
diff --git a/eng/Versions.props b/eng/Versions.props
index d4fe1f89c7..26fd17267a 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -79,6 +79,7 @@
4.4.0-2.22424.2
17.4.1004-preview
4.4.0-1.final
+ 4.4.0-3.22463.10
diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCSharpFormattingBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCSharpFormattingBenchmark.cs
index 244383e359..ad0bd84db2 100644
--- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCSharpFormattingBenchmark.cs
+++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorCSharpFormattingBenchmark.cs
@@ -9,7 +9,6 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
-using Microsoft.AspNetCore.Razor.LanguageServer;
using Microsoft.AspNetCore.Razor.LanguageServer.Extensions;
using Microsoft.AspNetCore.Razor.LanguageServer.Formatting;
using Microsoft.CodeAnalysis.Razor.ProjectSystem;
@@ -30,8 +29,6 @@ namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer
{
private string _filePath;
- private RazorLanguageServerWrapper RazorLanguageServer { get; set; }
-
private RazorFormattingService RazorFormattingService { get; set; }
private Uri DocumentUri { get; set; }
@@ -52,7 +49,7 @@ namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer
[GlobalSetup(Target = nameof(RazorCSharpFormattingAsync))]
public async Task InitializeRazorCSharpFormattingAsync()
{
- await EnsureServicesInitializedAsync();
+ EnsureServicesInitialized();
var projectRoot = Path.Combine(RepoRoot, "src", "Razor", "test", "testapps", "ComponentApp");
var projectFilePath = Path.Combine(projectRoot, "ComponentApp.csproj");
@@ -137,15 +134,8 @@ namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer
await RazorLanguageServer.DisposeAsync();
}
- private async Task EnsureServicesInitializedAsync()
+ private void EnsureServicesInitialized()
{
- if (RazorLanguageServerTask != null)
- {
- return;
- }
-
- RazorLanguageServer = await RazorLanguageServerTask;
-
var languageServer = RazorLanguageServer.GetInnerLanguageServerForTesting();
RazorFormattingService = languageServer.GetRequiredService();
}
diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorLanguageServerBenchmarkBase.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorLanguageServerBenchmarkBase.cs
index 7baaee356d..fbf9a2a87f 100644
--- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorLanguageServerBenchmarkBase.cs
+++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorLanguageServerBenchmarkBase.cs
@@ -30,7 +30,7 @@ namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer
RepoRoot = current.FullName;
using var memoryStream = new MemoryStream();
- RazorLanguageServerTask = RazorLanguageServerWrapper.CreateAsync(memoryStream, memoryStream, Trace.Off, configure: (collection) => {
+ RazorLanguageServer = RazorLanguageServerWrapper.Create(memoryStream, memoryStream, Trace.Off, configure: (collection) => {
collection.AddSingleton();
Builder(collection);
});
@@ -42,7 +42,7 @@ namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer
protected string RepoRoot { get; }
- private protected Task RazorLanguageServerTask { get; }
+ private protected RazorLanguageServerWrapper RazorLanguageServer { get; }
internal DocumentSnapshot GetDocumentSnapshot(string projectFilePath, string filePath, string targetPath)
{
diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs
index 2cff37f3d0..83d3597fea 100644
--- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs
+++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensBenchmark.cs
@@ -22,8 +22,6 @@ namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer
{
public class RazorSemanticTokensBenchmark : RazorLanguageServerBenchmarkBase
{
- private RazorLanguageServerWrapper RazorLanguageServer { get; set; }
-
private DefaultRazorSemanticTokensInfoService RazorSemanticTokenService { get; set; }
private DocumentVersionCache VersionCache { get; set; }
@@ -47,7 +45,7 @@ namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer
[GlobalSetup(Target = nameof(RazorSemanticTokensRangeAsync))]
public async Task InitializeRazorSemanticAsync()
{
- await EnsureServicesInitializedAsync();
+ EnsureServicesInitialized();
var projectRoot = Path.Combine(RepoRoot, "src", "Razor", "test", "testapps", "ComponentApp");
ProjectFilePath = Path.Combine(projectRoot, "ComponentApp.csproj");
@@ -113,15 +111,8 @@ namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer
collection.AddSingleton();
}
- private async Task EnsureServicesInitializedAsync()
+ private void EnsureServicesInitialized()
{
- if (RazorLanguageServerTask != null)
- {
- return;
- }
-
- RazorLanguageServer = await RazorLanguageServerTask;
-
var languageServer = RazorLanguageServer.GetInnerLanguageServerForTesting();
RazorSemanticTokenService = languageServer.GetRequiredService() as TestRazorSemanticTokensInfoService;
VersionCache = languageServer.GetRequiredService();
diff --git a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs
index 3773870e63..b70152ccab 100644
--- a/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs
+++ b/src/Razor/benchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks/LanguageServer/RazorSemanticTokensScrollingBenchmark.cs
@@ -20,8 +20,6 @@ namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer
{
public class RazorSemanticTokensScrollingBenchmark : RazorLanguageServerBenchmarkBase
{
- private RazorLanguageServerWrapper RazorLanguageServer { get; set; }
-
private DefaultRazorSemanticTokensInfoService RazorSemanticTokenService { get; set; }
private DocumentVersionCache VersionCache { get; set; }
@@ -45,7 +43,7 @@ namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer
[GlobalSetup(Target = nameof(RazorSemanticTokensRangeScrollingAsync))]
public async Task InitializeRazorSemanticAsync()
{
- await EnsureServicesInitializedAsync();
+ EnsureServicesInitialized();
var projectRoot = Path.Combine(RepoRoot, "src", "Razor", "test", "testapps", "ComponentApp");
ProjectFilePath = Path.Combine(projectRoot, "ComponentApp.csproj");
@@ -125,14 +123,8 @@ namespace Microsoft.AspNetCore.Razor.Microbenchmarks.LanguageServer
collection.AddSingleton();
}
- private async Task EnsureServicesInitializedAsync()
+ private void EnsureServicesInitialized()
{
- if (RazorLanguageServer != null)
- {
- return;
- }
-
- RazorLanguageServer = await RazorLanguageServerTask.ConfigureAwait(false);
var languageServer = RazorLanguageServer.GetInnerLanguageServerForTesting();
RazorSemanticTokenService = (languageServer.GetRequiredService() as TestRazorSemanticTokensInfoService)!;
VersionCache = languageServer.GetRequiredService();