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
24
TestAssets/TestProjects/TestAppWithEmbeddedResources/Program.cs
Executable file
24
TestAssets/TestProjects/TestAppWithEmbeddedResources/Program.cs
Executable 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}");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue