Skip to content

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

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

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