Paket installs packages for net5 but dependencies specifies framework netcoreapp3.1
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
I have an asp.net core app (netcore 3.1). I am trying to install packages with paket. I only want it to install the packages that are compatible with netcoreapp3.1 but it is installing the latest which only work with net5.0.
This causes the app to fail to build due to incompatibility with certain packages. I have tried to specify the version in my dependencies file but I have had to do this for 6 packages so far and I am afraid I will have to do this with tons of them.
Is there a way I can tell paket to only use packages compatible with netcoreapp3.1? Am I doing something wrong?
This is the dependencies file. The ones I have commented out were the packages I had to add explicitly with a version specified.
framework: netcoreapp3.1, netstandard2.0, netstandard2.1
source https://api.nuget.org/v3/index.json
storage: none
nuget FSharp.Core
nuget FSharp.Data
nuget FSharp.Data.SqlClient
nuget Saturn
nuget Giraffe
//https://github.com/serilog/serilog-aspnetcore
nuget Serilog.AspNetCore
nuget Serilog.Sinks.Console
nuget Serilog.Sinks.File
nuget AWS.Logger.AspNetCore
nuget AWS.Logger.SeriLog
nuget AWSSDK.SecretsManager
nuget Expecto
nuget Thoth.Json.Net
nuget Microsoft.NET.Test.Sdk
nuget Expecto.FsCheck
nuget Expecto.TestResults
nuget SendGrid
nuget TaskBuilder.fs
nuget System.Configuration.ConfigurationManager
//nuget Microsoft.Extensions.Configuration.UserSecrets
//nuget Microsoft.VisualStudio.Web.CodeGeneration.Design
//nuget Microsoft.VisualStudio.Web.CodeGeneration
nuget Otp.NET
//nuget Microsoft.AspNetCore.Authentication.JwtBearer < 5.0
//nuget Microsoft.VisualStudio.Web.CodeGenerators.Mvc < 5.0
//nuget Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore < 5.0
//nuget Microsoft.VisualStudio.Web.CodeGeneration.Core < 5.0
//nuget Microsoft.VisualStudio.Web.CodeGeneration.Templating < 5.0
//nuget Microsoft.VisualStudio.Web.CodeGeneration.Design < 5.0
//nuget Microsoft.VisualStudio.Web.CodeGeneration < 5.0
//nuget Microsoft.VisualStudio.Web.CodeGeneration.Utils < 5.0
group Build
source https://api.nuget.org/v3/index.json
framework: netstandard2.0
nuget AWSSDK.SecretsManager
nuget FSharp.Core = 4.5.0 // https://github.com/fsharp/FAKE/issues/2001
nuget Fake.Core.Target
nuget Fake.DotNet.Cli
nuget Fake.IO.FileSystem
nuget Fake.Core.Environment
nuget Fake.Core.Trace
nuget Fake.IO.Zip
nuget NuGet.CommandLine
This is an example of the error I get:
C:\Users\marnee\Documents\mister\application\mister-admin\src\WebHost\WebHost.fsproj : error NU1202: Package Microsoft.AspNetCore.Authentication.JwtBearer 5.0.1 is not compatible with netcoreapp3.1
Project file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
:
:
Paket version:
marnee@DESKTOP-R85TMON C:\Users\marnee\Documents\mister\application\mister-admin
$ dotnet paket --version
Paket version 5.257.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied dependencies file and WebHost.fsproj, then reproduce the resolution with Paket 5.257.0 using the netcoreapp3.1 target and the listed packages. Trace how the framework declarations affect selected package versions; done means resolution no longer selects packages that produce the reported NU1202 incompatibility.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100