Skip to content

Commit 99ebe4a

Browse files
committed
Change TargetFrameworks
Remove IsStandard Fix CodeFactor issues
1 parent baaf150 commit 99ebe4a

File tree

6 files changed

+16
-34
lines changed

6 files changed

+16
-34
lines changed

AdvancedSharpAdbClient.Tests/AdvancedSharpAdbClient.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<Choose>
10-
<When Condition="'$(IsWindows)' == 'True' and '$(IsStandard)' != 'True'">
10+
<When Condition="'$(IsWindows)' == 'True'">
1111
<PropertyGroup>
1212
<TargetFramework>net10.0-windows10.0.17763.0</TargetFramework>
1313
</PropertyGroup>
@@ -23,10 +23,10 @@
2323
<PackageReference Include="coverlet.msbuild" Version="6.0.4" PrivateAssets="all">
2424
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2525
</PackageReference>
26-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
26+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
2727
<PackageReference Include="NSubstitute" Version="5.3.0" />
2828
<PackageReference Include="xunit" Version="2.9.3" />
29-
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" PrivateAssets="all">
29+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5" PrivateAssets="all">
3030
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3131
</PackageReference>
3232
</ItemGroup>

AdvancedSharpAdbClient/AdbClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ public virtual void ExecuteServerCommand(string target, string command, IAdbSock
390390
// break too soon in certain cases (about every 10 loops, so it appears to be a timing
391391
// issue). Checking for reader.ReadLine() to return null appears to be much more robust
392392
// -- one of the integration test fetches output 1000 times and found no truncations.
393-
while (reader.ReadLine() != null) ;
393+
while (reader.ReadLine() != null) { }
394394
}
395395
catch (Exception e)
396396
{

AdvancedSharpAdbClient/AdvancedSharpAdbClient.csproj

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,17 @@
1010
<SuppressTfmSupportBuildWarnings>False</SuppressTfmSupportBuildWarnings>
1111
</PropertyGroup>
1212

13-
<Choose>
14-
<When Condition="'$(IsStandard)' == 'True'">
15-
<PropertyGroup>
16-
<PackageId>$(AssemblyName).Standard</PackageId>
17-
<TargetFrameworks>netstandard1.3;netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
18-
<TargetFrameworks Condition="'$(IsWindows)' == 'True'">$(TargetFrameworks);net2.0;net4.5</TargetFrameworks>
19-
</PropertyGroup>
20-
</When>
21-
<When Condition="'$(FullTargets)' == 'True'">
22-
<PropertyGroup>
23-
<NoWarn>$(NoWarn);NU1603;NU1605;NU1902;NU1903</NoWarn>
24-
<TargetFrameworks>net6.0;net8.0;net10.0;netcoreapp2.1;netcoreapp3.1;netstandard1.3;netstandard2.0;netstandard2.1</TargetFrameworks>
25-
<TargetFrameworks Condition="'$(IsWindows)' == 'True'">$(TargetFrameworks);net2.0;net3.5-client;net4.0-client;net4.5;net4.6.1;net4.8;net8.0-windows10.0.17763.0;net10.0-windows10.0.17763.0</TargetFrameworks>
26-
<TargetFrameworks Condition="'$(GITHUB_ACTIONS)' != 'True' and '$(IsWindows)' == 'True'">$(TargetFrameworks);netcore5.0;uap10.0;uap10.0.15138.0</TargetFrameworks>
27-
</PropertyGroup>
28-
</When>
29-
<Otherwise>
30-
<PropertyGroup>
31-
<TargetFrameworks>net8.0;netcoreapp3.1;netstandard1.3;netstandard2.0;netstandard2.1</TargetFrameworks>
32-
<TargetFrameworks Condition="'$(IsWindows)' == 'True'">$(TargetFrameworks);net2.0;net3.5-client;net4.5;net4.8;net8.0-windows10.0.17763.0</TargetFrameworks>
33-
</PropertyGroup>
34-
</Otherwise>
35-
</Choose>
13+
<PropertyGroup>
14+
<TargetFrameworks>net8.0;net10.0;netstandard1.3;netstandard2.0;netstandard2.1</TargetFrameworks>
15+
<TargetFrameworks Condition="'$(IsWindows)' == 'True'">$(TargetFrameworks);net2.0;net3.5-client;net4.5;net4.8;net8.0-windows10.0.17763.0;net10.0-windows10.0.17763.0</TargetFrameworks>
16+
</PropertyGroup>
17+
18+
<PropertyGroup Condition="'$(FullTargets)' == 'True'">
19+
<NoWarn>$(NoWarn);NU1603;NU1605;NU1902;NU1903</NoWarn>
20+
<TargetFrameworks>$(TargetFrameworks);net6.0;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
21+
<TargetFrameworks Condition="'$(IsWindows)' == 'True'">$(TargetFrameworks);net4.0-client;net4.6.1</TargetFrameworks>
22+
<TargetFrameworks Condition="'$(GITHUB_ACTIONS)' != 'True' and '$(IsWindows)' == 'True'">$(TargetFrameworks);netcore5.0;uap10.0;uap10.0.15138.0</TargetFrameworks>
23+
</PropertyGroup>
3624

3725
<PropertyGroup>
3826
<PolySharpIncludeGeneratedTypes>

AdvancedSharpAdbClient/Models/DeviceData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ or DeviceState.Authorizing
239239
builder.AppendFormatted((int)State, "X");
240240
builder.AppendFormatted(')');
241241
break;
242-
};
242+
}
243243

244244
if (!string.IsNullOrEmpty(Message))
245245
{

Directory.Build.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<PropertyGroup>
3030
<FullTargets Condition="'$(FullTargets)' == ''">False</FullTargets>
3131
<ImportAsync Condition="'$(ImportAsync)' == ''">False</ImportAsync>
32-
<IsStandard Condition="'$(IsStandard)' == ''">False</IsStandard>
3332
<IsWindows Condition="'$(IsWindows)' == ''">False</IsWindows>
3433
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows')) == 'True' OR '$(Platform)' == 'Windows NT'">True</IsWindows>
3534
<IsTestProject Condition="'$(IsTestProject)' == ''">$(MSBuildProjectName.Contains('.Test'))</IsTestProject>

Directory.Build.props.buildschema.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111
"type": "bool",
1212
"defaultValue": "false"
1313
},
14-
"IsStandard": {
15-
"description": "Value indicating whether only target to .NET Standard",
16-
"type": "bool",
17-
"defaultValue": "false"
18-
},
1914
"IsWindows": {
2015
"description": "Value indicating whether is running on Windows",
2116
"type": "bool"

0 commit comments

Comments
 (0)