dotnet publish multi-targeting inferring incorrect versioning
See original GitHub issueDescription
I update FsToolkit.ErrorHandling from paket 6.2.1 to 7.1.5 (i’ve tried the alpha and as far down as 7.0) and there seems to be change with how multi-targeting works and having different versions for each.
Previously with 6.2.1
with a project a project with two TFMs <TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
and two groups with different conditions
group NetStandard2
source https://api.nuget.org/v3/index.json
nuget FSharp.Core 4.7.2
nuget Ply
nuget Hopac
nuget FSharp.Control.AsyncSeq
nuget Expecto
nuget Expecto.Hopac
nuget Microsoft.NET.Test.Sdk
nuget YoloDev.Expecto.TestSdk
nuget Fable.Mocha 2.12.0
framework: netstandard2.0, net5.0
storage: none
condition: netstandard2_0
group NetStandard2_1
source https://api.nuget.org/v3/index.json
nuget FSharp.Core 6.0.3
nuget Hopac
nuget FSharp.Control.AsyncSeq
nuget Expecto
nuget Expecto.Hopac
nuget Microsoft.NET.Test.Sdk
nuget YoloDev.Expecto.TestSdk
nuget Fable.Mocha 2.12.0
nuget IcedTasks
storage: none
condition: netstandard2_1
I would get a nuspec file like:
<dependencies>
<group targetFramework=".NETStandard2.0">
<dependency id="FSharp.Core" version="4.7.2" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETStandard2.1">
<dependency id="FSharp.Core" version="6.0.3" exclude="Build,Analyzers" />
</group>
</dependencies>
However after updating to 7.1.5 my nuspec file looks like:
group NetStandard2
source https://api.nuget.org/v3/index.json
nuget FSharp.Core >= 4.7.2
nuget Ply
nuget Hopac
nuget FSharp.Control.AsyncSeq
nuget Expecto
nuget Expecto.Hopac
nuget Microsoft.NET.Test.Sdk
nuget YoloDev.Expecto.TestSdk
nuget Fable.Mocha
nuget Fable.Core >= 4.0.0-theta-006
framework: netstandard2.0, net6.0
storage: none
condition: netstandard2_0
group NetStandard2_1
source https://api.nuget.org/v3/index.json
nuget FSharp.Core >= 7.0.0
nuget Hopac
nuget FSharp.Control.AsyncSeq
nuget Expecto
nuget Expecto.Hopac
nuget Microsoft.NET.Test.Sdk
nuget YoloDev.Expecto.TestSdk
nuget Fable.Mocha
nuget Fable.Core >= 4.0.0-theta-006
nuget IcedTasks >= 0.3.0
framework: netstandard2.1, net7.0
storage: none
condition: netstandard2_1
<dependencies>
<group targetFramework=".NETStandard2.0">
<dependency id="FSharp.Core" version="4.7.2" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETStandard2.1">
<dependency id="FSharp.Core" version="4.7.2" exclude="Build,Analyzers" />
</group>
</dependencies>
Repro steps
Please provide the steps required to reproduce the problem
-
Step A
-
Step B
If possible then please create a git repository with a repro sample or attach a zip to the issue.
Expected behavior
Please provide a description of the behavior you expect.
Actual behavior
Please provide a description of the actual behavior you observe.
Known workarounds
Please provide a description of any known workarounds.
Issue Analytics
- State:
- Created 10 months ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top GitHub Comments
The changes in https://github.com/fsprojects/Paket/pull/3838 are what broke multi-targeting
Looks good to me!