GlitchEnzo / NuGetForUnity

A NuGet Package Manager for Unity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installing ngpkg from local feed fails 'silently'

congxinUSC opened this issue · comments

Description

A package I published to the local feed shows up properly in the nuget package manager window. However when I try to install it via clicking on the 'install' button, the package is not installed and I only get a 'Could not found GamerLib version 1.0.0 or greater' in the console, which seems only relate to the UI updates according to the (should be) installed packages.

My property settings:
image
I disabled the nuget.org source just to make sure the console is not filled with error trying to fetch packages there.

The NuGet package manager window:
image
It did a good job finding the package, even works for multiple versions if 'Show All Versions" selected, but...

when I click 'install':
image

I'm not completely sure if this bug(?) only applies to local feed but I tested multiple nuget packages from nuget.org and it seems working as expected. Also it might be that there are some bugs in my nuget package but at least I tested in other c# .net projects with no problem.

Some additional info that might help:

  • My nuget package targets .net standard 2.1 and .net 7, with language version set to 9.0
  • The unity project is using .net standard 2.1 compatible settings and the generated .csproj file is using the SDK version format.

Big thanks in advance for anyone in this thread.

  • NuGet Package: [What is the name and version of the NuGet package you are installing?]
    A custom package called GamerLib
  • NuGetForUnity Version: [What version of NuGetForUnity are you running?]
    3.1.3
  • Unity Version: [What version of Unity are you using?]
    Unity 2021.3 LTS
  • Operating System: [What OS are you on?]
    Windows 11

Oh, forgot to mention that the local feed uses the hierarchical structure. The path to the package I'm trying to install is:
%USERPROFILE%/MyNuGetPackages/gamerlib/1.0.0/gamerlib.1.0.0.nupkg
I know the package path is all lower case and to my knowledge this is expected since nuget package ID is case insensitive. Also tried to make everything PascalCase and nothing changed.

I tried to repro your issue with some packages from nuget.org but it worked and I did not get the error you mentioned. Although 3.1.3 is becoming a bit outdated, @JoC0de any idea when we're going to release next version? This might have gotten fixed somewhere along the way but I couldn't pinpoint where.

Ok you are using the hirachical folder structure so probably fixed in #545
Can you try placing the . nupkg in the root folder specified in the nuget.config

@popara96 I think we can release a new version next weekend.

Ok you are using the hirachical folder structure so probably fixed in #545 Can you try placing the . nupkg in the root folder specified in the nuget.config

You mean just put the raw .nupkg file under .../MyNuGetPackages right? I'll try it out with some more candidate locations to place the package and get back later.

Ok you are using the hirachical folder structure so probably fixed in #545 Can you try placing the . nupkg in the root folder specified in the nuget.config

It worked when I placed the package into nuget package root.
I think that is the case so basically I should get a later release or use the latest source code right?
Thanks for all the help and I guess I'll leave the thread open as a release reminder lol.

I just released Version 4.0.0 it contains the fixes, please confirm that it works.

worked!