Versions in project.assets.json are different between restore and build
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
I set Fsharp.Core to version ~> 4.7.0 in paket.dependencies file inside group webapi and referenced that group in paket.references file inside project as below:
paket.dependencies:
source https://www.nuget.org/api/v2
source https://api.nuget.org/v3/index.json
storage: none
nuget Argu 6.0
nuget FSharp.Core 4.3.4
nuget Expecto 8.13.1
nuget YoloDev.Expecto.TestSdk 0.8.0
nuget Microsoft.NET.Test.Sdk 15.7.2
nuget altcover ~> 6
nuget Packaging.Targets 0.1.155
group webapi
storage: none
source https://www.nuget.org/api/v2
source https://api.nuget.org/v3/index.json
nuget FSharp.Core ~> 4.7.0
// [ FAKE GROUP ]
group Build
storage: none
source https://www.nuget.org/api/v2
source https://api.nuget.org/v3/index.json
nuget Argu
nuget Fake.IO.FileSystem 5.19.0
nuget Fake.Core.Target 5.19.0
nuget Fake.Core.ReleaseNotes 5.19.0
nuget FAKE.Core.Environment 5.19.0
nuget Fake.DotNet.Cli 5.19.0
nuget FAKE.Core.Process 5.19.0
nuget Fake.DotNet.AssemblyInfoFile 5.19.0
nuget Fake.Tools.Git 5.19.0
nuget Fake.DotNet.Paket 5.19.0
nuget Fake.Api.GitHub 5.19.0
nuget Fake.BuildServer.AppVeyor 5.19.0
nuget Fake.BuildServer.Travis 5.19.0
nuget Fantomas
group Analyzers
source https://www.nuget.org/api/v2
source https://api.nuget.org/v3/index.json
nuget BinaryDefense.FSharp.Analyzers.Hashing 0.1.0
paket.references:
group webapi
Fsharp.Core
after running dotnet restore project.assets.json contains fsharp.core version 4.7.0 but next after running dotnet build project.assets.json contains fsharp.core version 4.7.1 - why is this happening despite paket's specifying version 4.7.1 in paket.lock file? Moreover opening solution with this project in visual studio 2019 restores fsharp.core with version 4.7.1 without building solution - why?
Repro steps
Please provide the steps required to reproduce the problem
-
Set example repo from template from https://github.com/TheAngryByrd/MiniScaffold
-
add project webapi inside src folder by running cmd dotnet new webapi -lang f# -n webapi
-
add group webapi to paket.dependencies as:
group webapi
storage: none
source https://www.nuget.org/api/v2
source https://api.nuget.org/v3/index.json
nuget FSharp.Core ~> 4.7.0
- add paket.references file inside webapi project as:
group webapi
Fsharp.Core
-
run dotnet paket install
-
run dotnet restore
-
examine project.assets.json in webapi's project obj folder
-
run dotnet bulid
-
examine project.assets.json in webapi's project obj folder
Expected behavior
project.assets.json should contain fsharp.core version 4.7.1 after dotnet restore and after dotnet build
Actual behavior
project.assets.json contains fsharp.core version 4.7.0 after dotnet restore and 4.7.1 after dotnet build
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 reproduced project and compare project.assets.json after dotnet restore and dotnet build. Read the paket.dependencies and paket.references group configuration, then check how Visual Studio 2019 restores the project. Done means the FSharp.Core version is consistent across restore, build, and solution opening, with the behavior covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100