Skip to content

SnrdTeam/msbuild-semantic-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Adeptik Semantic Version support

Adeptik Semantic Version support for C# projects.

Build status Nuget Package

Version in .NET Core project

To install the version in .NET Core, you can use the following code in the csproj project:

<PropertyGroup>
    <VersionPrefix>1.0.0</VersionPrefix>
    <VersionSuffix>preview-label</VersionSuffix>
    <SourceRevisionId>dev</SourceRevisionId>
</PropertyGroup>

The properties here are:

  • VersionPrefix - leftmost part of the version,
  • VersionSuffix - pre-release label if any,
  • SourceRevisionId - build metadata.

The result version is 1.0.0-preview-label+dev.

You can read more about version in .NET Core projects in Andrew Lock's blog: Version vs VersionSuffix vs PackageVersion: What do they all mean?.

Semantic version validation in Adeptik

Assembly's product version must comply with Semantic Versioning 2.0.0.

To verify this requirement, you must install the package

    Install-Package Adeptik.SemanticVersion

In your csproj file set

<PropertyGroup>
    <VersionPrefix>1.0.0</VersionPrefix>
    <VersionSuffix>preview-label</VersionSuffix>
</PropertyGroup>

By default, the value of the SourceRevisionId property is set to "developer.build".

The package validates that Version property is wellformed.

To disable Version validation you can add the following property to your csproj

<PropertyGroup>
    <ValidateSemanticVersion>false</ValidateSemanticVersion>
</PropertyGroup>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published