Mike Chambers
01/13/2024, 12:05 PMdotnet add package my.package --source D:\Release --prerelease
as the package reference (where the generated nupkg is in D:\Release
)
If the test site is already in existence (with the above pkg ref) does it take notice of a new build of the package, or need the version incrementing on each build?
Or is there a way to set the package source to simply look at the package source files and any changes are reflected on the test site immediately? (and obv don't mess with local nuget sources at after seeing @Sebastiaan protip re cache hell)Sebastiaan
01/13/2024, 12:06 PMAnders Bjerner
01/13/2024, 12:43 PMAnders Bjerner
01/13/2024, 12:51 PMrelease.bat
and a debug.bat
.
https://github.com/skybrud/Skybrud.Umbraco.Redirects/blob/v13/main/release.bat
https://github.com/skybrud/Skybrud.Umbraco.Redirects/blob/v13/main/debug.bat
The release.bat
file is for building the package and creating the NuGet for release. If you're not a dinosaur like me, you probably use some kind of automation (eg. GitHub actions) to handle this part.
The debug.bat
file will build the package in debug mode, and then create and save a NuGet package at c:\nuget
(could be any folder).
In Visual Studio you can configure a custom NuGet package feed, so I've added c:\nuget
to mine.
This means that in my test project, I can select the local package feed, and then write Install-Package MyPackage -pre
to install the package (or Update-Package
to update it).
-pre
means that we allow pre-releases, and since I'm appending the timestamp to the version number, I don't have to manually bump the version number each time I'm testing a new build locally.Mike Chambers
01/13/2024, 1:42 PMAnders Bjerner
01/13/2024, 1:48 PMMike Chambers
01/13/2024, 1:49 PMMike Chambers
01/13/2024, 1:51 PMAnders Bjerner
01/14/2024, 10:53 AMKevin Jump
01/14/2024, 10:58 AMAnders Bjerner
01/14/2024, 11:00 AMMike Chambers
01/14/2024, 1:09 PMdotnet add package my.package --source D:\MyPackageProj --prerelease
doesn't need the nupkg
it will fetch the debug/release dll and directly reference the static files? That sounds like exactly what I thought should happen!A hub and casual space for you to interact with fellow community members and learn more about Umbraco!
Powered by