dependabot / dependabot/dependabot-core

Specify Target Framework for .NET libraries

Open
#2,733 18 comments 29 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Keep L: dotnet:nuget T: feature-request
Dominant language
Ruby
Stars
5.8k
Forks
1.5k
Avg merge
2d 13h
Merged PRs (30d)
151

Description

Having this .csproj in my .NET library will try to update the dependencies that target netstandard2.0, which I don't want to do because then the library would lose back-compat with older versions of AspNetCore.

<ItemGroup Condition="$(TargetFramework) == 'netstandard2.0'">
    <PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
    <PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="2.2.0" />
    <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.2.0" />
    <PackageReference Include="Microsoft.Extensions.Options" Version="2.2.0" />
    <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
  
<ItemGroup Condition="$(TargetFramework) == 'netcoreapp3.1'">
    <PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="3.1.9" />
    <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.9" />
    <PackageReference Include="Microsoft.Extensions.Options" Version="3.1.9" />
    <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>

It would be really helpful if there was a way to tell dependabot to only look for and update the dependencies in the netcoreapp3.1 target framework.
Is there a way to achieve this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the dependency update behavior with the .csproj example and its netstandard2.0 and netcoreapp3.1 target frameworks. Trace Dependabot's .NET dependency handling to determine where target-framework filtering belongs; done means dependencies are updated only for netcoreapp3.1 without changing the netstandard2.0 versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.