-
Notifications
You must be signed in to change notification settings - Fork 10.4k
ManifestEmbeddedFileProvider corrupt manifest file #29306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@dazinator thanks for contacting us. You can exclude things from the manifest by adding I'm not sure what exactly is going on in this case, this is not an area we plan to invest in the future since it was mainly developed for Identity UI and the functionality it provides has been superseded by static web assets. That said, if there is an obvious issue in this area and a clear fix, we would be willing to accept a PR with a fix for it. |
Ok thanks for quick response - I will find a workaround! Regarding the surrounding comments though - I believe the issue that this provider solves is that embedded resources lose their original file path / directory information - due to the way the original file path is encoded (during a build) to produce the embedded resource name. The embedded manifest solves this issue by preserving a mapping between resource name and its original path captured at build time. This solves a general and long standing issues with working with embedded resources in the framework itself. Imho this provider should be promoted up the stack because of that. Static web assets may allow you to work around this problem in a web application scenario and identity- but thats a (more) niche scenario, what about:
Those tools can go on using the old method of accessing embedded files without original path information preserved. But that seems a lost opportunity (and a shame) given you have solved this problem. |
@dazinator I wrote the ManifestEmbeddedFileProvider, it solves the issues you mention, but we wrote it because we needed it for Identity UI (although as you mention it can be used outside of it). What I'm pointing out is that we haven't seen significant usage outside of our own usage and as such is not something we plan to invest time on improving in the near future. Supporting any scenario outside of the one defined for Identity UI (out original goal) is not part of our goals (although we won't block anyone from using it there) and as such we don't have any plans to work on improving it. We have limited resources and this is not a priority area for us, that said, as I mentioned we are happy to accept contributions for bug fixes to improve it. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
I am also running into this issue. To reproduce: create a standard WPF application with The generated manifest XML in this case is: <?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>
</FileSystem>
</Manifest> I'm guessing this is due to WPF's generated resource file, |
Here's a temporary (and minimal) workaround that removes the empty |
We haven't seen enough demand for us to prioritize this ask. We would be open to a PR that fixes the issue |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I am seeing the same issue that was described here: https://www.gitmemory.com/issue/aspnet/Extensions/1333/507701113
II get a runtime exception constructing the
ManifestEmbeddedFileProvider
because it complains that the format of it's embedded manifest file is wrong - even though this is produced for me (i.e by the build task).On looking around I came accross the above link and can confirm it only happens in the project which also has an embedded resx file - it has these additional csproj entries:
To Reproduce
Create a vanilla csproj project, include the
ManifestEmbeddedFileProvider
but also set up an embedded RESX file like so:Start your application and create an instance of the file provider.
Exceptions (if any)
As shown above.
Further technical details
dotnet --info
The text was updated successfully, but these errors were encountered: