Skip to content

Commit

Permalink
Standardize TargetFramwork for VisualStudio IDE (kubernetes-client#810)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
stan-sz and tg123 authored Mar 29, 2022
1 parent 57037f0 commit 9e6e2f0
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 71 deletions.
78 changes: 39 additions & 39 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)\kubernetes-client.ruleset</CodeAnalysisRuleSet>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup>
<Authors>The Kubernetes Project Authors</Authors>
<Copyright>2017 The Kubernetes Project Authors</Copyright>
<Description>Client library for the Kubernetes open source container orchestrator.</Description>

<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/kubernetes-client/csharp</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/kubernetes/kubernetes/master/logo/logo.png</PackageIconUrl>
<PackageIcon>logo.png</PackageIcon>
<PackageTags>kubernetes;docker;containers;</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<LangVersion>10.0</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
<None Include="../../logo.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)\kubernetes-client.ruleset</CodeAnalysisRuleSet>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<PropertyGroup>
<Authors>The Kubernetes Project Authors</Authors>
<Copyright>2017 The Kubernetes Project Authors</Copyright>
<Description>Client library for the Kubernetes open source container orchestrator.</Description>

<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/kubernetes-client/csharp</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/kubernetes/kubernetes/master/logo/logo.png</PackageIconUrl>
<PackageIcon>logo.png</PackageIcon>
<PackageTags>kubernetes;docker;containers;</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>

<!-- Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<LangVersion>10.0</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
<None Include="../../logo.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>
</Project>
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dotnet add package KubernetesClient
## Authentication/Configuration
You should be able to use a standard KubeConfig file with this library,
see the `BuildConfigFromConfigFile` function below. Most authentication
methods are currently supported, but a few are not, see the
methods are currently supported, but a few are not, see the
[known-issues](https://github.com/kubernetes-client/csharp#known-issues).

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

```bash
# Where REPO_DIR points to the root of the csharp repository
cd
cd
${GEN_DIR}/openapi/csharp.sh ${REPO_DIR}/src/KubernetesClient ${REPO_DIR}/csharp.settings
```

# Version Compatibility
# Version Compatibility

| SDK Version | Kubernetes Version | .NET Targeting |
|-------------|--------------------|---------------------------------------|
| 7.0 | 1.23 | netstandard2.1;net5;net6 |
| 6.0 | 1.22 | netstandard2.1;net5 |
| 7.0 | 1.23 | netstandard2.1;net5.0;net6.0 |
| 6.0 | 1.22 | netstandard2.1;net5.0 |
| 5.0 | 1.21 | netstandard2.1;net5 |
| 4.0 | 1.20 | netstandard2.0;netstandard2.1 |
| 3.0 | 1.19 | netstandard2.0;net452 |
Expand Down
12 changes: 6 additions & 6 deletions examples/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions src/KubernetesClient.Basic/KubernetesClient.Basic.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>k8s</RootNamespace>
</PropertyGroup>

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

</Project>
</Project>
2 changes: 1 addition & 1 deletion src/KubernetesClient.Models/KubernetesClient.Models.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>k8s.Models</RootNamespace>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions src/KubernetesClient/KubernetesClient.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net5;net6</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net5.0;net6.0</TargetFrameworks>
<RootNamespace>k8s</RootNamespace>
</PropertyGroup>

Expand All @@ -23,4 +23,4 @@
<ProjectReference Include="..\KubernetesClient.Basic\KubernetesClient.Basic.csproj" />
</ItemGroup>

</Project>
</Project>
5 changes: 2 additions & 3 deletions src/LibKubernetesGenerator/LibKubernetesGenerator.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>10.0</LangVersion>
<NoWarn>CA1812</NoWarn>
</PropertyGroup>

Expand All @@ -24,7 +23,7 @@

<PropertyGroup>
<GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths</GetTargetPathDependsOn>
</PropertyGroup>
</PropertyGroup>

<Target Name="GetDependencyTargetPaths">
<ItemGroup>
Expand All @@ -39,5 +38,5 @@
<TargetPathWithTargetPlatformMoniker Include="$(PKGSystem_Diagnostics_DiagnosticSource)\lib\netstandard1.3\System.Diagnostics.DiagnosticSource.dll" IncludeRuntimeDependency="false" />
</ItemGroup>
</Target>

</Project>
15 changes: 7 additions & 8 deletions src/nuget.proj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.Build.Traversal">
<ItemGroup>
<ProjectReference Include="KubernetesClient.Models/KubernetesClient.Models.csproj" />
<ProjectReference Include="KubernetesClient.Basic/KubernetesClient.Basic.csproj" />
<ProjectReference Include="KubernetesClient/KubernetesClient.csproj" />
</ItemGroup>
</Project>

<Project Sdk="Microsoft.Build.Traversal">
<ItemGroup>
<ProjectReference Include="KubernetesClient.Models/KubernetesClient.Models.csproj" />
<ProjectReference Include="KubernetesClient.Basic/KubernetesClient.Basic.csproj" />
<ProjectReference Include="KubernetesClient/KubernetesClient.csproj" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions tests/E2E.Tests/E2E.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<IsPackable>false</IsPackable>
<SignAssembly>true</SignAssembly>
<RootNamespace>k8s.E2E</RootNamespace>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>

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

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />

<PackageReference Include="Nito.AsyncEx.Coordination" Version="5.1.2" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand Down
4 changes: 2 additions & 2 deletions tests/KubernetesClient.Tests/KubernetesClient.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<LangVersion>8</LangVersion>
<SignAssembly>true</SignAssembly>
<RootNamespace>k8s.Tests</RootNamespace>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -24,7 +24,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageReference Include="MartinCostello.Logging.XUnit" Version="0.1.1" />
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit 9e6e2f0

Please sign in to comment.