diff --git a/src/VisualStudio/Core/Def/Implementation/DesignerAttribute/DesignerAttributeIncrementalAnalyzer.cs b/src/VisualStudio/Core/Def/Implementation/DesignerAttribute/DesignerAttributeIncrementalAnalyzer.cs index 43ee00a0a7c89..11897a6425c13 100644 --- a/src/VisualStudio/Core/Def/Implementation/DesignerAttribute/DesignerAttributeIncrementalAnalyzer.cs +++ b/src/VisualStudio/Core/Def/Implementation/DesignerAttribute/DesignerAttributeIncrementalAnalyzer.cs @@ -90,6 +90,13 @@ public async Task AnalyzeProjectAsync(Project project, bool semanticsChanged, In return; } + var service = project.LanguageServices.GetService(); + if (service == null) + { + // project doesn't support designer attribute service. + return; + } + // Try to compute this data in the remote process. If that fails, then compute // the results in the local process. var pathToResult = await TryAnalyzeProjectInRemoteProcessAsync(project, cancellationToken).ConfigureAwait(false);