Skip to content

0.20.1 inserts wrong framework version condition into project files #486

Description

@vasily-kirichenko

I updated Paket to version 0.20.1 (was 0.18), then run paket update.

paket.lock (part of)

Fizzler (1.0.0)
  LinqBridge (>= 1.3.0) - >= net20 < net35
Fizzler.Systems.HtmlAgilityPack (1.0.0)
  Fizzler (>= 1.0.0) - >= net20, >= net35
  HtmlAgilityPack (>= 1.4.6) - >= net20, >= net35
  LinqBridge (>= 1.3.0) - >= net20 < net35

its changes:

image

A .NET 4.5 C# project with the following paket.references

AutoFixture
Castle.Core
Fizzler
Moq
NUnit
HtmlAgilityPack
Fizzler
Fizzler.Systems.HtmlAgilityPack

has been amended as following

<Choose>
-    <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v2.0'">
+    <When Condition="($(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v2.0' Or $(TargetFrameworkVersion) == 'v3.0' Or $(TargetFrameworkVersion) == 'v3.5' Or $(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3')) Or ($(TargetFrameworkIdentifier) == 'MonoAndroid') Or ($(TargetFrameworkIdentifier) == 'MonoTouch')">
       <ItemGroup>
         <Reference Include="LinqBridge">
           <HintPath>..\..\packages\LinqBridge\lib\net20\LinqBridge.dll</HintPath>
           <Private>True</Private>
           <Paket>True</Paket>
         </Reference>
       </ItemGroup>
     </When>
</Choose>

As a result LinqBridge is actually referenced and conflicting with System.Linq:

error CS0433: The type 'System.Linq.Enumerable' exists in both '...\packages\LinqBridge\lib\net20\LinqBridge.dll' and 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll'

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions