-
Notifications
You must be signed in to change notification settings - Fork 99
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
Install netfx dlls to GAC for tests #2164
Install netfx dlls to GAC for tests #2164
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RassK What do you think about providing an uninstall target? It seems useful during development. While we don't need it in CI it helps keep the dev box clean.
Co-authored-by: Paulo Janotti <pjanotti@splunk.com>
I really wanted to implement it but I think it's not that straightforward. I'm a bit afraid to remove something that overlaps and breaks other applications. To fix that I would need to save a state that tracks what's new and could be removed... although even this is valid only short time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we should update documentation that instrumenting .NET Fx stuff on Windows requires GAC update (done by psm1 file).
I do not think that it is obvious https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/docs/README.md?plain=1#L79-L211
@@ -177,4 +179,20 @@ partial class Build | |||
|
|||
AssemblyRedirectionSourceGenerator.Generate(netFxAssembliesFolder, generatedSourceFile); | |||
}); | |||
|
|||
Target InstallNetFxAssembliesGAC => _ => _ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I execute nuke
or nuke Workflow
with elevated privileges it will overwrite GAC,
It will be great to have reverse step included into it, or at least provide easy way to remove all this files.
I think nuke Workflow CleanupGAC
execution form is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to have it as part of nuke
or nuke Workflow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are 2 ways which might work according to your own risk.
- Add CleanupGAC to the workflow and a warning to use it on your own risk or skip the step.
- Add CleanupGAC as a non referenced step. You need to run it yourself manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably point 2 is better/safer after all you said 😉
Make it could somehow part of nuke Cleanup
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added UninstallNetFxAssembliesGAC
also.
Clean
is unfortunately way too early, tracer-home
may not be present or in an outdated state.
@pjanotti was testing it and it will not remove the assemblies from GAC that were added by MSIs. See #1906 (comment) |
Unfortunately there is no knowledge how different libs were added. It might work for CI or isolated work environment but general development machines (used for multiple projects) could be affected by removal. |
…om/RassK/opentelemetry-dotnet-instrumentation into netfx-install-gac-integrationtests
Why
Fixes #2155
What
Installs
tracer-home/netfx
dlls to GAC before running integration tests.Tests
Existing.
Checklist