Skip to content

find-packages command fails when using UNC paths #4243

Open

Description

@vincentremond

find-packages command fails when using UNC paths

Description

The find-packages command fails when using UNC paths.

Here is a copy of my paket.dependencies file:

source ~/nuget
source https://api.nuget.org/v3/index.json

storage: none
nuget FSharp.Core

When I run this command:

dotnet paket find-packages FSharp.Core

I get this error:

Paket version 8.0.3+75b30cdcb8859e8d129f139444d9b9b600bfff07
Total time taken: 211 milliseconds
Paket failed with
-> DirectoryNotFoundException: Could not find a part of the path 'C:\Users\remond\perso\github\NugetHelper\~\nuget'.

But if I run this command:

dotnet paket add FSharp.Core

It works fine.

Repro steps

Steps to reproduce the problem

  1. dotnet new tool-manifest

  2. dotnet tool install paket

  3. dotnet paket init

  4. Modify paket.dependencies to add a source with a UNC path

    source https://api.nuget.org/v3/index.json
    source ~/nuget
    
    storage: none
    
  5. Run dotnet paket find-packages FSharp.Core

Expected behavior

The find-packages command should work with UNC paths and include the packages from the UNC path in the results.

Actual behavior

The find-packages command fails with a DirectoryNotFoundException.

Known workarounds

Add the --source <source URL> option to the find-packages command when you know the package is in a specific source.

Activity

  1. github-actions commented on Sep 1, 2026

    @github-actions
    Contributor

    🤖 This is an automated response from Repo Assist.

    Thanks for the report! I traced this to Dependencies.FindPackagesByNameAsync (used by find-packages), which was passing the raw local source path straight to the file search without normalizing ~ home-directory shorthand first — unlike other local-feed code paths in Paket that already do this. I've opened a draft PR with a fix and a regression test: it should resolve the DirectoryNotFoundException for ~/... local sources.

    Generated by 🌈 Repo Assist, see workflow run. Learn more.
    Comment /repo-assist to run again

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/repo-assist.md@ae8d551f07c7ed7619f8c58c7bb4c3ac89395d38
    
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