New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLite dependency not resolved for some .net versions with current version #1232

Closed
WebDucer opened this Issue Nov 17, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@WebDucer

WebDucer commented Nov 17, 2015

I use in my project paket in version 2.11.1. With this the project works fine. Today I wanted to update to the current paket version. After paket update I don't see SQLite library in my project anymore.

paket.dependencies

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

framework: >=net40

nuget A2LParser
nuget Prism.Wpf
nuget System.Data.SQLite content: none
nuget Unity
nuget GT.A2L.Base

# Tests
nuget NUnit
nuget Moq
nuget FluentAssertions

With paket version 2.11.1 the resolution in lock file:

...
    System.Data.SQLite (1.0.98.1) - content: none
      System.Data.SQLite.Core (>= 1.0.98.1) - framework: net20, net40, net45, net451, >= net46
      System.Data.SQLite.EF6 (>= 1.0.98.1) - framework: net40, net45, net451, >= net46
      System.Data.SQLite.Linq (>= 1.0.98.1) - framework: net20, net40, net45, net451, >= net46
    System.Data.SQLite.Core (1.0.98.1) - content: none, framework: net20, net40, net45, net451, >= net46
    System.Data.SQLite.EF6 (1.0.98.1) - content: none, framework: net40, net45, net451, >= net46
      EntityFramework (>= 6.0.0.0) - framework: net40, net45, net451, >= net46
    System.Data.SQLite.Linq (1.0.98.1) - content: none, framework: net20, net40, net45, net451, >= net46
...

With current paket version (2.25.6) I got a lot of error on the first paket updaterun:

...
 - CommonServiceLocator 1.3.0
 - System.Data.SQLite.Core 1.0.98.1
 - System.Data.SQLite.Linq 1.0.98.1
 - System.Data.SQLite.EF6 1.0.98.1
Error loading from cache for package 'System.Data.SQLite.EF6.1.0.98.1':
Newtonsoft.Json.JsonSerializationException: The number of field values does not match the number of properties definied by union 'PackageName'. Path 'Dependencies[0].Item1', line 1, position 77.
   bei Newtonsoft.Json.Converters.DiscriminatedUnionConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType, IDictionary`2& extensionData)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType, IDictionary`2& extensionData)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   bei Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   bei Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   bei Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   bei Paket.NuGet.getDetailsFromCacheOr$cont@50(PackageName packageName, SemVerInfo version, FSharpFunc`2 get, FileInfo cacheFile, Unit unitVar)
...

And second run is without errors.
The resolution in lock file:

...
    System.Data.SQLite (1.0.98.1) - content: none
      System.Data.SQLite.Core (>= 1.0.98.1) - framework: net20, >= net451
      System.Data.SQLite.EF6 (>= 1.0.98.1) - framework: >= net451
      System.Data.SQLite.Linq (>= 1.0.98.1) - framework: net20, >= net451
    System.Data.SQLite.Core (1.0.98.1) - content: none, framework: net20, >= net451
    System.Data.SQLite.EF6 (1.0.98.1) - content: none, framework: >= net451
      EntityFramework (>= 6.0.0.0) - framework: >= net451
    System.Data.SQLite.Linq (1.0.98.1) - content: none, framework: net20, >= net451
...

All projects are .Net 4.0 or 4.5. The project that uses SQLite libraries is .Net 4.5 project.

The project file is updated to the following for SQLite:

  <Choose>
    <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v2.0'">
      <ItemGroup>
        <Reference Include="System.Data.SQLite">
          <HintPath>..\packages\System.Data.SQLite.Core\lib\net20\System.Data.SQLite.dll</HintPath>
          <Private>True</Private>
          <Paket>True</Paket>
        </Reference>
      </ItemGroup>
    </When>
    <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6'">
      <ItemGroup>
        <Reference Include="System.Data.SQLite">
          <HintPath>..\packages\System.Data.SQLite.Core\lib\net46\System.Data.SQLite.dll</HintPath>
          <Private>True</Private>
          <Paket>True</Paket>
        </Reference>
      </ItemGroup>
    </When>
    <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3')">
      <ItemGroup>
        <Reference Include="System.Data.SQLite">
          <HintPath>..\packages\System.Data.SQLite.Core\lib\net451\System.Data.SQLite.dll</HintPath>
          <Private>True</Private>
          <Paket>True</Paket>
        </Reference>
      </ItemGroup>
    </When>
  </Choose>
@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Nov 17, 2015

Member

can you create aminimal repro which doesn't use your internal feed?

Member

forki commented Nov 17, 2015

can you create aminimal repro which doesn't use your internal feed?

@forki forki added the bug label Nov 17, 2015

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Nov 17, 2015

Member

I think I can reproduce something like this.

Member

forki commented Nov 17, 2015

I think I can reproduce something like this.

@forki forki closed this in 845d877 Nov 18, 2015

forki added a commit that referenced this issue Nov 18, 2015

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Nov 18, 2015

Member

could you please try 2.26?

Member

forki commented Nov 18, 2015

could you please try 2.26?

@WebDucer

This comment has been minimized.

Show comment
Hide comment
@WebDucer

WebDucer Nov 19, 2015

Thanks.

Works for me (2.26.1).

WebDucer commented Nov 19, 2015

Thanks.

Works for me (2.26.1).

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