How to replicate auto version number
See original GitHub issueSteps to reproduce
In previous version of .Net you could make part of your version number auto generated using an *
.
E.g. 2.1.1.*
How can that be done in the new .Net Core csproj file?
I have read dotnet/sdk#7263, but that requires my CI to manage the dynamic part of the number.
Expected behaviour
In the project .csproj file using the following:-
<PropertyGroup>
<VersionPrefix>2.1.3.*</VersionPrefix>
<TargetFramework>netstandard1.4</TargetFramework>
</PropertyGroup>
Should produce a part dynamic version number on the produced assembly.
Actual behaviour
On running dotnet build
Build FAILED.
C:\Program Files\dotnet\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.GenerateAssemblyInfo.targets(120,5): error : Invalid NuGet version str
ing: '2.1.3.*'. [C:\_projects\misc\Html2Markdown\src\Html2Markdown\Html2Markdown.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(92,5): error : Cannot find project info for 'C:\_projects\
misc\Html2Markdown\src\Html2Markdown\Html2Markdown.csproj'. This can indicate a missing project reference. [C:\_projects\misc\Html2Markdown\test\Ht
ml2Markdown.Test\Html2Markdown.Test.csproj]
0 Warning(s)
2 Error(s)
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.4)
Product Information:
Version: 1.0.4
Commit SHA-1 hash: af1e6684fd
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.4
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to have an auto incrementing version number (Visual ...
This will increment the build number every time you build the project regardless of the selected configuration (i.e. Debug|Release), and it will ...
Read more >Auto Version Increment
Getting Started · Ctrl + Alt + W for Windows & Linux & Cmd + Alt + W for Mac (Global command, update...
Read more >Increase version number automatically with git | Medium
Step 1: pick the file to update automatically As you may have noticed, the goal is to build a string that concatenates the...
Read more >How to make auto-incrementing build number ? : r/vscode
Most of them will push some sort of build number into an environment variable that you can then consume in your build script....
Read more >Auto-generate version numbers - Programming Questions
Is there any way for me to generate automatically a version number in a sketch? Like something to count lines or number of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can replicate build and revision wildcards by implementing roslyn’s version pattern logic in pure MSBuild:
I fixed it btw with
So for us it’s fixed, once we build in any of the official SDK image DOTNET_RUNNING_IN_CONTAINER is set… so it works even with the VS bug