Adding a Exclude @(EmbeddedResource) during migration so that we don't get duplicate resources when building migrated apps.
This commit is contained in:
parent
88ac88802b
commit
e710958b79
6 changed files with 185 additions and 5 deletions
|
@ -60,7 +60,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
|||
mockProj.Items.First(i => i.ItemType == "Compile").Include.Should().Be(@"**\*.cs");
|
||||
mockProj.Items.First(i => i.ItemType == "Compile").Exclude.Should().BeEmpty();
|
||||
mockProj.Items.First(i => i.ItemType == "EmbeddedResource").Include.Should().Be(@"compiler\resources\**\*;**\*.resx");
|
||||
mockProj.Items.First(i => i.ItemType == "EmbeddedResource").Exclude.Should().BeEmpty();
|
||||
mockProj.Items.First(i => i.ItemType == "EmbeddedResource").Exclude.Should().Be("@(EmbeddedResource)");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -555,8 +555,16 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
|||
|
||||
private static IEnumerable<string> GetDefaultExcludePatterns(string group)
|
||||
{
|
||||
return group == "copyToOutput" ? ProjectFilesCollection.DefaultPublishExcludePatterns
|
||||
: ProjectFilesCollection.DefaultBuiltInExcludePatterns;
|
||||
var defaultExcludePatterns = new List<string>(group == "copyToOutput" ?
|
||||
ProjectFilesCollection.DefaultPublishExcludePatterns :
|
||||
ProjectFilesCollection.DefaultBuiltInExcludePatterns);
|
||||
|
||||
if (group == "embed")
|
||||
{
|
||||
defaultExcludePatterns.Add("@(EmbeddedResource)");
|
||||
}
|
||||
|
||||
return defaultExcludePatterns;
|
||||
}
|
||||
|
||||
private static IEnumerable<string> GetDefaultIncludePatterns(string group)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue