Sitelet https://github.com/fsprojects/Paket/issues/1552
Skip to content

Inconsistent condition generation  #1552

Description

@sergey-tihon

Almost each time when I call paket.exe install it change my paket.lock file from

CommonServiceLocator (1.3) - framework: >= net40, monoandroid, portable-net45+wp80+wpa81+win+MonoAndroid10+xamarinios10, xamarinios, winv4.5, winv4.5.1, wpv8.1, wpv8.0, sl50

to

CommonServiceLocator (1.3) - framework: >= net40, monoandroid, portable-net45+wp80+wpa81+win+MonoAndroid10+xamarinios10, xamarinios, winv4.5, wpv8.0, sl50

and vise versa.

What actually change most of my csproj files from

When Condition="($(TargetFrameworkIdentifier) == 'WindowsPhoneApp') Or ($(TargetFrameworkIdentifier) == '.NETCore') Or ($(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')) Or ($(TargetFrameworkIdentifier) == 'Silverlight' And $(TargetFrameworkVersion) == 'v5.0') Or ($(TargetFrameworkIdentifier) == 'WindowsPhone' And $(TargetFrameworkVersion) == 'v8.0') Or ($(TargetFrameworkIdentifier) == 'MonoAndroid') Or ($(TargetFrameworkIdentifier) == 'Xamarin.iOS') Or ($(TargetFrameworkProfile) == 'Profile5') Or ($(TargetFrameworkProfile) == 'Profile6') Or ($(TargetFrameworkProfile) == 'Profile7') Or ($(TargetFrameworkProfile) == 'Profile14') Or ($(TargetFrameworkProfile) == 'Profile19') Or ($(TargetFrameworkProfile) == 'Profile24') Or ($(TargetFrameworkProfile) == 'Profile31') Or ($(TargetFrameworkProfile) == 'Profile32') Or ($(TargetFrameworkProfile) == 'Profile37') Or ($(TargetFrameworkProfile) == 'Profile42') Or ($(TargetFrameworkProfile) == 'Profile44') Or ($(TargetFrameworkProfile) == 'Profile47') Or ($(TargetFrameworkProfile) == 'Profile49') Or ($(TargetFrameworkProfile) == 'Profile78') Or ($(TargetFrameworkProfile) == 'Profile84') Or ($(TargetFrameworkProfile) == 'Profile92') Or ($(TargetFrameworkProfile) == 'Profile102') Or ($(TargetFrameworkProfile) == 'Profile111') Or ($(TargetFrameworkProfile) == 'Profile136') Or ($(TargetFrameworkProfile) == 'Profile147') Or ($(TargetFrameworkProfile) == 'Profile151') Or ($(TargetFrameworkProfile) == 'Profile157') Or ($(TargetFrameworkProfile) == 'Profile158') Or ($(TargetFrameworkProfile) == 'Profile225') Or ($(TargetFrameworkProfile) == 'Profile240') Or ($(TargetFrameworkProfile) == 'Profile255') Or ($(TargetFrameworkProfile) == 'Profile259') Or ($(TargetFrameworkProfile) == 'Profile328') Or ($(TargetFrameworkProfile) == 'Profile336') Or ($(TargetFrameworkProfile) == 'Profile344')"

to

