Skip to content
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

Handle possible problem with assembly.GetName() call made for all as… #8076

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

van800
Copy link

@van800 van800 commented Jun 2, 2024

…semblies in the appdomain

The issue was submitted to https://youtrack.jetbrains.com/issue/RIDER-112939.

Here are some of the common reasons why Assembly.GetName() could fail:

  • Assembly is not Loaded Properly: If the assembly has not been loaded correctly into the application domain, attempting to get its name might result in an error. This could happen if there’s an issue with the assembly's path or if the assembly file is corrupted.
  • Code Access Security: If the code does not have the required permissions to access assembly information, Assembly.GetName() can throw a SecurityException. This is more common in environments with restricted permissions, like sandboxed environments or certain enterprise settings.
  • File Not Found: If the method attempts to load the assembly for getting the name and the assembly file is not found, it can throw a FileNotFoundException. This could occur in dynamically loaded assemblies where the path or reference is incorrect.
  • Bad Image Format Exception: If the assembly is not a valid .NET assembly or is corrupted, a BadImageFormatException may be thrown. This might happen if the assembly was built for a different architecture (e.g., x86 versus x64) or if the file is not an assembly at all.
  • IO Exceptions: General IO exceptions can occur if there are issues with reading the file from disk, such as hardware errors, lack of file access permissions, or if the disk is full.

If GetName call fails it is most likely not the GraphView assembly.

@van800 van800 requested a review from a team as a code owner June 2, 2024 08:34
@memphis88 memphis88 requested review from a team as code owners August 13, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant