-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Describe the bug
I have some projects which consume packages from a private feed. To avoid specifying RestoreAdditionalProjectSources in every project, I made a NuGet package containing that property in its *.Build.props. Specifying this package in a PackageReference alongside the private ones works in Visual Studio, but not in CLI.
To Reproduce
- Create an empty project with following contents:
https://gist.github.com/DarkDaskin/fd9512e1edbbb9fe912d68057d3870e2#file-myproject-csproj - Create a NuGet package with the following file in the
builddirectory and specify its location in NuGet source settings:
https://gist.github.com/DarkDaskin/fd9512e1edbbb9fe912d68057d3870e2#file-unitymodstudio-bepinex-build-props - Open
MyProject.csprojon Visual Studio and select Restore NuGet Packages in the Solution Explorer. It works. - Run
dotnet restorein the directory containingMyProject.csproj. It fails.
Exceptions (if any)
error NU1101 regarding BepInEx.* packages. Their private feed is not listed there.
Further technical details
- Include the output of
dotnet --info
https://gist.github.com/DarkDaskin/fd9512e1edbbb9fe912d68057d3870e2#file-dotnet-info - The IDE (VS / VS Code/ VS4Mac) you're running on, and its version
Visual Studio 2022 Version 17.14.0