When Condition="($(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')) Or ($(TargetFrameworkIdentifier) == '.NETCore' And $(TargetFrameworkVersion) == 'v4.5') Or ($(TargetFrameworkIdentifier) == 'Silverlight' And $(TargetFrameworkVersion) == 'v5.0') Or ($(TargetFrameworkIdentifier) == 'WindowsPhone' And $(TargetFrameworkVersion) == 'v8.0') Or ($(TargetFrameworkIdentifier) == 'MonoAndroid') Or ($(TargetFrameworkIdentifier) == 'Xamarin.iOS') Or ($(TargetFrameworkProfile) == 'Profile5') Or ($(TargetFrameworkProfile) == 'Profile6') Or ($(TargetFrameworkProfile) == 'Profile7') Or ($(TargetFrameworkProfile) == 'Profile14') Or ($(TargetFrameworkProfile) == 'Profile19') Or ($(TargetFrameworkProfile) == 'Profile24') Or ($(TargetFrameworkProfile) == 'Profile31') Or ($(TargetFrameworkProfile) == 'Profile32') Or ($(TargetFrameworkProfile) == 'Profile37') Or ($(TargetFrameworkProfile) == 'Profile42') Or ($(TargetFrameworkProfile) == 'Profile44') Or ($(TargetFrameworkProfile) == 'Profile47') Or ($(TargetFrameworkProfile) == 'Profile49') Or ($(TargetFrameworkProfile) == 'Profile78') Or ($(TargetFrameworkProfile) == 'Profile84') Or ($(TargetFrameworkProfile) == 'Profile92') Or ($(TargetFrameworkProfile) == 'Profile102') Or ($(TargetFrameworkProfile) == 'Profile111') Or ($(TargetFrameworkProfile) == 'Profile136') Or ($(TargetFrameworkProfile) == 'Profile147') Or ($(TargetFrameworkProfile) == 'Profile151') Or ($(TargetFrameworkProfile) == 'Profile157') Or ($(TargetFrameworkProfile) == 'Profile158') Or ($(TargetFrameworkProfile) == 'Profile225') Or ($(TargetFrameworkProfile) == 'Profile240') Or ($(TargetFrameworkProfile) == 'Profile255') Or ($(TargetFrameworkProfile) == 'Profile259') Or ($(TargetFrameworkProfile) == 'Profile328') Or ($(TargetFrameworkProfile) == 'Profile336') Or ($(TargetFrameworkProfile) == 'Profile344')"

and vise versa.

It's annoying. Why this happens?

my paket.dependencies file

source https://nuget.org/api/v2

nuget CommandLineParser
nuget DocumentFormat.OpenXml
nuget DotNetZip
nuget MahApps.Metro 1.1.2
nuget MahApps.Metro.Resources 0.4.0
nuget Microsoft.Composition
nuget MvvmLightLibs
nuget NLog
nuget SharpShell
nuget WpfAnimatedGif
nuget squirrel.windows
nuget TaskScheduler

group Build
    source https://nuget.org/api/v2
    nuget FAKE

group Test
    source https://nuget.org/api/v2
    nuget NUnit
    nuget NUnit.Console

My paket.lock file:

NUGET
  remote: https://www.nuget.org/api/v2
  specs:
    CommandLineParser (1.9.71)
    CommonServiceLocator (1.3) - framework: >= net40, monoandroid, portable-net45+wp80+wpa81+win+MonoAndroid10+xamarinios10, xamarinios, winv4.5, wpv8.0, sl50
    DeltaCompressionDotNet (1.0.0)
    DocumentFormat.OpenXml (2.5)
    DotNetZip (1.9.8)
    MahApps.Metro (1.1.2)
    MahApps.Metro.Resources (0.4.0)
      MahApps.Metro (>= 1.0.0)
    Microsoft.Composition (1.0.30)
    Mono.Cecil (0.9.6.1)
    MvvmLightLibs (5.2.0)
      CommonServiceLocator (>= 1.0) - framework: net35, sl40
      CommonServiceLocator (>= 1.3) - framework: >= net40, monoandroid, portable-net45+wp80+wpa81+win+MonoAndroid10+xamarinios10, xamarinios, winv4.5, wpv8.0, sl50
    NLog (4.2.3)
    SharpShell (2.2.0)
    Splat (1.6.2)
    squirrel.windows (1.2.5)
      DeltaCompressionDotNet (>= 1.0.0)
      Mono.Cecil (>= 0.9.6.1)
      Splat (>= 1.6.2)
    TaskScheduler (2.5.16)
    WpfAnimatedGif (1.4.14)

GROUP Build
NUGET
  remote: https://www.nuget.org/api/v2
  specs:
    FAKE (4.22.6)

GROUP Test
NUGET
  remote: https://www.nuget.org/api/v2
  specs:
    NUnit (3.2.0)
    NUnit.Console (3.2.0.1)
      NUnit.ConsoleRunner (3.2.0)
      NUnit.Extension.NUnitProjectLoader (3.2.0)
      NUnit.Extension.NUnitV2Driver (3.2.0)
      NUnit.Extension.NUnitV2ResultWriter (3.2.0)
      NUnit.Extension.VSProjectLoader (3.2.0)
    NUnit.ConsoleRunner (3.2.0)
    NUnit.Extension.NUnitProjectLoader (3.2.0)
    NUnit.Extension.NUnitV2Driver (3.2.0)
    NUnit.Extension.NUnitV2ResultWriter (3.2.0)
    NUnit.Extension.VSProjectLoader (3.2.0)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions