Merge pull request #5090 from livarcocc/migrate_app_config

Emitting a None item for App.config if one exists side-by-side to the project.json
This commit is contained in:
Livar 2016-12-20 16:43:24 -08:00 committed by GitHub
commit 10a1695d6c
2 changed files with 24 additions and 0 deletions

View file

@ -553,6 +553,20 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
mockProj.Properties.Count(p => p.Name == "GenerateRuntimeConfigurationFiles").Should().Be(0);
}
[Fact]
public void MigratingAnAppWithAppConfigAddsItAsNoneToTheCsProj()
{
var tempDirectory = Temp.CreateDirectory().Path;
File.Create(Path.Combine(tempDirectory, "App.config")).Dispose();
var mockProj = RunBuildOptionsRuleOnPj(@"
{
}",
tempDirectory);
mockProj.Items.Count(i => i.ItemType == "None").Should().Be(1);
mockProj.Items.First(i => i.ItemType == "None").Include.Should().Be("App.config");
}
private static IEnumerable<string> GetDefaultExcludePatterns(string group)
{
var defaultExcludePatterns = new List<string>(group == "copyToOutput" ?