Skip to content

Paket doesn't add expected reference to .csproj #2020

Closed

Description

@smolyakoff

Description

Paket doesn't add reference to Microsoft.Extensions.Primitives when I add Microsoft.Extensions.Configuration.Json as a reference in paket.references

This may also be related: #1964

Repro steps

PaketReferencesIssue.zip

  1. Create new solution in Visual Studio 2015 with a single console Windows app (not .NET core)
  2. Initialize paket in a root directory
  3. Add Microsoft.Extensions.Configuration.Json to the paket.dependencies
  4. Add paket.references file to console project with Microsoft.Extensions.Configuration.Json

Expected behavior

Paket adds a reference to csproj file and application runs normally without any issues

Actual behavior

Reference is not added, and application fails to start with the following message:

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Microsoft.Extensions.Configuration.Json.dll

Additional information: Could not load file or assembly 'Microsoft.Extensions.Primitives, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.

Known workarounds

You can add reference manually, but it would removed during the next paket install. You can add missing dll to a project file and mark it as content with Copy If Newer option.

Activity

  1. forki commented on Nov 17, 2016

    @forki
    Member

    https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Json is referencing .NET Standard library for .NET 4.5.1 - WTF!?

    @matthid I think this is breaking our model....

  2. added a commit that references this issue on Nov 17, 2016
  3. matthid commented on Nov 17, 2016

    @matthid
    Member

    so this is fixed?

  4. forki commented on Nov 17, 2016

    @forki
    Member

    "fixed" as in yes this special case is handled as well.

    Am 17.11.2016 2:02 nachm. schrieb "Matthias Dittrich" <
    notifications@github.com>:

    so this is fixed?

    —
    You are receiving this because you modified the open/close state.
    Reply to this email directly, view it on GitHub
    #2020 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/AADgNJRNA0WExeSjvaG7O0rgOzj133Q5ks5q_E_zgaJpZM4K0Tqv
    .

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