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

Fix to load dependent assembly from specified path #45

Merged
merged 1 commit into from
Mar 12, 2023

Conversation

leyarx
Copy link
Contributor

@leyarx leyarx commented Mar 11, 2023

Purpose

Small fix to enable loading dependent assemblies from specified path

Description

Fixed ArgumentOutOfRangeException from .Substring() by checking length parameter
- in case when we are running .IndexOf(',') on already stripped from commas "NameOfYourAddInDll"
Added check to skip searching for the assembly if assembly with specified name is already loaded
- in case when AssemblyResolve tries to find "NameOfYourAddInDll.resources" and ".resources" is stripped from the name
Fixed return value from ShowDialog() to return true after closing with Ok button
Removed confusing (duplicated) ShowWarning() when the dependent assembly can't be loaded

Declarations

Check these if you believe they are true

  • This PR fix bug
  • This PR for new feature
  • The codebase is in a better state after this PR
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • Snapshot of UI changes, if any.
  • This PR modifies some build requirements and the readme is updated

Reviewers

@chuongmep

FYIs

Fixed ArgumentOutOfRangeException from .Substring() by checking length parameter
	- in case when we are running .IndexOf(',') on already stripped from commas "NameOfYourAddInDll"
Added check to skip searching for the assembly if assembly with specified name is already loaded
	- in case when AssemblyResolve tries to find "NameOfYourAddInDll.resources" and ".resources" is stripped from the name
Fixed return value from ShowDialog() to return true after closing with Ok button
Removed confusing (duplicated) ShowWarning() when the dependent assembly can't be loaded
@chuongmep
Copy link
Owner

@leyarx Good catch ! Thank you so much for contribute.

@chuongmep chuongmep merged commit 21cd6b4 into chuongmep:dev Mar 12, 2023
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.

None yet

2 participants