Consider removing the `Microsoft.Build` package dependency, and the `TargetGraph` class.
See original GitHub issueThe StructuredLogger.MSBuild package depends on Microsoft.Build which is incompatible with .NET Standard 2.0 (“works” via the compatibility shim), weighs almost 4MB and brings quite many dependencies. It would be nice if we stopped depending on it.
Fortunately the only place where it is used is in TargetGraph, a class with relatively simple logic that is nowhere else used in this repro. Depending on your assessment of its importance and your appetite for breaking changes, we can:
- Just remove it.
- Obsolete it and remove it after a couple months/releases.
- Do nothing.
(and thank you very much for this project, it has allowed me to pierce inside dotnet build’s inner workings and helped me do lots of stuff with MSBuild!)
Issue Analytics
- State:
- Created 8 months ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
NuGet Package Dependency Resolution
The Direct dependency wins rule can result in a downgrade of the package version, thus potentially breaking other dependencies in the graph.
Read more >Manage package dependencies in .NET - .NET CLI
This article explains how to add and remove package dependencies by editing the project file or by using the CLI.
Read more >How to: Create and remove project dependencies - Visual ...
To remove dependencies from projects ... On the Project menu, choose Project Dependencies. The Project Dependencies dialog box opens. On the ...
Read more >PackageReference in project files - NuGet
Package references, using <PackageReference> MSBuild items, specify NuGet package dependencies directly within project files, as opposed to ...
Read more >NuGet pack and restore as MSBuild targets
To suppress package dependencies from generated NuGet package, set SuppressDependenciesWhenPacking to true which will allow skipping all the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Cool, I have disabled TargetGraph.cs in this commit: https://github.com/KirillOsenkov/MSBuildStructuredLog/commit/f1a8e8b5fdaa8170a8818e47984ca01e2f06401a
Now you can remove Microsoft.Build too:
@teo-tsirpanis thanks!
Published https://www.nuget.org/packages/MSBuild.StructuredLogger/2.1.768