Skip to content

ManifestEmbeddedFileProvider not working when Resources.resx in same project #1333

@iconics-milan

Description

@iconics-milan

When adding a regular Resources.resx file into an asp.net core project that uses <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> and a ManifestEmbeddedFileProvider, the file provider throws an InvalidOperationException with this message:
Invalid manifest format. 'ResourcePath' must contain a text value. ''

Using version 2.2.0 of asp nugets, running in .net framework 4.7.2, lanunching from VS.

Looking into the generated assembly, I found that the generated manifest looks like this:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Manifest>
  <ManifestVersion>1.0</ManifestVersion>
  <FileSystem>
    <File Name=""><ResourcePath></ResourcePath></File>
    <File Name="Microsoft.Extensions.FileProviders.Embedded.Manifest.xml"><ResourcePath>Microsoft.Extensions.FileProviders.Embedded.Manifest.xml</ResourcePath></File>
    <Directory Name="wwwroot">
      <File Name="site.css"><ResourcePath>AspResources1.wwwroot.site.css</ResourcePath>
      </File>
    </Directory>
  </FileSystem>
</Manifest>

The first entry in the manifest seems wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions