dotnet add local package -> error: Value cannot be null. error: Parameter name: path1
See original GitHub issueSteps to reproduce
I’m on macOS 10.14.2 dotnet version 2.2.103
- Create a C# class library project
- Add package metadata to the project file
- inside the existing <PropertyGroup> tag,
<PackageId>mylib</PackageId> <Version>1.0.0</Version> <Authors>MyName</Authors> <Company>MyCompany</Company>
- Run the pack command $ 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
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Dotnet add package error: Value cannot be null. ( ...
Attempting to add a nuget package to a new console application results in the error Value cannot be null. (Parameter 'path1').
Read more >How to solve NuGet.targets(124,5): error : Value cannot be ...
So to solve this I am running the command dotnet restore in package manager console. But on running I'm getting the below error....
Read more >How to resolve NuGet.targets(128,5): error : Value cannot ...
I am getting this error when it is running the command dotnet restore ... How to resolve NuGet.targets(128,5): error : Value cannot be...
Read more >nuget restore fails with code(1) and error(Value cannot be ...
Parameter name : key failed with code(1) and error(Value cannot be null. Packages failed to restore. The steps in my build are:.
Read more >Why do I get an error "value cannot be null (Parameter ...
I am using the example code from https://learn.microsoft.com/en-us/answers/questions/299791/saving-to-appsettingsjson.html.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have the same problem but using a remote private NuGet server, any updates please ??
@wli3 can you take a look?