question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid ruleset resource store returned on a dynamically-compiled assembly

See original GitHub issue

https://github.com/ppy/osu/blob/c3036c1d457adca48ce4c0a5c6c2262195f35ce3/osu.Game/Rulesets/Ruleset.cs#L164 Due to GetType().Assembly returning the dynamic assembly instead of the original one, which a DllResourceStore will not be able to read from (assembly.GetManifestResourceNames() is empty and assembly.GetManifestResourceStream(...) returns null)

It’s kind-of incorrect that the dynamic compilation will not include the resources from the original assembly, tried googling it up but got nowhere so opening as an issue with an actual case for now.

cc @smoogipoo

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
bdachcommented, Jun 7, 2020

CSharpCompilation.Emit can accept an IEnumerable<ResourceDescription> that could be used in this case to embed the resources. Not sure yet how to get the list of all embedded resources in a project, though.

0reactions
smoogipoocommented, Jun 8, 2020

Ah, I guess there’s no other reference to DrawableRushRuleset other than through RushRuleset in that case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Assembly.LoadFrom Method (System.Reflection)
The assemblyFile parameter must refer to a URI without escape characters. This method supplies escape characters for all invalid characters in the URI....
Read more >
chrome.declarativeNetRequest - Chrome Developers
This key is an array containing dictionaries of type Ruleset , as shown below. ... Dynamic rules persist across browser sessions and extension...
Read more >
The 10 Most Common Mistakes in C# Programming
Don't fall into one of these C# programming mistakes that even savvy developers can find problematic. Read on to see all 10.
Read more >
C++ Core Guidelines
The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++.
Read more >
JNI tips - NDK
JNI is vendor-neutral, has support for loading code from dynamic shared ... on after the native method returns, the reference is not valid....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found