Skip to content

Regression in 5.2.x - References Conditions updated #2464

Closed

Description

@JohnDev

Description

Since the version 5.2, the conditions to choose the good reference has change.

Before : net35\Cassette.dll was used only for frawework 3.5.
Now : For all target framework :(

-    <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v3.5'">
+    <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v3.5' Or $(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.0.3' 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 $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3' Or $(TargetFrameworkVersion) == 'v4.7')">
       <ItemGroup>
         <Reference Include="Cassette">
           <HintPath>..\packages\Cassette\lib\net35\Cassette.dll</HintPath>
           <Private>True</Private>
           <Paket>True</Paket>
         </Reference>
       </ItemGroup>
     </When>
-    <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.0.3' 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 $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3' Or $(TargetFrameworkVersion) == 'v4.7')">
-      <ItemGroup>
-        <Reference Include="Cassette">
-          <HintPath>..\packages\Cassette\lib\net40-client\Cassette.dll</HintPath>
-          <Private>True</Private>
-          <Paket>True</Paket>
-        </Reference>
-      </ItemGroup>
-    </When>

Activity

  1. forki commented on Jun 26, 2017

    @forki
    Member

    @matthid urgs another one with client profile

  2. matthid commented on Jun 26, 2017

    @matthid
    Member

    Oh yeah its because we punish 40-client now and that makes paket prefer the net35 version :/

    This penalty code needs some cleanup badly...

  3. optical commented on Jun 27, 2017

    @optical

    I believe I've hit this issue too. We have a project targeting Full framework 4.5 which transitively depends on Microsoft.Bcl.

    In 5.2.1 Paket would not include references to System.IO, System.Runtime and System.Threading.Tasks, however 5.2.2 and 5.2.3 currently do. This causes the build to fail since the framework already includes references to those assemblies. Heres a gist with the csproj and relevant files. https://gist.github.com/optical/102a08bd9fd71684195a6e3285b7ab8c

    Have had to alter our build system to pin paket versions now, previously we were using the latest version available.

  4. optical commented on Jun 27, 2017

    @optical

    Actually, given that 5.2.2 came out after this issue was logged, my case must be a separate regression. I'll split this off into its own case. Sorry! (#2469)

  5. added a commit that references this issue on Jul 9, 2017
    b4f4431
  6. matthid commented on Jul 9, 2017

    @matthid
    Member

    Fix in #2498

  7. JohnDev commented on Jul 12, 2017

    @JohnDev
    Author

    Thx for the fix, it's working now ;)

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