Adding a Exclude @(EmbeddedResource) during migration so that we don't get duplicate resources when building migrated apps.

This commit is contained in:
Livar Cunha 2016-12-14 13:59:01 -08:00
parent 88ac88802b
commit e710958b79
6 changed files with 185 additions and 5 deletions

View file

@ -0,0 +1,24 @@
using System;
using System.Linq;
using System.Reflection;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var thisAssembly = typeof(Program).GetTypeInfo().Assembly;
var resources = from resourceName in thisAssembly.GetManifestResourceNames()
select resourceName;
if (resources.Count() > 1)
{
throw new Exception($"{resources.Count()} found in the assembly. Was expecting only 1.");
}
var resourceNames = string.Join(",", resources);
Console.WriteLine($"{resources.Count()} Resources Found: {resourceNames}");
}
}
}