From d8556d1ed79a716376e058f432bbbdd921cce235 Mon Sep 17 00:00:00 2001 From: Bryan Thornbury Date: Mon, 22 Aug 2016 12:22:37 -0700 Subject: [PATCH] Include context fixes to include the default files even when buildoptions is empty, so we have less custom logic in the migration library --- .../Files/IncludeContext.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.ProjectModel/Files/IncludeContext.cs b/src/Microsoft.DotNet.ProjectModel/Files/IncludeContext.cs index ebedcdad3..bef8c47c7 100644 --- a/src/Microsoft.DotNet.ProjectModel/Files/IncludeContext.cs +++ b/src/Microsoft.DotNet.ProjectModel/Files/IncludeContext.cs @@ -38,7 +38,15 @@ namespace Microsoft.DotNet.ProjectModel.Files SourceBasePath = sourceBasePath; Option = option; var token = rawObject.Value(option); - if (token.Type != JTokenType.Object) + + if (token == null) + { + IncludePatterns = new List(); + ExcludePatterns = new List(); + IncludeFiles = new List(); + ExcludeFiles = new List(); + } + else if (token.Type != JTokenType.Object) { IncludePatterns = CreateCollection( sourceBasePath, option, ExtractValues(token), literalPath: false);