https://discord.umbraco.com logo
#package-development
Title
# package-development
c

craig100

12/06/2022, 12:17 PM
If we have a clone of a recently modified package, what do we need to do with it so we can install it locally if it's not available on Nuget yet? I'm thinking of the uSync.Migrations package. I haven't done any package development before so if there are general instructions somewhere, I apologies for not finding them 😳 I did look at https://docs.umbraco.com/umbraco-cms/extending/packages/creating-a-package#creating-a-nuget-package but it looks like I'd have to put it up on Nuget and that wouldn't be right.
k

kevinjump

12/06/2022, 12:25 PM
You can pack it locally (dotnet pack -o output -c release..) and then add a local folder to your list of nuget sources (in visual studio)
then it becomes something you can pick
in terms of the actual uSync.Migrations :
a) just this second released a new update so might be worth checking b) it has a
dist
folder with a build-packages.ps1 file in it - you can use that to build the package
Copy code
./build-package.ps1 version suffix
e.g
Copy code
./built-package.ps1 4.0.0 build.20221206.1
will build a package with version 4.0.0-build.20221206.1
and it will also attempt to copy to
c:\source\localgit
because that is where i have a nuget pointing to on on my machine
this then can be added to a project where that source is in the list as
Copy code
dotnet add package uSync.Migrations --prerelease
& as matt says you can also reference the project from an umbraco site (doesn't have to be in the soluition) and it should in theory copy everything across and 'work'
doh. it doesn't have a 'dist' folder it's excluded from the repo ! - i will fix that
c

craig100

12/06/2022, 8:21 PM
Wow, it's only gone and worked! And it's so quick! Thanks. This is going to be such a game changer.
2 Views