diff --git a/src/GitInfo/build/GitInfo.targets b/src/GitInfo/build/GitInfo.targets index fe0580d..7b6f33e 100644 --- a/src/GitInfo/build/GitInfo.targets +++ b/src/GitInfo/build/GitInfo.targets @@ -571,7 +571,7 @@ - $(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)+$(GitBranch.Replace('/', '-').Replace('\', '-').Replace('_', '-').$(GitCommit) + $(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)+$([System.Text.RegularExpressions.Regex]::Replace($(GitBranch), "[^0-9A-Za-z-]", "-")).$(GitCommit) $(Version)