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

Refactor RT to rely on assembly file path, not AssemblyName, for accuracy #83

Closed
stan-sz opened this issue Mar 4, 2024 · 1 comment · Fixed by #84
Closed

Refactor RT to rely on assembly file path, not AssemblyName, for accuracy #83

stan-sz opened this issue Mar 4, 2024 · 1 comment · Fixed by #84

Comments

@stan-sz
Copy link
Contributor

stan-sz commented Mar 4, 2024

There are cases where multiple referenced packages contain the same assembly (e.g. NewtonsoftJson.dll). Current implementation of RT causes all packages that contain the assembly to be marked as used, if the compiler reports this assembly as used. The idea is to refactor RT to rely on the actual file paths reported by the compiler and not translate them to assembly names.

stan-sz added a commit to stan-sz/ReferenceTrimmer that referenced this issue Mar 4, 2024
@dfederm
Copy link
Owner

dfederm commented Mar 5, 2024

multiple referenced packages contain the same assembly

This implies the packages themselves are badly formed, which is in itself a problem which should be fixed.

Also, how do they even get disambiguated in the first place? Is it deterministic?

@stan-sz stan-sz changed the title Refactor RT to rely on assembly file path, not AssemblyName, for accuract Refactor RT to rely on assembly file path, not AssemblyName, for accuracy Mar 5, 2024
dfederm pushed a commit that referenced this issue Mar 6, 2024
* Rely on file paths not assembly names

Fixed #83

* Switch to paths

* Fix for reference assemblies

* Add tests

* Fix

* bump minor version

* Fix GAC test case

* Update shared structure

* Rename to AssemblyPath

* code cleanup

* Feedback
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 a pull request may close this issue.

2 participants