.Net core Embedde Resources returning less files

20 views Asked by At

I have a class that needs the files os thr embedded resources of another class.

When I get the resources using:

typeof(BP.BUSINESS.UtilBusiness).Assembly.GetManifestResourceNames()

It returns less files. Like, there are 200 files, it´s returnig 100.

In the project file (BP.BUSINESS.csproj) all files are correct delacred, like:

<ItemGroup>
       <None Remove="Emails/BPool/BetaLaunchClient.en.html"/>
</ItemGroup>

<ItemGroup>
       <EmbeddedResource Include="Emails/BPool/BetaLaunchClient.en.html">
           <CopyToOutputDirectory>Always</CopyToOutputDirectory>
       </EmbeddedResource>
</ItemGroup>

The coincidence here is that the files that are not being returned, are precisely the ones that end with their location. for example: I have 3 files (BetaLaunchClient.html, BetaLaunchClient.es.html, BetaLaunchClient.en.html), the only file that GetManifestResourceNames() returns is the BetaLaunchClient.html .

how is that? how to return all files regardless of the type or the name of the file?

cheers

1

There are 1 answers

0
2Fast4YouBR On

The resources are localized, so It will always filter what it thinks it´s in another locale and will only list the resources of the current locale.