diff --git a/Directory.Build.props b/Directory.Build.props index 743543dafd8..192c9e9b52b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -80,7 +80,7 @@ - + diff --git a/Directory.Packages.props b/Directory.Packages.props index 03a3c9d6e13..5ebd0cb4b77 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -10,9 +10,8 @@ <_MicrosoftVisualStudioPackagesVersion>18.0.404-preview <_VisualStudioLanguageServerProtocolVersion>17.12.1-preview <_MicrosoftExtensionsPackageVersion>10.0.1 - <_BasicReferenceAssembliesVersion>1.8.3 + <_BasicReferenceAssembliesVersion>1.7.2 <_BenchmarkDotNetPackageVersion>0.13.5.2136 - <_MicrosoftCodeAnalysisTestingPackageVersion>1.1.3-beta1.26059.1 <_MicrosoftVisualStudioLanguageServicesPackageVersion>$(MicrosoftVisualStudioLanguageServicesPackageVersion) <_XunitPackageVersion>2.9.2 <_MicrosoftBuildPackageVersion>17.15.0-preview-25357-08 @@ -30,12 +29,12 @@ - + - + @@ -78,7 +77,7 @@ - + @@ -100,8 +99,7 @@ - - + @@ -115,7 +113,7 @@ - + @@ -10,30 +10,30 @@ This file should be imported by $(RepositoryEngineeringDir)Versions.props 10.0.1 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 - 5.7.0-1.26203.6 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 + 5.5.0-2.26118.1 10.0.1 10.0.1 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8ebb41f815b..b326156cb2f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -2,101 +2,101 @@ - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d - + https://github.com/dotnet/roslyn - ae96a658f470df45dffd69a04b2a7386fa29de1f + 4b7d473f3a9bbe8526f28a888e5dd80f51a9e15d diff --git a/eng/Versions.props b/eng/Versions.props index e85257ad7f1..3eec23311f1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -5,7 +5,7 @@ true - 17.14.1043-preview2 + 17.3.2094 1.1.33 true true @@ -43,7 +43,7 @@ PackageReference versions directly in arcade. --> 2.9.2 - 1.17.0 + 1.7.0 diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/Legacy/TagHelperParseTreeRewriterTest.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/Legacy/TagHelperParseTreeRewriterTest.cs index e9d2b3fcca4..e98e1346a2a 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/Legacy/TagHelperParseTreeRewriterTest.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/Legacy/TagHelperParseTreeRewriterTest.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy; public class TagHelperParseTreeRewriterTest : TagHelperRewritingTestBase { - public static TheoryData>> GetAttributeNameValuePairsData + public static TheoryData GetAttributeNameValuePairsData { get { diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpCodeParserTest.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpCodeParserTest.cs index 5ccb03ced2e..b91d6b926af 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpCodeParserTest.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpCodeParserTest.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Test.Legacy; public class CSharpCodeParserTest { - public static TheoryData> InvalidTagHelperPrefixData + public static TheoryData InvalidTagHelperPrefixData { get { @@ -105,16 +105,17 @@ RazorDiagnostic InvalidPrefixError(int length, char character, string prefix) public void ValidateTagHelperPrefix_ValidatesPrefix( string directiveText, SourceLocation directiveLocation, - IEnumerable expectedErrors) + object expectedErrors) { // Arrange + var expectedDiagnostics = (IEnumerable)expectedErrors; var diagnostics = new List(); // Act CSharpCodeParser.ValidateTagHelperPrefix(directiveText, directiveLocation, diagnostics); // Assert - Assert.Equal(expectedErrors, diagnostics); + Assert.Equal(expectedDiagnostics, diagnostics); } [Theory] diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperParseTreeRewriterTest.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperParseTreeRewriterTest.cs index 16ed4ae7eba..f8c7e58a4aa 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperParseTreeRewriterTest.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperParseTreeRewriterTest.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy; public class TagHelperParseTreeRewriterTest : TagHelperRewritingTestBase { - public static TheoryData>> GetAttributeNameValuePairsData + public static TheoryData GetAttributeNameValuePairsData { get { diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorSyntaxTreeTest.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorSyntaxTreeTest.cs index 17a9a7b5aea..fce4046c77b 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorSyntaxTreeTest.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorSyntaxTreeTest.cs @@ -57,7 +57,7 @@ public void Parse_UseDirectiveTokenizer_ParsesUntilFirstDirective() var root = syntaxTree.Root; Assert.NotNull(syntaxTree); Assert.Equal(61, root.EndPosition); - Assert.Single(root.DescendantNodes().OfType(), body => body.Keyword.GetContent() == "tagHelperPrefix"); + Assert.Single(root.DescendantNodes().OfType().Where(body => body.Keyword.GetContent() == "tagHelperPrefix")); Assert.Empty(root.DescendantNodes().OfType()); Assert.Empty(syntaxTree.Diagnostics); } diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TagHelperMatchingConventionsTest.cs b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TagHelperMatchingConventionsTest.cs index 9c8403f79eb..5a701149525 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TagHelperMatchingConventionsTest.cs +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TagHelperMatchingConventionsTest.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Razor.Language; public class TagHelperMatchingConventionsTest { - public static TheoryData, string, string, bool> RequiredAttributeDescriptorData + public static TheoryData RequiredAttributeDescriptorData { get { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/Microsoft.CodeAnalysis.Remote.Razor.csproj b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/Microsoft.CodeAnalysis.Remote.Razor.csproj index 09b97a03329..91a1e3aec53 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/Microsoft.CodeAnalysis.Remote.Razor.csproj +++ b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/Microsoft.CodeAnalysis.Remote.Razor.csproj @@ -1,4 +1,4 @@ - + $(NetVS);netstandard2.0 @@ -25,7 +25,7 @@ - + diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Guest/GuestProjectPathProvider.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Guest/GuestProjectPathProvider.cs index 2b4526b0452..7a7c2741a0c 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Guest/GuestProjectPathProvider.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Guest/GuestProjectPathProvider.cs @@ -46,14 +46,7 @@ public bool TryGetProjectPath(ITextBuffer textBuffer, [NotNullWhen(returnValue: } // Host always responds with a host-based path, convert back to a guest one. - var guestProjectPath = ResolveGuestPath(hostProjectPath); - if (guestProjectPath is null) - { - filePath = null; - return false; - } - - filePath = guestProjectPath; + filePath = ResolveGuestPath(hostProjectPath); return true; } @@ -63,10 +56,6 @@ public bool TryGetProjectPath(ITextBuffer textBuffer, [NotNullWhen(returnValue: // The path we're given is from the guest so following other patterns we always ask the host information in its own form (aka convert on guest instead of on host). var ownerPath = _liveShareSessionAccessor.Session.ConvertLocalPathToSharedUri(textDocument.FilePath); - if (ownerPath is null) - { - return null; - } var hostProjectPath = _joinableTaskFactory.Run(() => { @@ -82,7 +71,7 @@ public bool TryGetProjectPath(ITextBuffer textBuffer, [NotNullWhen(returnValue: // We do not want this inlined because the work done in this method requires the VisualStudio.LiveShare assembly. // We do not want to load that assembly outside of a LiveShare session. [MethodImpl(MethodImplOptions.NoInlining)] - private string? ResolveGuestPath(Uri hostProjectPath) + private string ResolveGuestPath(Uri hostProjectPath) { Assumes.NotNull(_liveShareSessionAccessor.Session); diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Guest/ProxyAccessor.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Guest/ProxyAccessor.cs index 5c49652d7c1..72b0c915df8 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Guest/ProxyAccessor.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Guest/ProxyAccessor.cs @@ -25,10 +25,7 @@ private TProxy CreateServiceProxy() where TProxy : class { Assumes.NotNull(_liveShareSessionAccessor.Session); - var proxy = _jtf.Run( + return _jtf.Run( () => _liveShareSessionAccessor.Session.GetRemoteServiceAsync(typeof(TProxy).Name, CancellationToken.None)); - Assumes.NotNull(proxy); - - return proxy; } } diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Guest/RazorGuestInitializationService.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Guest/RazorGuestInitializationService.cs index 623566cd634..0e5d014827e 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Guest/RazorGuestInitializationService.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Guest/RazorGuestInitializationService.cs @@ -22,7 +22,7 @@ internal class RazorGuestInitializationService( private Task? _viewImportsCopyTask; - public Task CreateServiceAsync(CollaborationSession sessionContext, CancellationToken cancellationToken) + public Task CreateServiceAsync(CollaborationSession sessionContext, CancellationToken cancellationToken) { var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); @@ -34,7 +34,7 @@ internal class RazorGuestInitializationService( cts.Cancel(); _sessionAccessor.SetSession(session: null); }); - return Task.FromResult(sessionDetector); + return Task.FromResult(sessionDetector); } // Today we ensure that all _ViewImports in the shared project exist on the guest because we don't currently track import documents diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Host/ProjectHierarchyProxy.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Host/ProjectHierarchyProxy.cs index 52295ce099f..53e5c9559b0 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Host/ProjectHierarchyProxy.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Host/ProjectHierarchyProxy.cs @@ -35,11 +35,6 @@ internal class ProjectHierarchyProxy( Assumes.Present(_openDocumentShell); var hostDocumentFilePath = _session.ConvertSharedUriToLocalPath(documentFilePath); - if (hostDocumentFilePath is null) - { - return null; - } - var hr = _openDocumentShell.IsDocumentInAProject(hostDocumentFilePath, out var hierarchy, out _, out _, out _); if (ErrorHandler.Succeeded(hr) && hierarchy != null) { diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Host/ProjectHierarchyProxyFactory.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Host/ProjectHierarchyProxyFactory.cs index 068b3cba713..cc716ec6f53 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Host/ProjectHierarchyProxyFactory.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/Host/ProjectHierarchyProxyFactory.cs @@ -21,9 +21,9 @@ internal class ProjectHierarchyProxyFactory( [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, JoinableTaskContext joinableTaskContext) : ICollaborationServiceFactory { - public Task CreateServiceAsync(CollaborationSession session, CancellationToken cancellationToken) + public Task CreateServiceAsync(CollaborationSession session, CancellationToken cancellationToken) { var service = new ProjectHierarchyProxy(session, serviceProvider, joinableTaskContext.Factory); - return Task.FromResult(service); + return Task.FromResult(service); } } diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/RemoteHierarchyService.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/RemoteHierarchyService.cs index aa9d3fa43ac..22bfbd4ca0f 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/RemoteHierarchyService.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/RemoteHierarchyService.cs @@ -34,10 +34,6 @@ public async Task HasCapabilityAsync(Uri pathOfFileInProject, string capab } var hostPathOfFileInProject = _session.ConvertSharedUriToLocalPath(pathOfFileInProject); - if (hostPathOfFileInProject is null) - { - return false; - } await _jtf.SwitchToMainThreadAsync(cancellationToken); diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/RemoteHierarchyServiceFactory.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/RemoteHierarchyServiceFactory.cs index 7479ee3bf70..3941dff6d5c 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/RemoteHierarchyServiceFactory.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LiveShare/RemoteHierarchyServiceFactory.cs @@ -24,9 +24,9 @@ internal sealed class RemoteHierarchyServiceFactory( IVsService vsUIShellOpenDocumentService, JoinableTaskContext joinableTaskContext) : ICollaborationServiceFactory { - public Task CreateServiceAsync(CollaborationSession session, CancellationToken cancellationToken) + public Task CreateServiceAsync(CollaborationSession session, CancellationToken cancellationToken) { - return Task.FromResult( + return Task.FromResult( new RemoteHierarchyService(session, vsUIShellOpenDocumentService, joinableTaskContext.Factory)); } } diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Microsoft.VisualStudio.LanguageServices.Razor.csproj b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Microsoft.VisualStudio.LanguageServices.Razor.csproj index b63b33567b6..bb886fe92bb 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Microsoft.VisualStudio.LanguageServices.Razor.csproj +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Microsoft.VisualStudio.LanguageServices.Razor.csproj @@ -1,4 +1,4 @@ - + $(NetFxVS) @@ -12,7 +12,7 @@ - + diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/ProjectCapabilityResolver.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/ProjectCapabilityResolver.cs index 3cfe8d6a502..f73d424e4ed 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/ProjectCapabilityResolver.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/ProjectCapabilityResolver.cs @@ -87,18 +87,8 @@ async Task LiveShareHostHasCapabilityAsync(string capabil var remoteHierarchyService = await session .GetRemoteServiceAsync(nameof(IRemoteHierarchyService), cancellationToken) .ConfigureAwait(false); - if (remoteHierarchyService is null) - { - _logger.LogWarning($"Project does not support LSP Editor because {nameof(IRemoteHierarchyService)} is unavailable."); - return new(IsInProject: true, HasCapability: false); - } var documentFilePathUri = session.ConvertLocalPathToSharedUri(documentFilePath); - if (documentFilePathUri is null) - { - _logger.LogWarning($"Project does not support LSP Editor because file path could not be converted for Live Share: {documentFilePath}"); - return new(IsInProject: true, HasCapability: false); - } var isMatch = await remoteHierarchyService .HasCapabilityAsync(documentFilePathUri, capability, cancellationToken) diff --git a/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/CodeActions/CohostCodeActionsEndpointTestBase.cs b/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/CodeActions/CohostCodeActionsEndpointTestBase.cs index fc6a358c0ac..7776d64aac8 100644 --- a/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/CodeActions/CohostCodeActionsEndpointTestBase.cs +++ b/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/CodeActions/CohostCodeActionsEndpointTestBase.cs @@ -144,7 +144,7 @@ private protected TextDocument CreateRazorDocument(TestCode input, RazorFileKind { // If we're making a diagnostics request, we're going to ignore any hard coded diagnostics, so make sure there aren't // any to avoid false negatives/positives. - Assert.DoesNotContain(input.NamedSpans, kvp => kvp.Key.Length > 0); + Assert.Empty(input.NamedSpans.Where(kvp => kvp.Key.Length > 0)); var result = await CohostDocumentPullDiagnosticsTest.MakeDiagnosticsRequestAsync(document, taskListRequest: false, requestInvoker, IncompatibleProjectService, RemoteServiceInvoker, ClientCapabilitiesService, LoggerFactory, DisposalToken); diff --git a/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/CodeActions/GenerateMethodTests.cs b/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/CodeActions/GenerateMethodTests.cs index 7d8be702f4a..5b413580bfc 100644 --- a/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/CodeActions/GenerateMethodTests.cs +++ b/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/CodeActions/GenerateMethodTests.cs @@ -12,7 +12,7 @@ namespace Microsoft.VisualStudio.Razor.LanguageClient.Cohost.CodeActions; public class GenerateMethodTests(ITestOutputHelper testOutputHelper) : CohostCodeActionsEndpointTestBase(testOutputHelper) { - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_FromCodeBlock_ExistingCodeBlock() { var input = """ @@ -44,7 +44,7 @@ private void NewMethod() await VerifyCodeActionAsync(input, expected, RazorPredefinedCodeFixProviderNames.GenerateMethod); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_FromCodeBlock_ExistingCodeBlock_ExpressionBodiedMethod1() { var input = """ @@ -72,7 +72,7 @@ private void NewMethod() await VerifyCodeActionAsync(input, expected, RazorPredefinedCodeFixProviderNames.GenerateMethod); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_FromCodeBlock_ExistingCodeBlock_ExpressionBodiedMethod2() { var input = """ @@ -100,7 +100,7 @@ private void NewMethod() await VerifyCodeActionAsync(input, expected, RazorPredefinedCodeFixProviderNames.GenerateMethod); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_FromImplicitExpression_WithoutCodeBlock() { var input = """ @@ -121,7 +121,7 @@ private string NewMethod() await VerifyCodeActionAsync(input, expected, RazorPredefinedCodeFixProviderNames.GenerateMethod); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_FromImplicitExpression_WithoutCodeBlock_CodeBlockBraceOnNextLine() { ClientSettingsManager.Update(ClientSettingsManager.GetClientSettings().AdvancedSettings with { CodeBlockBraceOnNextLine = true }); @@ -145,7 +145,7 @@ private string NewMethod() await VerifyCodeActionAsync(input, expected, RazorPredefinedCodeFixProviderNames.GenerateMethod); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_FromImplicitExpression_WithoutCodeBlock_UsesTabsWhenConfigured() { ClientSettingsManager.Update(new ClientSpaceSettings(IndentWithTabs: true, IndentSize: 4)); @@ -168,7 +168,7 @@ private string NewMethod() await VerifyCodeActionAsync(input, expected, RazorPredefinedCodeFixProviderNames.GenerateMethod); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_FromImplicitExpression_EmptyCodeBlock() { var input = """ @@ -195,7 +195,7 @@ private string NewMethod() await VerifyCodeActionAsync(input, expected, RazorPredefinedCodeFixProviderNames.GenerateMethod); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_FromImplicitExpression_EmptyCodeBlock_UsesConfiguredIndentSize() { ClientSettingsManager.Update(new ClientSpaceSettings(IndentWithTabs: false, IndentSize: 2)); @@ -224,7 +224,7 @@ private string NewMethod() await VerifyCodeActionAsync(input, expected, RazorPredefinedCodeFixProviderNames.GenerateMethod); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_FromImplicitExpression_SingleLineCodeBlock() { var input = """ @@ -248,7 +248,7 @@ private string NewMethod() await VerifyCodeActionAsync(input, expected, RazorPredefinedCodeFixProviderNames.GenerateMethod); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_FromCodeBlock_ExistingCodeBlock_WithBlankLineBeforeCloseBrace() { var input = """ @@ -282,7 +282,7 @@ private void NewMethod() await VerifyCodeActionAsync(input, expected, RazorPredefinedCodeFixProviderNames.GenerateMethod); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_FromCodeBlock_MultipleCodeBlocks_UsesFirstCodeBlock() { var input = """ @@ -310,7 +310,7 @@ private string NewMethod() await VerifyCodeActionAsync(input, expected, RazorPredefinedCodeFixProviderNames.GenerateMethod); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_Legacy_WithoutFunctionsBlock_CodeBlockBraceOnNextLine() { ClientSettingsManager.Update(ClientSettingsManager.GetClientSettings().AdvancedSettings with { CodeBlockBraceOnNextLine = true }); @@ -337,7 +337,7 @@ private void NewMethod() await VerifyCodeActionAsync(input, expected, RazorPredefinedCodeFixProviderNames.GenerateMethod, fileKind: RazorFileKind.Legacy); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_Legacy_WithoutFunctionsBlock() { var input = """ @@ -361,7 +361,7 @@ private void NewMethod() await VerifyCodeActionAsync(input, expected, RazorPredefinedCodeFixProviderNames.GenerateMethod, fileKind: RazorFileKind.Legacy); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_Legacy_WithFunctionsBlock() { var input = """ @@ -392,7 +392,7 @@ private void NewMethod() await VerifyCodeActionAsync(input, expected, RazorPredefinedCodeFixProviderNames.GenerateMethod, fileKind: RazorFileKind.Legacy); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_Legacy_MultipleFunctionsBlocks_UsesFirstFunctionsBlock() { var input = """ diff --git a/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/Endpoints/CohostDocumentCompletionEndpointTest.cs b/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/Endpoints/CohostDocumentCompletionEndpointTest.cs index 38d7e6ddfab..95c16f0b8c7 100644 --- a/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/Endpoints/CohostDocumentCompletionEndpointTest.cs +++ b/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/Endpoints/CohostDocumentCompletionEndpointTest.cs @@ -1275,7 +1275,7 @@ This is a Razor document. { // In the real world the client will send us back the data for the item to resolve, but in tests its easier if we just set it here. // We clone the item first though, to ensure us setting the data doesn't hide a bug in our caching logic, around wrapping" the data. - var item = Assert.Single(result.Items, i => i.Label == itemToResolve); + var item = Assert.Single(result.Items.Where(i => i.Label == itemToResolve)); item = JsonSerializer.Deserialize(JsonSerializer.SerializeToElement(item, JsonHelpers.JsonSerializerOptions), JsonHelpers.JsonSerializerOptions)!; item.Data ??= result.Data ?? result.ItemDefaults?.Data; diff --git a/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/Endpoints/CohostFindAllReferencesEndpointTest.cs b/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/Endpoints/CohostFindAllReferencesEndpointTest.cs index c696a7ac332..d2779b5e3bd 100644 --- a/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/Endpoints/CohostFindAllReferencesEndpointTest.cs +++ b/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/Endpoints/CohostFindAllReferencesEndpointTest.cs @@ -284,14 +284,14 @@ private async Task VerifyFindAllReferencesAsync(TestCode input, params (string f if (razorDocumentUri.Equals(location.DocumentUri.GetRequiredParsedUri())) { matchedText = inputText.Lines[location.Range.Start.Line].ToString(); - Assert.Single(input.Spans, s => inputText.GetRange(s).Equals(location.Range)); + Assert.Single(input.Spans.Where(s => inputText.GetRange(s).Equals(location.Range))); } else { - var (fileName, testCode) = Assert.Single(additionalFiles, f => FilePathNormalizingComparer.Instance.Equals(f.fileName, location.DocumentUri.GetRequiredParsedUri().AbsolutePath)); + var (fileName, testCode) = Assert.Single(additionalFiles.Where(f => FilePathNormalizingComparer.Instance.Equals(f.fileName, location.DocumentUri.GetRequiredParsedUri().AbsolutePath))); var text = SourceText.From(testCode.Text); matchedText = text.Lines[location.Range.Start.Line].ToString(); - Assert.Single(testCode.Spans, s => text.GetRange(s).Equals(location.Range)); + Assert.Single(testCode.Spans.Where(s => text.GetRange(s).Equals(location.Range))); } if (result.TryGetFirst(out var referenceItem)) diff --git a/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/Endpoints/CohostGoToImplementationEndpointTest.cs b/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/Endpoints/CohostGoToImplementationEndpointTest.cs index 6082e6b05e6..f0160e9f928 100644 --- a/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/Endpoints/CohostGoToImplementationEndpointTest.cs +++ b/src/Razor/test/Microsoft.CodeAnalysis.Razor.CohostingShared.Test/Endpoints/CohostGoToImplementationEndpointTest.cs @@ -30,7 +30,7 @@ public async Task CSharp_Method() @code { - int [||]GetX() + int [|GetX|]() { return 4; } @@ -52,7 +52,7 @@ public async Task CSharp_Field() @code { - private string [||]_name; + private string [|_name|]; string GetX() { @@ -73,8 +73,8 @@ public async Task CSharp_Multiple() @code { class Base { } - class [||]Derived1 : Base { } - class [||]Derived2 : Base { } + class [|Derived1|] : Base { } + class [|Derived2|] : Base { } void M(Ba$$se b) { diff --git a/src/Razor/test/Microsoft.CodeAnalysis.Razor.Workspaces.Test/Utilities/MemoryCacheTest.cs b/src/Razor/test/Microsoft.CodeAnalysis.Razor.Workspaces.Test/Utilities/MemoryCacheTest.cs index b4ea8f16591..0fded76daab 100644 --- a/src/Razor/test/Microsoft.CodeAnalysis.Razor.Workspaces.Test/Utilities/MemoryCacheTest.cs +++ b/src/Razor/test/Microsoft.CodeAnalysis.Razor.Workspaces.Test/Utilities/MemoryCacheTest.cs @@ -128,7 +128,7 @@ public void CompactionWithSizeLimitOne_BehavesCorrectly() // Only one entry should remain var keys = new[] { "key1", "key2" }; - Assert.Single(keys, key => cache.TryGetValue(key, out _)); + Assert.Single(keys.Where(key => cache.TryGetValue(key, out _))); } [Fact] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostRoslynCodeActionTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostRoslynCodeActionTest.cs index c026011d063..52470a94ab3 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostRoslynCodeActionTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostRoslynCodeActionTest.cs @@ -22,7 +22,7 @@ namespace Microsoft.VisualStudio.Razor.LanguageClient.Cohost; public class CohostRoslynCodeActionTest(ITestOutputHelper testOutputHelper) : CohostEndpointTestBase(testOutputHelper) { - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public Task GenerateMethod_NoCodeBlock() => VerifyCodeActionAsync( csharpFile: """ @@ -60,7 +60,7 @@ internal void NewMethod() """, codeActionName: RazorPredefinedCodeFixProviderNames.GenerateMethod); - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public async Task GenerateMethod_NoCodeBlock_CodeBlockBraceOnNextLine() { ClientSettingsManager.Update(ClientSettingsManager.GetClientSettings().AdvancedSettings with { CodeBlockBraceOnNextLine = true }); @@ -103,7 +103,7 @@ internal void NewMethod() codeActionName: RazorPredefinedCodeFixProviderNames.GenerateMethod); } - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public Task GenerateMethod_ExistingCodeBlock() => VerifyCodeActionAsync( csharpFile: """ @@ -150,7 +150,7 @@ The end. """, codeActionName: RazorPredefinedCodeFixProviderNames.GenerateMethod); - [Fact] + [Fact(Skip = "Waiting for Roslyn insertion")] public Task GenerateMethod_ExistingCodeBlock_UsesTabsWhenConfigured() { ClientSettingsManager.Update(new ClientSpaceSettings(IndentWithTabs: true, IndentSize: 4)); diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LiveShare/Guest/RazorGuestInitializationServiceTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LiveShare/Guest/RazorGuestInitializationServiceTest.cs index 51e88069c58..7189ff6930c 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LiveShare/Guest/RazorGuestInitializationServiceTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LiveShare/Guest/RazorGuestInitializationServiceTest.cs @@ -47,6 +47,7 @@ public async Task CreateServiceAsync_SessionDispose_CancelsListRootsToken() var session = new StrictMock(); using var disposedServiceGate = new ManualResetEventSlim(); var disposedService = false; + IDisposable? sessionService = null; session .Setup(s => s.ListRootsAsync(It.IsAny())) .Returns((cancellationToken) => Task.Run(() => @@ -60,7 +61,7 @@ public async Task CreateServiceAsync_SessionDispose_CancelsListRootsToken() return Array.Empty(); })) .Verifiable(); - var sessionService = Assert.IsAssignableFrom(await service.CreateServiceAsync(session.Object, DisposalToken)); + sessionService = (IDisposable)await service.CreateServiceAsync(session.Object, DisposalToken); // Act sessionService.Dispose(); @@ -82,6 +83,7 @@ public async Task CreateServiceAsync_InitializationDispose_CancelsListRootsToken var serviceAccessor = service.GetTestAccessor(); var session = new StrictMock(); using var cts = new CancellationTokenSource(); + IDisposable? sessionService = null; session .Setup(s => s.ListRootsAsync(It.IsAny())) .Returns((cancellationToken) => Task.Run(() => @@ -92,7 +94,7 @@ public async Task CreateServiceAsync_InitializationDispose_CancelsListRootsToken return Array.Empty(); })) .Verifiable(); - _ = Assert.IsAssignableFrom(await service.CreateServiceAsync(session.Object, cts.Token)); + sessionService = (IDisposable)await service.CreateServiceAsync(session.Object, cts.Token); // Act cts.Cancel(); @@ -112,6 +114,7 @@ public async Task CreateServiceAsync_EnsureViewImportsCopiedAsync_CancellationEx var serviceAcessor = service.GetTestAccessor(); var session = new StrictMock(); using var cts = new CancellationTokenSource(); + IDisposable? sessionService = null; session .Setup(s => s.ListRootsAsync(It.IsAny())) .Returns((cancellationToken) => Task.Run(() => @@ -123,7 +126,7 @@ public async Task CreateServiceAsync_EnsureViewImportsCopiedAsync_CancellationEx return Array.Empty(); })) .Verifiable(); - _ = Assert.IsAssignableFrom(await service.CreateServiceAsync(session.Object, cts.Token)); + sessionService = (IDisposable)await service.CreateServiceAsync(session.Object, cts.Token); // Act cts.Cancel(); diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LiveShare/TestCollaborationSession.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LiveShare/TestCollaborationSession.cs index d3d66595938..9f79dba5ff4 100644 --- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LiveShare/TestCollaborationSession.cs +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/LiveShare/TestCollaborationSession.cs @@ -42,9 +42,6 @@ public override string ConvertSharedUriToLocalPath(Uri uri) } public override string SessionId => throw new NotImplementedException(); - public override string ConversationId => string.Empty; - public override bool IsSessionConnected => true; - public override Task SessionDisconnection => Task.CompletedTask; public override IReadOnlyCollection Peers => throw new NotImplementedException(); public override IReadOnlyCollection RemoteServiceNames => throw new NotImplementedException(); public override int PeerNumber => throw new NotImplementedException(); diff --git a/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/AbstractRazorEditorTest.cs b/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/AbstractRazorEditorTest.cs index c67e8dee8f2..0c8f3bcd8a5 100644 --- a/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/AbstractRazorEditorTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/AbstractRazorEditorTest.cs @@ -50,6 +50,7 @@ public override async Task InitializeAsync() _projectFilePath = await CreateAndOpenBlazorProjectAsync(ControlledHangMitigatingCancellationToken); + await TestServices.SolutionExplorer.RestoreNuGetPackagesAsync(ControlledHangMitigatingCancellationToken); await TestServices.Workspace.WaitForProjectSystemAsync(ControlledHangMitigatingCancellationToken); // We open the Index.razor file, and wait for 3 RazorComponentElement's to be classified, as that diff --git a/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/InProcess/SolutionExplorerInProcess.cs b/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/InProcess/SolutionExplorerInProcess.cs index 806a8279f27..3d3f1a784be 100644 --- a/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/InProcess/SolutionExplorerInProcess.cs +++ b/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/InProcess/SolutionExplorerInProcess.cs @@ -10,10 +10,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Razor.Test.Common; using Microsoft.VisualStudio.Razor.IntegrationTests; +using Microsoft.VisualStudio.Razor.IntegrationTests.InProcess; using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.Interop; using Microsoft.VisualStudio.TextManager.Interop; using Microsoft.VisualStudio.Threading; +using NuGet.SolutionRestoreManager; using Xunit; using Task = System.Threading.Tasks.Task; @@ -41,6 +43,44 @@ public async Task AddProjectAsync(string projectName, string projectTemplate, st ErrorHandler.ThrowOnFailure(solution.AddNewProjectFromTemplate(projectTemplatePath, args.Any() ? args.ToArray() : null, null, projectPath, projectName, null, out _)); } + public async Task RestoreNuGetPackagesAsync(CancellationToken cancellationToken) + { + await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); + + var dte = await GetRequiredGlobalServiceAsync(cancellationToken); + var solution = (EnvDTE80.Solution2)dte.Solution; + foreach (var project in solution.Projects.OfType()) + { + await RestoreNuGetPackagesAsync(project.FullName, cancellationToken); + } + } + + public async Task RestoreNuGetPackagesAsync(string projectName, CancellationToken cancellationToken) + { + await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); + + await TestServices.Workspace.WaitForProjectSystemAsync(cancellationToken); + + var solutionRestoreService = await GetComponentModelServiceAsync(cancellationToken); + await solutionRestoreService.CurrentRestoreOperation; + + var projectFullPath = (await GetProjectAsync(projectName, cancellationToken)).FullName; + var solutionRestoreStatusProvider = await GetComponentModelServiceAsync(cancellationToken); + if (await solutionRestoreStatusProvider.IsRestoreCompleteAsync(cancellationToken)) + { + return; + } + + var solutionRestoreService2 = (IVsSolutionRestoreService2)solutionRestoreService; + await solutionRestoreService2.NominateProjectAsync(projectFullPath, cancellationToken); + + // Check IsRestoreCompleteAsync until it returns true (this stops the retry because true != default(bool)) + await Helper.RetryAsync( + cancellationToken => solutionRestoreStatusProvider.IsRestoreCompleteAsync(cancellationToken), + TimeSpan.FromMilliseconds(50), + cancellationToken); + } + public async Task CloseSolutionAndWaitAsync(CancellationToken cancellationToken) { await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);