Skip to content

Commit 7671b50

Browse files
committed
Use TargetFramework singular for tests
Use TargetFramework instead of TargetFrameworks property whenever a test project targets a single target framework only. This avoid unnecessary outer builds and evaluations and makes the build faster.
1 parent 9ebe0ef commit 7671b50

171 files changed

Lines changed: 171 additions & 173 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
44
<Nullable>enable</Nullable>
5-
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
5+
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
66
</PropertyGroup>
77
<ItemGroup>
88
<Compile Include="AndroidTestRunner.cs" />

src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
44
<Nullable>enable</Nullable>
5-
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
5+
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
66
</PropertyGroup>
77
<ItemGroup>
88
<Compile Include="AppleTestRunner.cs" />

src/libraries/Common/tests/StreamConformanceTests/StreamConformanceTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
4-
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
4+
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
55
</PropertyGroup>
66
<ItemGroup>
77
<Compile Include="System\IO\*.cs" />

src/libraries/Common/tests/System/Xml/XmlCoreTest/XmlCoreTest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
44
<RootNamespace>XmlCoreTest.Common</RootNamespace>
5-
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
5+
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
66
</PropertyGroup>
77
<ItemGroup>
88
<Compile Include="AsyncUtil.cs" />

src/libraries/Common/tests/TestUtilities.Unicode/TestUtilities.Unicode.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
44
<UnicodeUcdVersion>13.0</UnicodeUcdVersion>
5-
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
5+
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
66
</PropertyGroup>
77
<ItemGroup>
88
<Compile Include="System\Text\Unicode\UnicodeData.cs" />

src/libraries/Common/tests/WasmTestRunner/WasmTestRunner.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
44
<Nullable>enable</Nullable>
5-
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
5+
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
66
</PropertyGroup>
77
<ItemGroup>
88
<Compile Include="WasmTestRunner.cs" />

src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Microsoft.Diagnostics.Tracing.EventSource</PackageDescription>
1010
<PackageId>$(MSBuildProjectName)</PackageId>
1111
<AssemblyName>Microsoft.Diagnostics.Tracing.EventSource</AssemblyName>
1212
<DefineConstants>$(DefineConstants);NO_EVENTCOMMANDEXECUTED_SUPPORT;ES_BUILD_STANDALONE;FEATURE_MANAGED_ETW;TARGET_WINDOWS</DefineConstants>
13-
<TargetFrameworks>$(NetFrameworkMinimum)</TargetFrameworks>
13+
<TargetFramework>$(NetFrameworkMinimum)</TargetFramework>
1414
<Nullable>enable</Nullable>
1515
<IncludePlatformAttributes>true</IncludePlatformAttributes>
1616
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/tests/Microsoft.Diagnostics.Tracing.EventSource.Redist.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<DefineConstants>$(DefineConstants);USE_MDT_EVENTSOURCE</DefineConstants>
44
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
5-
<TargetFrameworks>$(NetFrameworkMinimum)</TargetFrameworks>
5+
<TargetFramework>$(NetFrameworkMinimum)</TargetFramework>
66
</PropertyGroup>
77
<PropertyGroup>
88
<SDTTestDir>..\..\System.Diagnostics.Tracing\tests</SDTTestDir>

src/libraries/Microsoft.Extensions.Hosting.Systemd/tests/Microsoft.Extensions.Hosting.Systemd.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
4+
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
55
<EnableDefaultItems>true</EnableDefaultItems>
66
</PropertyGroup>
77

src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.targets

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

33
<PropertyGroup>
4-
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
4+
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
55
<EnableDefaultItems>true</EnableDefaultItems>
66
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
77
<Nullable>enable</Nullable>

0 commit comments

Comments
 (0)