Include context fixes to include the default files even when buildoptions is empty, so we have less custom logic in the migration library

This commit is contained in:
Bryan Thornbury 2016-08-22 12:22:37 -07:00
parent 611e4ccfde
commit d8556d1ed7

View file

@ -38,7 +38,15 @@ namespace Microsoft.DotNet.ProjectModel.Files
SourceBasePath = sourceBasePath;
Option = option;
var token = rawObject.Value<JToken>(option);
if (token.Type != JTokenType.Object)
if (token == null)
{
IncludePatterns = new List<string>();
ExcludePatterns = new List<string>();
IncludeFiles = new List<string>();
ExcludeFiles = new List<string>();
}
else if (token.Type != JTokenType.Object)
{
IncludePatterns = CreateCollection(
sourceBasePath, option, ExtractValues(token), literalPath: false);