-
Notifications
You must be signed in to change notification settings - Fork 250
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
dotnet add local package -> error: Value cannot be null. error: Parameter name: path1 #8543
Comments
From @livarcocc on Tuesday, January 29, 2019 5:41:28 PM @wli3 can you take a look? |
From @guydillen on Monday, February 11, 2019 9:03:11 AM Any progress? Thanks. |
From @wli3 on Monday, February 11, 2019 7:23:43 PM sorry I don't have any update |
From @Rakiah on Thursday, March 21, 2019 11:40:24 AM I have the same problem but using a remote private NuGet server, any updates please ?? |
From @nkolev92 on Thursday, March 21, 2019 5:55:27 PM Where are you trying to install the package? How did you generate the console app? I've seen this goo get spewed when it detects a cycle. Basically you are trying to install the package in the project that generated it. |
From @ransagy on Monday, September 2, 2019 8:52:59 AM I've come across this myself. Is there any way for us to nail it down further? some diagnostic/verbose output to understand which path is it tripping on? I tried adding the --verbosity diag and --diagnostics flags, but the cli doesn't accept those in any way i could add them coupled with the add package command. |
I would like to have a verbosity or diagnostics option as reported earlier in this thread. I cannot see the reason for this error message while adding a package:
|
I'm getting the same issue on a new console app trying to add MediatR package...
Could it be because my folder is called mediatr as well? (cycle detected?) EDIT: I think I answered my own question from here: #6754 - can't use same folder name or project name as package name |
@ransagy - i'm not able to repro the main issue... the following steps work fine with dotnet core sdk: 3.0.100:
so I think we should close this issue. Please confirm. |
As i haven't come across this again, no problem by me. I'll comment again if and when it happens. |
I was converting a project that I had as a project reference into a nuget package. When I ran the dotnet add package command, I got the message referenced above. Once I removed the project reference, the add package command worked as expected. |
I'm having the Value cannot be null issue as well. I am using BOTH package and project references, which works in Visual Studio. That way when project references are not available (e.g. building single project in a container), the nuget reference is pulled. The Visual Studio 2019 Manage NuGet packages allows updating, but the command line does not work - failing with the aforementioned error. My use case is this: Build dependent libraries of a project, push the package to the nuget server, and then update the references, all via the command line. So it would be nice if there were a fix some time in the future -- the workaround is using Visual Studio. |
Hey all, I'm having a similar issue, but with
It's happening with the |
What seems to go wring is if you specify the path to the nupkg file after flags like It would be nice if the nuget client either accept both orders or returns a useful message indicating the order has to be reversed. |
Jorrit - thanks for answering -- your solution worked great. Who would have thought. Did you look at the source to find out? The alternative to dotnet nuget is using nuget, and that is quite unpleasant on Linux, because you first have to install mono, then nuget, then download a newer nuget and manually install it. Yes, let the issue be fixed, either by error message, or better, by accepting any parameter order. |
And here we go, a few years later :] I'm trying to convert a project reference to a nuget reference in a project. I first removed it with It was not stated anywhere in the thread, so i'll add in my case - its an older netframework 4.7.2 old-style csproj. Could be that its not explicitly supported though or even explicitly UNSUPPORTED, not sure. |
From @gdillen on Tuesday, January 29, 2019 3:56:08 PM
Steps to reproduce
I'm on macOS 10.14.2
dotnet version 2.2.103
<PackageId>mylib</PackageId> <Version>1.0.0</Version> <Authors>MyName</Authors> <Company>MyCompany</Company>
$ dotnet pack
4 $ nuget add mylib.nupkg -source /Users/myname/nuget_repo
5 $ dotnet nuget push mylib.1.0.0.nupkg -s my-nuget
In my ConsoleApp project try to add my nuget package:
6 $ dotnet add package mylib -s /Users/myname/nuget-repo
Expected behavior
Successfully adding my Nuget package.
Actual behavior
myname:MyConsoleApp myname$ dotnet add package mylib
Writing /var/folders/cr/4pk4646d1_x5tl_tbbbbvqkw0000gn/T/tmpyagAXi.tmp
info : Adding PackageReference for package 'mylib' into project '/Users/myname/Projects/MyConsoleApp/MyConsoleApp.csproj'.
log : Restoring packages for /Users/myname/Projects/MyConsoleApp/MyConsoleApp.csproj...
info : Package 'mylib' is compatible with all the specified frameworks in project '/Users/myname/Projects/MyConsoleApp/MyConsoleApp.csproj'.
error: Value cannot be null.
error: Parameter name: path1
Copied from original issue: dotnet/cli#10668
The text was updated successfully, but these errors were encountered: