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-dotnetGitHub
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
No, you have to either set up nuget, or add it as a submodule and reference a project from it
I'm sorry, do you have guide for the submodule tutorial?
I'm talking about git submodules
Also look at slngen
dealing with solutions is a pain without it if you go the submodule route
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>
You'll still need the submodule thing if you're going to be developing both at the same time
I just use the gh registry for private packages ¯\_(ツ)_/¯
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
Yeah
What of it?
Github action builds and publishes it
Or I add the directory with locally-packed nuggies as a nuget source
In how many minutes?
You still have to manually bump the version with every change
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.
Which is crazy terrible dev experience
Version="*"
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
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
so fix it 😛
you can use it as a local reference while developing
and release once you feel that its good enough
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