Skip to content

How to treat one lib in multi-lib repo differently (always marked as preview)? #1004

Description

@egil

I have a repository that includes multiple libraries. One of the libraries is experimental, so when I do a dotnet pack, I want its version to retain the preview version suffix as with unstable releases, even if the rest of the libraries does not have this.

This is my current version.json:

// https://github.com/bUnit-dev/bUnit/blob/main/version.json
{
  "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
  "version": "1.26-preview",
  "assemblyVersion": {
    "precision": "revision"
  },
  "nuGetPackageVersion": {
    "semVer": 2.0
  },
  "publicReleaseRefSpec": [
    "^refs/heads/stable$"
  ],
  "cloudBuild": {
    "buildNumber": {
      "enabled": true
    }
  },
  "release": {
    "branchName": "release/v{version}",
    "firstUnstableTag": "preview"
  },
  "pathFilters": [
    "./src"
  ]
}

The project I want to always be marked as experimental/preview is this: https://github.com/bUnit-dev/bUnit/blob/main/src/bunit.web.query/bunit.web.query.csproj

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions