Skip to content

Commit 313b0ba

Browse files
authored
chore(Version): update run target frameworks (#6952)
* refactor: 增加条件编译 * chore: 更新 Version 配置文件 * chore: 更改为字符串比较
1 parent 0addc2f commit 313b0ba

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Version.props

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
<Project>
22

3-
<PropertyGroup>
3+
<PropertyGroup Condition="'$(VisualStudioVersion)' == '17.0'">
4+
<RunTargetFramework>net9.0</RunTargetFramework>
5+
<RunTargetFrameworks>net6.0;net7.0;net8.0;net9.0</RunTargetFrameworks>
6+
</PropertyGroup>
7+
8+
<PropertyGroup Condition="'$(VisualStudioVersion)' == '18.0'">
49
<RunTargetFramework>net10.0</RunTargetFramework>
10+
<RunTargetFrameworks>net6.0;net7.0;net8.0;net9.0;net10.0</RunTargetFrameworks>
511
</PropertyGroup>
612

713
</Project>

src/BootstrapBlazor/Directory.Build.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<Import Project="..\Directory.Build.props" />
44
<Import Project="..\Logo.props" />
55
<Import Project="..\SourceLink.targets" />
6-
6+
<Import Project="..\..\Version.props" />
7+
78
<PropertyGroup>
89
<PackageTags>Bootstrap Blazor WebAssembly wasm UI Components</PackageTags>
910
<Description>Bootstrap UI components for Blazor and Razor Components</Description>
@@ -17,7 +18,7 @@
1718
</PropertyGroup>
1819

1920
<PropertyGroup>
20-
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0;net10.0</TargetFrameworks>
21+
<TargetFrameworks>$(RunTargetFrameworks)</TargetFrameworks>
2122
</PropertyGroup>
2223

2324
<PropertyGroup>

src/BootstrapBlazor/Directory.Build.targets

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<Project>
22

3-
<Import Project="..\..\Version.props" />
4-
53
<ItemGroup>
64
<PackageReference Include="AspNetCore.SassCompiler" Version="1.93.2" Condition="'$(Configuration)'=='Debug' and '$(TargetFramework)' == '$(RunTargetFramework)'" />
75
</ItemGroup>

0 commit comments

Comments
 (0)