emgarten / Sleet

A static nuget feed generator for Azure Storage, AWS S3, and more.
MIT License
337 stars 40 forks source link

Cannot install packages that has dependency on another source #165

Closed MarioGK closed 1 year ago

MarioGK commented 1 year ago

When you host a nuget package using sleet that uses another public nuget package from nuget.org, it errors while trying to install it claiming that i could not find the public package on the sleep repository.

Example Project X references System.Text.Json which is on the nuget.org I run dotnet pack and create the X.nupkg Then i use sleet to create a feed with the created X.nupkg When i try to install the X package it gives me an error that it cannot find System.Text.Json on my sleet feed.

Is this problem related to nuget? sleet? my nuget.config? I am stuck at this step and could not find anything on google. Thanks ahead for the help.

emgarten commented 1 year ago

Add both your sleet feed AND nuget.org to your nuget.config.

NuGet expects you to have multiple feeds for these scenarios. Dependencies can come from any feed.

MarioGK commented 1 year ago

@emgarten Well both are on my nuget.config, am i doing something wrong?

image

OBS: I just renamed the URL,user and password, they are correct and packages are shown on the nuget on rider/visual studio

emgarten commented 1 year ago

You might have disabled nuget.org at a higher level. Add this section to your config:

https://github.com/emgarten/Sleet/blob/4daf3f32197b9484f87ac512c18ab1508f5e2505/NuGet.Config#L7-L9

MarioGK commented 1 year ago

Yeah that fixed it, thanks for the help and the amazing project