-
Notifications
You must be signed in to change notification settings - Fork 420
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
Host dependency cleanup #2436
Merged
Merged
Host dependency cleanup #2436
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Today, we delete a a few dlls in the cake packaging scripts, to remove DLLs that should come from the runtime we're loaded with, rather than the dlls we built with. This is fine for packaging, but is annoying when doing local tests by just rebuilding the relevant driver, because you have to remember to go into the output directly and delete them every time. I addressed this by removing the dlls in msbuild itself: * System.Configuration.ConfigurationManager: this was a transitive dependency through Microsoft.CodeAnalysis.Features -> Microsoft.CodeAnalysis.Elfie. We don't need Elfie or its dependencies, so I made all references to these layers explicit and turned off flowing of transitive dependencies. This does cause a slight issue: one of those transitive dependencies is System.Text.Json 6.0, while OmniSharp.MSBuild transitively references 5.0. To ensure the appropriate binding redirects are still generated, I added an explicit reference to System.Text.Json, but we are not using that reference for anything else. * Nuget.*.dll: these are real dependencies that we should not ship in .NET 6+. I added a target to remove that version from the list of files to be copied.
333fred
commented
Aug 20, 2022
JoeRobich
reviewed
Aug 22, 2022
@@ -11,6 +11,7 @@ | |||
<!-- Always run on the latest runtime installed. --> | |||
<RuntimeFrameworkVersion>6.0.0-preview.7.21317.1</RuntimeFrameworkVersion> | |||
<RollForward>LatestMajor</RollForward> | |||
<SkipHostDlls>true</SkipHostDlls> |
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.
We weren't removing these libraries from the Full Framework builds. Should this be conditioned by TFM?
This looks good to me, can we move it out of draft @333fred ? |
filipw
approved these changes
Sep 22, 2022
waf
added a commit
to waf/CSharpRepl
that referenced
this pull request
Nov 10, 2022
The NuGet.* libraries should not be bundled with csharprepl and we should instead use the ones included in the SDK. You can see other projects in the .NET community making similar fixes: microsoft/qsharp-compiler#1470 OmniSharp/omnisharp-roslyn#2308 OmniSharp/omnisharp-roslyn#2436 If we don't do this, we get issues with the MSBuildWorkspaces and MSBuildLocators unable to load the nuget libraries due to dependency conflicts. It mostly affects our "load solution" / "load project" features.
mattstern31
added a commit
to mattstern31/CSharp-Repl-Services
that referenced
this pull request
Nov 11, 2023
The NuGet.* libraries should not be bundled with csharprepl and we should instead use the ones included in the SDK. You can see other projects in the .NET community making similar fixes: microsoft/qsharp-compiler#1470 OmniSharp/omnisharp-roslyn#2308 OmniSharp/omnisharp-roslyn#2436 If we don't do this, we get issues with the MSBuildWorkspaces and MSBuildLocators unable to load the nuget libraries due to dependency conflicts. It mostly affects our "load solution" / "load project" features.
syedrizvinet
added a commit
to syedrizvinet/Repl-Tests-CSharp
that referenced
this pull request
Apr 24, 2024
The NuGet.* libraries should not be bundled with csharprepl and we should instead use the ones included in the SDK. You can see other projects in the .NET community making similar fixes: microsoft/qsharp-compiler#1470 OmniSharp/omnisharp-roslyn#2308 OmniSharp/omnisharp-roslyn#2436 If we don't do this, we get issues with the MSBuildWorkspaces and MSBuildLocators unable to load the nuget libraries due to dependency conflicts. It mostly affects our "load solution" / "load project" features.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Today, we delete a few dlls in the cake packaging scripts, to remove DLLs that should come from the runtime we're loaded with, rather than the dlls we built with. This is fine for packaging, but is annoying when doing local tests by just rebuilding the relevant driver, because you have to remember to go into the output directly and delete them every time. I addressed this by adding explicit packagereferences to the dlls in question and setting them to not keep any assets.