-
Notifications
You must be signed in to change notification settings - Fork 128
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
When linker removes all references to an assembly the assembly ref is not removed #1296
Comments
Could you attach the assembly? The illinker removes assembly references in such cases automatically so it's likely there is still some reference to System.Diagnostics.Process somewhere (e.g. in attribute) |
Here you go This came from the 5.0.0-preview.6.20305.6 win-x64 shared framework. Here's the disassembly that shows no references to S.D.Process: https://gist.github.com/ericstj/a73b7511a968d5adb45186e93ef5a166 I can also reproduce by building the System.Diagnostics.TraceSource library in dotnet/runtime, which runs the linker as a post-build step. |
@marek-safar did you get a chance to look at this? |
The previous logic only removed assembly reference for linked assembly if the reference didn't exist in the closure of input assemblies. This was wrong because it kept unused references in one assembly if the another assembly used same reference. Fixes dotnet#1296 Fixes dotnet#1576
The previous logic only removed assembly reference for linked assembly if the reference didn't exist in the closure of input assemblies. This was wrong because it kept unused references in one assembly if the another assembly used same reference. Fixes dotnet#1296 Fixes dotnet#1576
The previous logic only removed assembly reference for linked assembly if the reference didn't exist in the closure of input assemblies. This was wrong because it kept unused references in one assembly if the another assembly used same reference. Fixes dotnet#1296 Fixes dotnet#1576
The previous logic only removed assembly reference for linked assembly if the reference didn't exist in the closure of input assemblies. This was wrong because it kept unused references in one assembly if the another assembly used same reference. Fixes dotnet#1296 Fixes dotnet#1576
The previous logic only removed assembly reference for linked assembly if the reference didn't exist in the closure of input assemblies. This was wrong because it kept unused references in one assembly if the another assembly used same reference. Fixes dotnet#1296 Fixes dotnet#1576
The previous logic only removed assembly reference for linked assembly if the reference didn't exist in the closure of input assemblies. This was wrong because it kept unused references in one assembly if the another assembly used same reference. Fixes dotnet#1296 Fixes dotnet#1576
I noticed this when looking at the trimmed assemblies in the .NETCore shared framework.
The assembly System.Diagnostics.TraceSource had a reference to System.Diagnostics.Process in one place which was unreachable and trimmed by the linker, however the assembly ref to System.Diagnostics.Process remains.
Some tools will see this and still try to load Process, the linker should remove this if possible.
The text was updated successfully, but these errors were encountered: