Skip to content

Commit 9e6e2f0

Browse files
stan-sztg123
andauthored
Standardize TargetFramwork for VisualStudio IDE (#810)
* Follow up on unused using cleanup * Revert * Package upgrades * LF * Update README.md Co-authored-by: Boshi Lian <[email protected]> Co-authored-by: Boshi Lian <[email protected]>
1 parent 57037f0 commit 9e6e2f0

File tree

11 files changed

+69
-71
lines changed

11 files changed

+69
-71
lines changed

Directory.Build.props

+39-39
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<PropertyGroup>
4-
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)\kubernetes-client.ruleset</CodeAnalysisRuleSet>
5-
<EnableNETAnalyzers>true</EnableNETAnalyzers>
6-
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
7-
</PropertyGroup>
8-
9-
<PropertyGroup>
10-
<Authors>The Kubernetes Project Authors</Authors>
11-
<Copyright>2017 The Kubernetes Project Authors</Copyright>
12-
<Description>Client library for the Kubernetes open source container orchestrator.</Description>
13-
14-
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
15-
<PackageProjectUrl>https://github.com/kubernetes-client/csharp</PackageProjectUrl>
16-
<PackageIconUrl>https://raw.githubusercontent.com/kubernetes/kubernetes/master/logo/logo.png</PackageIconUrl>
17-
<PackageIcon>logo.png</PackageIcon>
18-
<PackageTags>kubernetes;docker;containers;</PackageTags>
19-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
20-
21-
<!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
22-
<PublishRepositoryUrl>true</PublishRepositoryUrl>
23-
24-
<!-- Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
25-
<IncludeSymbols>true</IncludeSymbols>
26-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
27-
<EmbedUntrackedSources>true</EmbedUntrackedSources>
28-
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
29-
<LangVersion>10.0</LangVersion>
30-
</PropertyGroup>
31-
32-
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
33-
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
34-
</PropertyGroup>
35-
36-
<ItemGroup>
37-
<None Include="../../logo.png" Pack="true" Visible="false" PackagePath="" />
38-
</ItemGroup>
39-
</Project>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)\kubernetes-client.ruleset</CodeAnalysisRuleSet>
5+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
6+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
7+
</PropertyGroup>
8+
9+
<PropertyGroup>
10+
<Authors>The Kubernetes Project Authors</Authors>
11+
<Copyright>2017 The Kubernetes Project Authors</Copyright>
12+
<Description>Client library for the Kubernetes open source container orchestrator.</Description>
13+
14+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
15+
<PackageProjectUrl>https://github.com/kubernetes-client/csharp</PackageProjectUrl>
16+
<PackageIconUrl>https://raw.githubusercontent.com/kubernetes/kubernetes/master/logo/logo.png</PackageIconUrl>
17+
<PackageIcon>logo.png</PackageIcon>
18+
<PackageTags>kubernetes;docker;containers;</PackageTags>
19+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
20+
21+
<!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
22+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
23+
24+
<!-- Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
25+
<IncludeSymbols>true</IncludeSymbols>
26+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
27+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
28+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
29+
<LangVersion>10.0</LangVersion>
30+
</PropertyGroup>
31+
32+
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
33+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
34+
</PropertyGroup>
35+
36+
<ItemGroup>
37+
<None Include="../../logo.png" Pack="true" Visible="false" PackagePath="" />
38+
</ItemGroup>
39+
</Project>

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dotnet add package KubernetesClient
1313
## Authentication/Configuration
1414
You should be able to use a standard KubeConfig file with this library,
1515
see the `BuildConfigFromConfigFile` function below. Most authentication
16-
methods are currently supported, but a few are not, see the
16+
methods are currently supported, but a few are not, see the
1717
[known-issues](https://github.com/kubernetes-client/csharp#known-issues).
1818

1919
You should also be able to authenticate with the in-cluster service
@@ -141,16 +141,16 @@ git clone https://github.com/kubernetes-client/gen
141141

142142
```bash
143143
# Where REPO_DIR points to the root of the csharp repository
144-
cd
144+
cd
145145
${GEN_DIR}/openapi/csharp.sh ${REPO_DIR}/src/KubernetesClient ${REPO_DIR}/csharp.settings
146146
```
147147

148-
# Version Compatibility
148+
# Version Compatibility
149149

150150
| SDK Version | Kubernetes Version | .NET Targeting |
151151
|-------------|--------------------|---------------------------------------|
152-
| 7.0 | 1.23 | netstandard2.1;net5;net6 |
153-
| 6.0 | 1.22 | netstandard2.1;net5 |
152+
| 7.0 | 1.23 | netstandard2.1;net5.0;net6.0 |
153+
| 6.0 | 1.22 | netstandard2.1;net5.0 |
154154
| 5.0 | 1.21 | netstandard2.1;net5 |
155155
| 4.0 | 1.20 | netstandard2.0;netstandard2.1 |
156156
| 3.0 | 1.19 | netstandard2.0;net452 |

examples/Directory.Build.props

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<PropertyGroup>
4-
<TargetFramework>net6</TargetFramework>
5-
</PropertyGroup>
6-
</Project>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
</PropertyGroup>
6+
</Project>

src/KubernetesClient.Basic/KubernetesClient.Basic.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0</TargetFrameworks>
4+
<TargetFramework>netstandard2.0</TargetFramework>
55
<RootNamespace>k8s</RootNamespace>
66
</PropertyGroup>
77

@@ -15,4 +15,4 @@
1515
<ProjectReference Include="..\LibKubernetesGenerator\LibKubernetesGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
1616
</ItemGroup>
1717

18-
</Project>
18+
</Project>

src/KubernetesClient.Models/KubernetesClient.Models.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard2.0</TargetFrameworks>
3+
<TargetFramework>netstandard2.0</TargetFramework>
44
<RootNamespace>k8s.Models</RootNamespace>
55
</PropertyGroup>
66

src/KubernetesClient/KubernetesClient.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.1;net5;net6</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.1;net5.0;net6.0</TargetFrameworks>
55
<RootNamespace>k8s</RootNamespace>
66
</PropertyGroup>
77

@@ -23,4 +23,4 @@
2323
<ProjectReference Include="..\KubernetesClient.Basic\KubernetesClient.Basic.csproj" />
2424
</ItemGroup>
2525

26-
</Project>
26+
</Project>

src/LibKubernetesGenerator/LibKubernetesGenerator.csproj

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFramework>netstandard2.0</TargetFramework>
4-
<LangVersion>10.0</LangVersion>
54
<NoWarn>CA1812</NoWarn>
65
</PropertyGroup>
76

@@ -24,7 +23,7 @@
2423

2524
<PropertyGroup>
2625
<GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths</GetTargetPathDependsOn>
27-
</PropertyGroup>
26+
</PropertyGroup>
2827

2928
<Target Name="GetDependencyTargetPaths">
3029
<ItemGroup>
@@ -39,5 +38,5 @@
3938
<TargetPathWithTargetPlatformMoniker Include="$(PKGSystem_Diagnostics_DiagnosticSource)\lib\netstandard1.3\System.Diagnostics.DiagnosticSource.dll" IncludeRuntimeDependency="false" />
4039
</ItemGroup>
4140
</Target>
42-
41+
4342
</Project>

src/nuget.proj

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
<Project Sdk="Microsoft.Build.Traversal">
2-
<ItemGroup>
3-
<ProjectReference Include="KubernetesClient.Models/KubernetesClient.Models.csproj" />
4-
<ProjectReference Include="KubernetesClient.Basic/KubernetesClient.Basic.csproj" />
5-
<ProjectReference Include="KubernetesClient/KubernetesClient.csproj" />
6-
</ItemGroup>
7-
</Project>
8-
1+
<Project Sdk="Microsoft.Build.Traversal">
2+
<ItemGroup>
3+
<ProjectReference Include="KubernetesClient.Models/KubernetesClient.Models.csproj" />
4+
<ProjectReference Include="KubernetesClient.Basic/KubernetesClient.Basic.csproj" />
5+
<ProjectReference Include="KubernetesClient/KubernetesClient.csproj" />
6+
</ItemGroup>
7+
</Project>

tests/E2E.Tests/E2E.Tests.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<IsPackable>false</IsPackable>
44
<SignAssembly>true</SignAssembly>
55
<RootNamespace>k8s.E2E</RootNamespace>
6-
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks>
6+
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
77
</PropertyGroup>
88

99
<ItemGroup>
1010

1111
<PackageReference Include="JsonPatch.Net" Version="1.1.2" />
1212

13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
1414

1515
<PackageReference Include="Nito.AsyncEx.Coordination" Version="5.1.2" />
1616
<PackageReference Include="xunit" Version="2.4.1" />

tests/KubernetesClient.Tests/KubernetesClient.Tests.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<LangVersion>8</LangVersion>
55
<SignAssembly>true</SignAssembly>
66
<RootNamespace>k8s.Tests</RootNamespace>
7-
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks>
7+
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
88
</PropertyGroup>
99

1010
<ItemGroup>
@@ -24,7 +24,7 @@
2424
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
2525
</PackageReference>
2626

27-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
27+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
2828
<PackageReference Include="xunit" Version="2.4.1" />
2929
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
3030
<PrivateAssets>all</PrivateAssets>

tests/KubernetesClient.Util.Tests/KubernetesClient.Util.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PackageReference Include="MartinCostello.Logging.XUnit" Version="0.1.1" />
1111
<PackageReference Include="FluentAssertions" Version="5.10.3" />
1212
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
1414
<PackageReference Include="xunit" Version="2.4.1" />
1515
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

0 commit comments

Comments
 (0)