-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I don't want to need to make a prerelease every time I push up changes to a library. Right now the pattern for non-released NuGet packages to be in a form like:
0.0.1.29-fallback-29-1-29-1-15366592019
This makes it difficult to call out specific versions of packages when in WIP because v0.0 is highly likely to be lower than a recent released version, causing this:
~/src/NetChris/NetChris.Applications.Assets [87-edit-vendor ↑3 +0 ~4 -0 !]> dotnet restore --no-cache
/Users/chris/src/NetChris/NetChris.Applications.Assets/NetChris.Applications.Assets.Infrastructure/NetChris.Applications.Assets.Infrastructure.csproj : error NU1605:
Warning As Error: Detected package downgrade: NetChris.Core from 9.4.3 to 0.0.1.142-fallback-142-1-142-1-15366593902. Reference the package directly from the project to select a different version.
NetChris.Applications.Assets.Infrastructure -> NetChris.Identification.Qeis.Client 0.11.0 -> NetChris.Identification.Qeis.Core 0.11.0 -> NetChris.Core (>= 9.4.3)
NetChris.Applications.Assets.Infrastructure -> NetChris.Core (>= 0.0.1.142-fallback-142-1-142-1-15366593902)
Restore failed with 1 error(s) in 1.1s
I think a good way around this is to force the fallback version to the maximum available major version number and also keep the numeric version components constant. e.g.
32767.0.0.0-fallback-142-1-142-1-15366593902
Then WIP dependents on the package can put in something like:
<PackageReference Include="NetChris.Cqrs" Version="32767.0.0.0-fallback-*" />Important is that this fallback version always uses the prerelease format so that we don't accidentally publish v32767! 😄
Metadata
Metadata
Assignees
Labels
No labels