Skip to content

Commit

Permalink
libraries - dotnet7 updates #146
Browse files Browse the repository at this point in the history
  • Loading branch information
christiannagel committed Nov 15, 2022
1 parent 58d221e commit 66f7c6d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 25 deletions.
4 changes: 2 additions & 2 deletions 2_Libs/Libraries/CreateNuGet/ConsoleApp/ConsoleApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;netcoreapp3.1</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>10.0</LangVersion>
<LangVersion>11.0</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions 2_Libs/Libraries/CreateNuGet/SampleLib/Demo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ namespace SampleLib;
public class Demo
{
#if NETSTANDARD20
private static string s_info = ".NET Standard 2.0";
#elif NET5_0
private static string s_info = ".NET 5.0";
private readonly static string s_info = ".NET Standard 2.0";
#elif NET6_0
private static string s_info = ".NET 6.0";
private readonly static string s_info = ".NET 6.0";
#elif NET7_0
private readonly static string s_info = ".NET 7.0";
#else
private static string s_info = "Unknown";
private readonly static string s_info = "Unknown";
#endif

public static string Show() => s_info;
Expand Down
26 changes: 11 additions & 15 deletions 2_Libs/Libraries/CreateNuGet/SampleLib/SampleLib.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net5.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;netstandard2.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>10.0</LangVersion>
<LangVersion>11.0</LangVersion>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -18,9 +18,9 @@
<RepositoryType>Git</RepositoryType>
<PackageTags>CSharp; .NET Core; NuGet</PackageTags>
<PackageReleaseNotes>Sample for Professional C# and .NET - 2021 Edition</PackageReleaseNotes>
<Version>6.0.1</Version>
<AssemblyVersion>6.0.1.0</AssemblyVersion>
<ProductVersion>6.0</ProductVersion>
<Version>7.0.1</Version>
<AssemblyVersion>7.0.1.0</AssemblyVersion>
<ProductVersion>7.0</ProductVersion>
</PropertyGroup>

<!--
Expand All @@ -32,24 +32,20 @@
<DefineConstants>NETSTANDARD20</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net5.0'">
<DefineConstants>NET50</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net6.0'">
<DefineConstants>NET60</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net7.0'">
<DefineConstants>NET70</DefineConstants>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Text.Json" Version="5.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="System.Text.Json" Version="5.0.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" Version="6.0.1" />
<ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.0'">
<PackageReference Include="System.Text.Json" Version="7.0.0" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions 2_Libs/Libraries/UsingLibs/ConsoleApp/ConsoleApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand All @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0" />
</ItemGroup>


Expand Down
2 changes: 1 addition & 1 deletion 2_Libs/Libraries/UsingLibs/SampleLib/SampleLib.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down

0 comments on commit 66f7c6d

Please sign in to comment.