Skip to content

Remove unnecessary dependencies. #3853

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

Merged
merged 2 commits into from
Jun 10, 2025
Merged

Conversation

teo-tsirpanis
Copy link
Contributor

Description

This PR removes two unnecessary dependencies from non-shipping projects. In one case the dependency was entirely removed, and in the other it was restricted only to .NET Standard 2.0.

Motivation and Context

When building with the .NET 10 SDK, I am getting NU1510 warnings-as-errors because of unnecessary dependencies.

Testing

N/A

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

Fixes restoring on .NET 10 SDK Preview.
@dscpinheiro dscpinheiro changed the base branch from main to development June 2, 2025 16:47
@GarrettBeatty
Copy link
Contributor

GarrettBeatty commented Jun 4, 2025

the change seems fine. i will run it through our internal build/test system tomorrow.

Edit: Dry-run build id 4c328e0e-ae43-4fa0-9cd8-9935d9d05efa

@GarrettBeatty
Copy link
Contributor

'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create' [C:\codebuild\tmp\output\src285303003\src\aws-sdk-net\generator\ServiceClientGeneratorLib\ServiceClientGeneratorLib.csproj::TargetFramework=net45]


C:\codebuild\tmp\output\src285303003\src\aws-sdk-net\generator\ServiceClientGeneratorLib\ProjectFileCreator.cs(236,17): error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create' [C:\codebuild\tmp\output\src285303003\src\aws-sdk-net\generator\ServiceClientGeneratorLib\ServiceClientGeneratorLib.csproj::TargetFramework=net45]


  ServiceClientGeneratorLib -> C:\codebuild\tmp\output\src285303003\src\aws-sdk-net\generator\ServiceClientGeneratorLib\bin\Release\net8.0\ServiceClientGeneratorLib.dll



  AWSSDK.SmokeTests.NetFramework -> C:\codebuild\tmp\output\src285303003\src\aws-sdk-net\sdk\test\SmokeTests\bin\Release\net472\AWSSDK.SmokeTests.NetFramework.dll



  AWSSDK.IntegrationTests.NetFramework -> C:\codebuild\tmp\output\src285303003\src\aws-sdk-net\sdk\test\IntegrationTests\bin\Release\net472\AWSSDK.IntegrationTests.NetFramework.dll

Build FAILED.

C:\codebuild\tmp\output\src285303003\src\aws-sdk-net\generator\ServiceClientGeneratorLib\UnitTestProjectFileCreator.cs(241,17): error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create' [C:\codebuild\tmp\output\src285303003\src\aws-sdk-net\generator\ServiceClientGeneratorLib\ServiceClientGeneratorLib.csproj::TargetFramework=net45]

C:\codebuild\tmp\output\src285303003\src\aws-sdk-net\generator\ServiceClientGeneratorLib\ProjectFileCreator.cs(236,17): error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create' [C:\codebuild\tmp\output\src285303003\src\aws-sdk-net\generator\ServiceClientGeneratorLib\ServiceClientGeneratorLib.csproj::TargetFramework=net45]


    0 Warning(s)

    2 Error(s)

seems like removing this affects the net45 target framework.

@teo-tsirpanis
Copy link
Contributor Author

@GarrettBeatty fixed and verified locally.

@GarrettBeatty
Copy link
Contributor

@GarrettBeatty fixed and verified locally.

thanks ill rerun the tests in our system tomorrow

<PackageReference Include="Microsoft.CSharp" Version="4.4.1" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<Reference Include="Microsoft.CSharp" />
Copy link
Contributor

Choose a reason for hiding this comment

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

did we want to make this use the same version as above (4.4.1)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reference is provided by the framework, not a Nuget package.

@muhammad-othman
Copy link
Member

The PR looks good to me, will approve it after DRY_RUN-cc6a6789-65eb-4275-92fd-72cbd7b38819 passes.

Copy link
Member

@muhammad-othman muhammad-othman left a comment

Choose a reason for hiding this comment

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

DRY_RUN-cc6a6789-65eb-4275-92fd-72cbd7b38819 passed.

@boblodgett boblodgett removed their request for review June 10, 2025 17:30
@dscpinheiro dscpinheiro merged commit 174379c into aws:development Jun 10, 2025
2 checks passed
@teo-tsirpanis teo-tsirpanis deleted the rm-deps branch June 10, 2025 17:32
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.

4 participants