提交 3e3922c5 编写于 作者: K Kevin Pilch-Bisson

Handle the solution not having a configuration.

Fixes internal bug 268059.
上级 52905d0e
......@@ -119,12 +119,20 @@ int IVsSolutionLoadEvents.OnAfterBackgroundSolutionLoadComplete()
OutputToOutputWindow($"Getting project information - start");
var start = DateTimeOffset.UtcNow;
// Capture the context so that we come back on the UI thread, and do the actual project creation there.
var projectInfos = await deferredProjectWorkspaceService.GetDeferredProjectInfoForConfigurationAsync(
$"{solutionConfig.Name}|{solutionConfig.PlatformName}",
cancellationToken).ConfigureAwait(true);
AssertIsForeground();
var projectInfos = SpecializedCollections.EmptyReadOnlyDictionary<string, DeferredProjectInformation>();
// Note that `solutionConfig` may be null. For example: if the solution doesn't actually
// contain any projects.
if (solutionConfig != null)
{
// Capture the context so that we come back on the UI thread, and do the actual project creation there.
projectInfos = await deferredProjectWorkspaceService.GetDeferredProjectInfoForConfigurationAsync(
$"{solutionConfig.Name}|{solutionConfig.PlatformName}",
cancellationToken).ConfigureAwait(true);
}
AssertIsForeground();
cancellationToken.ThrowIfCancellationRequested();
OutputToOutputWindow($"Getting project information - done (took {DateTimeOffset.UtcNow - start})");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册