Skip to content

Clean-up unnecessary dependencies.#1316

Merged
ltrzesniewski merged 2 commits into
Fody:masterfrom
teo-tsirpanis:fix-deps
Jun 22, 2025
Merged

Clean-up unnecessary dependencies.#1316
ltrzesniewski merged 2 commits into
Fody:masterfrom
teo-tsirpanis:fix-deps

Conversation

@teo-tsirpanis

@teo-tsirpanis teo-tsirpanis commented Jun 21, 2025

Copy link
Copy Markdown
Contributor

You should already be a Patron

I am.

Guidance

If you are uncertain if the PR will be accepted, outline the proposal in an issue to confirm it is viable.

Even if the feature is a good idea and viable, it may not be accepted since the ongoing effort in maintaining the feature may outweigh the benefit it delivers.

Description

Building Fody.sln with the .NET 10 SDK causes the following warnings-turned-errors:

8>error NU1903: Warning As Error: Package 'Microsoft.Build.Tasks.Core' 17.11.4 has a known high severity vulnerability, https://github.com/advisories/GHSA-h4j7-5rxr-p4wc
11>C:\Users\teo\code\Fody\FodyHelpers.Tests\FodyHelpers.Tests.csproj : error NU1510: Warning As Error: PackageReference Microsoft.CSharp will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary.
12>C:\Users\teo\code\Fody\Tests\Tests.csproj : error NU1510: Warning As Error: PackageReference Microsoft.CSharp will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary.

The solution

  • The dependency to Microsoft.CSharp is not needed and was removed.
  • Instead of Microsoft.Build.Tasks.Core, we depend on Microsoft.Build.Utilities.Core, which is what we actually need and is not vulnerable.

Todos

  • Related issues
  • Tests
  • Documentation

* The dependency to `Microsoft.CSharp` is not needed and causes warnings-turned-errors in .NET 10 SDK.
* Instead of `Microsoft.Build.Tasks.Core`, we depend on `Framework` and `Utilities.Core`, which are not vulnerable.
Comment thread FodyTasks/FodyTasks.csproj Outdated

@ltrzesniewski ltrzesniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@ltrzesniewski

Copy link
Copy Markdown
Member

@tom-englert VSTS has issues with the DownloadBuildArtifacts task and windows-2019 is being deprecated, but this doesn't seem related to the PR.

@ltrzesniewski
ltrzesniewski merged commit bf12d52 into Fody:master Jun 22, 2025
7 of 10 checks passed
@teo-tsirpanis
teo-tsirpanis deleted the fix-deps branch June 22, 2025 16:28
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 this pull request may close these issues.

3 participants