Since dotnet new classlib does not add <Version> to the csproj file, it becomes a manual process to add the version tag before being able to use dotnet version for the first time.
I think it would make sense to support the case and then defaulting the version to 0.0.0 (before bumping) and perhaps output a warning that there was no version at it was therefore defaulted to 0.0.0 before applying the bump.
I do not think it would be necessary to detect a version set using assembly attributes, as that is basically a different style (and in my opinion an obsolete one with Core) of supplying the version.
Since
dotnet new classlibdoes not add<Version>to the csproj file, it becomes a manual process to add the version tag before being able to usedotnet versionfor the first time.I think it would make sense to support the case and then defaulting the version to
0.0.0(before bumping) and perhaps output a warning that there was no version at it was therefore defaulted to 0.0.0 before applying the bump.I do not think it would be necessary to detect a version set using assembly attributes, as that is basically a different style (and in my opinion an obsolete one with Core) of supplying the version.