Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
717 views
in Technique[技术] by (71.8m points)

f# - Share versions between Paket dependency groups?

In the examples for Paket dependency groups, there is often a "main" and "test" group:

source https://api.nuget.org/v3/index.json

storage: none
framework: netcoreapp3.1, netstandard2.1

nuget FSharp.Core
nuget FParsec



group test

  source https://api.nuget.org/v3/index.json

  nuget FSharp.Core
  nuget FParsec
  nuget xunit 2.4.1
  nuget FsUnit.xUnit 3.8.0

In order to use a dependency in both the library code and the test code, I can add it to both groups.

But is there a way to say "match the version of nuget FParsec in the test and the main groups"?

question from:https://stackoverflow.com/questions/65903844/share-versions-between-paket-dependency-groups

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I'm not sure - but what if you get rid of nuget FParsec from inside the test group and specify the one from the main group in paket.references?

paket.references

FParsec

group test
    xunit
    FsUnit.xUnit

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...