Merge branch 'rel/vs15.8' into dev
This commit is contained in:
commit
59baad17da
|
|
@ -102,6 +102,8 @@
|
|||
/p:TargetVSIXContainer=$(VSIXOutputPath);
|
||||
/p:SymbolsPublishDir=$(BuildDir);
|
||||
/p:Configuration=$(Configuration);
|
||||
/p:FeatureBranchVersionSuffix=$(FeatureBranchVersionSuffix);
|
||||
/p:BuildNumber=$(BuildNumber);
|
||||
/p:LangVersion=7.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -47,16 +47,16 @@
|
|||
<SystemRuntimeInteropServicesRuntimeInformationPackageVersion>4.3.0</SystemRuntimeInteropServicesRuntimeInformationPackageVersion>
|
||||
<SystemValueTuplePackageVersion>4.6.0-preview1-26508-04</SystemValueTuplePackageVersion>
|
||||
<VisualStudio_NewtonsoftJsonPackageVersion>9.0.1</VisualStudio_NewtonsoftJsonPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisCommonPackageVersion>2.8.0</VSIX_MicrosoftCodeAnalysisCommonPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>2.8.0</VSIX_MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisCSharpPackageVersion>2.8.0</VSIX_MicrosoftCodeAnalysisCSharpPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>2.8.0</VSIX_MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>2.8.0</VSIX_MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisRemoteRazorServiceHubPackageVersion>2.8.0-beta2-62721-09</VSIX_MicrosoftCodeAnalysisRemoteRazorServiceHubPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>2.8.0</VSIX_MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>2.8.0</VSIX_MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>
|
||||
<VSIX_MicrosoftVisualStudioLanguageServicesPackageVersion>2.8.0</VSIX_MicrosoftVisualStudioLanguageServicesPackageVersion>
|
||||
<VSIX_MicrosoftVisualStudioLanguageServicesRazorRemoteClientPackageVersion>2.8.0-beta2-62721-09</VSIX_MicrosoftVisualStudioLanguageServicesRazorRemoteClientPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisCommonPackageVersion>2.9.0-beta4-62911-02</VSIX_MicrosoftCodeAnalysisCommonPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>2.9.0-beta4-62911-02</VSIX_MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisCSharpPackageVersion>2.9.0-beta4-62911-02</VSIX_MicrosoftCodeAnalysisCSharpPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>2.9.0-beta4-62911-02</VSIX_MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>2.9.0-beta4-62911-02</VSIX_MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisRemoteRazorServiceHubPackageVersion>2.9.0-beta4-62911-02</VSIX_MicrosoftCodeAnalysisRemoteRazorServiceHubPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>2.9.0-beta4-62911-02</VSIX_MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion>
|
||||
<VSIX_MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>2.9.0-beta4-62911-02</VSIX_MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>
|
||||
<VSIX_MicrosoftVisualStudioLanguageServicesPackageVersion>2.9.0-beta4-62911-02</VSIX_MicrosoftVisualStudioLanguageServicesPackageVersion>
|
||||
<VSIX_MicrosoftVisualStudioLanguageServicesRazorRemoteClientPackageVersion>2.9.0-beta4-62911-02</VSIX_MicrosoftVisualStudioLanguageServicesRazorRemoteClientPackageVersion>
|
||||
<XunitAnalyzersPackageVersion>0.8.0</XunitAnalyzersPackageVersion>
|
||||
<XunitPackageVersion>2.3.1</XunitPackageVersion>
|
||||
<XunitRunnerVisualStudioPackageVersion>2.4.0-beta.1.build3945</XunitRunnerVisualStudioPackageVersion>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"visualstudio": {
|
||||
"required": false,
|
||||
"includePrerelease": true,
|
||||
"versionRange": "[15.0.26730.03, 15.9)",
|
||||
"versionRange": "[15.0.26730.03, 15.8)",
|
||||
"requiredWorkloads": [
|
||||
"Microsoft.VisualStudio.Component.VSSDK"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ using Microsoft.AspNetCore.Razor.Language.Legacy;
|
|||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.Completion;
|
||||
using Microsoft.CodeAnalysis.Razor;
|
||||
using Microsoft.CodeAnalysis.Tags;
|
||||
using Microsoft.CodeAnalysis.Text;
|
||||
using Microsoft.VisualStudio.Text;
|
||||
using Microsoft.VisualStudio.Text.Projection;
|
||||
|
|
@ -139,7 +140,7 @@ namespace Microsoft.VisualStudio.Editor.Razor
|
|||
// This groups all Razor directives together
|
||||
sortText: "_RazorDirective_",
|
||||
rules: CompletionItemRules.Create(formatOnCommit: false),
|
||||
tags: ImmutableArray.Create(CompletionTags.Intrinsic),
|
||||
tags: ImmutableArray.Create(WellKnownTags.Intrinsic),
|
||||
properties: propertyDictionary.ToImmutableDictionary());
|
||||
completionItems.Add(completionItem);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,36 +16,10 @@ namespace Microsoft.VisualStudio.LanguageServices.Razor
|
|||
{
|
||||
public ILanguageService CreateLanguageService(HostLanguageServices languageServices)
|
||||
{
|
||||
if (!IsRemoteClientWorking())
|
||||
{
|
||||
return new DefaultTagHelperResolver();
|
||||
}
|
||||
|
||||
return new OOPTagHelperResolver(
|
||||
languageServices.WorkspaceServices.GetRequiredService<ProjectSnapshotProjectEngineFactory>(),
|
||||
languageServices.WorkspaceServices.GetRequiredService<ErrorReporter>(),
|
||||
languageServices.WorkspaceServices.Workspace);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private bool IsRemoteClientWorking()
|
||||
{
|
||||
try
|
||||
{
|
||||
LoadType();
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private void LoadType()
|
||||
{
|
||||
// During 15.8 Roslyn renamed our OOP client from RazorLangaugeServiceClient to RazorLanguageServiceClient.
|
||||
GC.KeepAlive(typeof(RazorLangaugeServiceClient));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -14,6 +14,7 @@ using Microsoft.AspNetCore.Razor.Language.Legacy;
|
|||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.Completion;
|
||||
using Microsoft.CodeAnalysis.Options;
|
||||
using Microsoft.CodeAnalysis.Tags;
|
||||
using Microsoft.CodeAnalysis.Text;
|
||||
using Microsoft.VisualStudio.Text;
|
||||
using Moq;
|
||||
|
|
@ -289,7 +290,7 @@ namespace Microsoft.VisualStudio.Editor.Razor
|
|||
Assert.Equal("_RazorDirective_", item.SortText);
|
||||
Assert.False(item.Rules.FormatOnCommit);
|
||||
var tag = Assert.Single(item.Tags);
|
||||
Assert.Equal(CompletionTags.Intrinsic, tag);
|
||||
Assert.Equal(WellKnownTags.Intrinsic, tag);
|
||||
}
|
||||
|
||||
private static Lazy<RazorCodeDocumentProvider> CreateCodeDocumentProvider(string text, IEnumerable<DirectiveDescriptor> directives)
|
||||
|
|
|
|||
Loading…
Reference in New Issue