question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Package validation Baseline Package Validator should optionally check semantic versioning rules

See original GitHub issue

When enabling Package Validation against a baseline version like this:

<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net6.0</TargetFramework> <PackageVersion>1.0.1</PackageVersion> <EnablePackageValidation>true</EnablePackageValidation> <PackageValidationBaselineVersion>1.0.0</PackageValidationBaselineVersion> </PropertyGroup> </Project>

Validation should not only report breaking changes but (optionally) say if the new package complies to semantic versioning rules. E.g.:

  • If there are breaking changes it should recommend that major version has to be incremented.
  • If there are non breaking changes it should recommend that minor version has to be incremented.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ViktorHofercommented, Apr 29, 2022

That sounds like a good feature request for https://github.com/pushpay-labs/semantic-versioning-analyzer. What you are asking for is achievable by adding an msbuild task and making sure that it runs after the Pack target. In your project you would then just need to add a PackageReference to that msbuild task and optionally set a few properties to control its behavior:

<ItemGroup>
    <PackageReference Include="SemVerAnalyzer.Task" Version="..." />
</ItemGroup>

Such a solution would work with Visual Studio as well.

1reaction
ViktorHofercommented, Apr 29, 2022

In the aspect of not reinventing the wheel, what speaks against continuing to use the semantic-versioning-analyzer together with the in-built package validation? The analyzer provides package version suggestions vs. package validation validates compatibility of your packaged assets.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Baseline Package Validator - .NET
Package Validation can help you validate your library project against a previously released, stable version of your package.
Read more >
Package Validation - .NET Blog
It involves validating that there are no breaking changes across versions. It will validate that the package have the same set of publics ......
Read more >
Packaging rules in a module - PSRule
You should consider packaging rules into a module to: Version rules. PowerShell modules support semantic versioning (semver).
Read more >
Package Validation
The baseline validator allows you to validate your library project against a previously released, stable version of your package. It will ...
Read more >
Changelog Validation error | Package Validation Suite
The package you validated does not have a CHANGELOG.md file and ... it would only validate this rule until it found the target...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found