Sitelet https://github.com/fsprojects/Paket/issues/1703
Skip to content

Paket cannot resolve a conflict on Microsoft.AspNet.Razor when using a local package source #1703

Description

@yaakov-h

Description

When using a local package source, Paket cannot resolve the dependency conflict between RazorEngine and Microsoft.AspNet.Mvc.

This is likely due to a failure to resolve this dependencies section in RazorEngine's nuspec file:

    <dependencies>
      <group targetFramework=".NETFramework4.0">
        <dependency id="Microsoft.AspNet.Razor" version="[2.0.30506.0]" />
      </group>
      <group targetFramework=".NETFramework4.5">
        <dependency id="Microsoft.AspNet.Razor" version="3.0.0" />
      </group>
    </dependencies>

Repro steps

  1. Create a paket.dependencies file with the following:
source \\some-server\network-share
framework: net45
nuget Microsoft.AspNet.Mvc
nuget RazorEngine
  1. Copy the nupkgs for these dependencies, and their dependency tree, to \some-server\network-share
  2. Run paket.exe update

Expected behavior

Paket resolves Microsoft.AspNet.Razor (>= 3.2.3 < 3.3) to Microsoft.AspNet.Razor (3.2.3).

Actual behavior

Paket version 3.0.0.0
Resolving packages for group Main:
 - Microsoft.AspNet.Mvc 5.2.3
 - RazorEngine 3.8.2
 - RazorEngine 3.7.3
Paket failed with:
        There was a version conflict during package resolution.
  Resolved packages:
   - Microsoft.AspNet.Mvc 5.2.3
   - RazorEngine 3.7.3
  Could not resolve package Microsoft.AspNet.Razor:
   - Microsoft.AspNet.Mvc 5.2.3 requested package Microsoft.AspNet.Razor: >= 3.2.3 < 3.3
   - RazorEngine 3.7.3 requested package Microsoft.AspNet.Razor: 2.0.30506

  Please try to relax some conditions.

Known workarounds

One workaround:

  • Remove framework: net45 from paket.dependencies.

Another workaround:

  • Use the public gallery (https://api.nuget.org/v3/index.json), not a local source.

Another workaround:

  • Use Paket 3.x beta with the public gallery source (above) and a cache directive to the local folder,

Related information

  • Operating System: Windows 10.0 (build 10240)
  • Issue occurs in (at least) Paket 2.60.2.0, 2.66.3.0, and 3.0.0.0 (beta053)
  • .NET 4.6.1 installed on the machine, attempting to target .NET 4.5 for the project Paket is being used in.

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