C
C#5mo ago
Rubi

Install dotnet Library from GitHub

hi everyone, I have zero knowledge with dotnet, csharp and family In golang we could do go get github.com/username/repo in python we could do pip3 install git+https://github.com/username/repo.git but how about dotnet? can we do similar without uploading package to nuget? thank you! my project is: https://github.com/lokal-so/lokal-dotnet
GitHub
GitHub - lokal-so/lokal-dotnet: .NET Library for interacting with L...
.NET Library for interacting with Lokal Client REST API - lokal-so/lokal-dotnet
16 Replies
Anton
Anton5mo ago
No, you have to either set up nuget, or add it as a submodule and reference a project from it
Rubi
RubiOP5mo ago
I'm sorry, do you have guide for the submodule tutorial?
Anton
Anton5mo ago
I'm talking about git submodules Also look at slngen dealing with solutions is a pain without it if you go the submodule route
Angius
Angius5mo ago
If you don't want to involve the nuget.org registry, you can always release on the Github registry But yeah, it's either a Nuget package or a direct project reference There's no dotnet add <github url>
Anton
Anton5mo ago
You'll still need the submodule thing if you're going to be developing both at the same time
Angius
Angius5mo ago
I just use the gh registry for private packages ¯\_(ツ)_/¯
Anton
Anton5mo ago
Yeah and to be able to test your changes in another project of your nuget, you'd have to push a new version, on every change
Angius
Angius5mo ago
Yeah What of it? Github action builds and publishes it Or I add the directory with locally-packed nuggies as a nuget source
Anton
Anton5mo ago
In how many minutes? You still have to manually bump the version with every change
Pobiega
Pobiega5mo ago
can we do similar without uploading package to nuget?
why are you trying to avoid using nuget? thats how 99.99% of people will install your package.
Anton
Anton5mo ago
Which is crazy terrible dev experience
Angius
Angius5mo ago
Version="*"
Anton
Anton5mo ago
Sure. The only "but" I got left is that you have to rebuild everything in the right order if you got chains of dependencies. And in general, not forget to rebuild the nuget in the first place. and bump the version in the nuget, I mean I was thinking of bringing either the package or the project reference from a submodule with msbuild Which I haven't tried before, but it might be better
Rubi
RubiOP5mo ago
no, I don't try to avoid nuget at all, I just don't want to release a broken version of my package into nuget
Pobiega
Pobiega5mo ago
so fix it 😛 you can use it as a local reference while developing and release once you feel that its good enough
Kiel
Kiel5mo ago
You can add a folder as a package source in your NuGet settings, dotnet pack your project, put the .nupkg in the folder, and import it that way while testing Since that sounds like your end goal is to have a testing version of your packaged project before you push it to NuGet, etc
Want results from more Discord servers?
Add your server