You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
I am trying to write a piece of CoreRT-based code that implements ResourceManager in a CoreRT-friendly, albeit Windows-only, way. To do this I am using a build-time script to extract the manifest resource streams from the compiled .NET assemblies, and compile them into a native object using rc.exe. I would then use a custom ResourceManager class to extract the appropriate blob from the compiled RC file using Win32 APIs, and pass it into ResourceReader.
However, for this to work, I need to create an index with three items: the name of the assembly containing the resource, the name of the resource as embedded in the assembly, and a unique key used to retrieve the correct resource data. It is the first item that is causing me grief.
When I call typeof(Something).GetTypeInfo().Assembly.GetName().Name in my C# code, I get varying results. If Something == System.Object, or any other type in System.Private.CoreLib.dll or any of the System.Private.Reflection assemblies, it reports the correct assembly name. If I use a type contained in any other assembly, it resolves to a RuntimeNoMetadataTypeInfo and throws an exception. (I then crash in __not_yet_implemented because the code calls through to the default, stubbed ResourceManager class while trying to retrieve the exception message.) I cannot for the life of me determine the difference between the System.Private.* assemblies and any other assembly (be it from CoreFX or one of my own) as far as TypeInfo.Assembly is concerned. Can anyone offer me any pointers? Thanks!
Thanks for the detailed bug report! The issue you're seeing affects all types referenced from a typeof(Y) expression that are otherwise not constructed (there's no new Y() in the program). The fix is inbound.
@wjk ResourceManager is a big beast with a lot of challenges. If you would like to contribute, do keep us posted if you would like early feedback! All contributions are welcome.
Activity
MichalStrehovsky commentedon Jul 7, 2016
Thanks for the detailed bug report! The issue you're seeing affects all types referenced from a
typeof(Y)expression that are otherwise not constructed (there's nonew Y()in the program). The fix is inbound.MichalStrehovsky commentedon Jul 7, 2016
@wjk ResourceManager is a big beast with a lot of challenges. If you would like to contribute, do keep us posted if you would like early feedback! All contributions are welcome.
jkotas commentedon Jul 7, 2016
cc @tarekgh since he has been looking into the resource manager before.