Skip to content

Commit acc3e68

Browse files
JusterZhuclaude
andcommitted
fix: scope default Version to packable projects only
IsPackable=false projects (tests) inherit Version=0.0.0-dev which is invalid for AssemblyVersion (CS7034). Gate the default Version behind '' != 'false'. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 41e875a commit acc3e68

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Directory.Build.props

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<Project>
22
<PropertyGroup>
3-
<Version Condition="'$(Version)' == ''">0.0.0-dev</Version>
4-
<AssemblyVersion Condition="'$(AssemblyVersion)' == ''">$(Version)</AssemblyVersion>
5-
<FileVersion Condition="'$(FileVersion)' == ''">$(Version)</FileVersion>
63
<PackageLicenseExpression>MIT</PackageLicenseExpression>
74
<RepositoryType>git</RepositoryType>
85
</PropertyGroup>
6+
7+
<!-- Default version for packable projects only -->
8+
<PropertyGroup Condition="'$(IsPackable)' != 'false'">
9+
<Version Condition="'$(Version)' == ''">0.0.0-dev</Version>
10+
</PropertyGroup>
911
</Project>

0 commit comments

Comments
 (0)