Updating with .NET 6.0
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
|
||||
<LangVersion>10.0</LangVersion>
|
||||
|
||||
<AssemblyName>AMWD.Common.AspNetCore</AssemblyName>
|
||||
<RootNamespace>AMWD.Common.AspNetCore</RootNamespace>
|
||||
@@ -11,7 +11,6 @@
|
||||
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
|
||||
<CopyRefAssembliesToPublishDirectory>false</CopyRefAssembliesToPublishDirectory>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<BuildInParallel>false</BuildInParallel>
|
||||
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
@@ -46,6 +45,11 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.HttpOverrides" Version="1.0.0" />
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
|
||||
<LangVersion>10.0</LangVersion>
|
||||
|
||||
<AssemblyName>AMWD.Common.EntityFrameworkCore</AssemblyName>
|
||||
<RootNamespace>AMWD.Common.EntityFrameworkCore</RootNamespace>
|
||||
@@ -11,7 +11,6 @@
|
||||
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
|
||||
<CopyRefAssembliesToPublishDirectory>false</CopyRefAssembliesToPublishDirectory>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<BuildInParallel>false</BuildInParallel>
|
||||
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
@@ -49,6 +48,13 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.4.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
@@ -183,7 +183,7 @@ END;"
|
||||
// max length in the database: 250 chars
|
||||
string trimmedFileName = fileName;
|
||||
if (trimmedFileName.Length > 250)
|
||||
fileName = fileName.Substring(0, 250);
|
||||
fileName = fileName[..250];
|
||||
|
||||
if (migratedFiles.Contains(trimmedFileName))
|
||||
{
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace AMWD.Common.EntityFrameworkCore.Extensions
|
||||
switch (state)
|
||||
{
|
||||
case SnakeCaseState.Upper:
|
||||
bool hasNext = (i + 1 < value.Length);
|
||||
bool hasNext = i + 1 < value.Length;
|
||||
if (i > 0 && hasNext)
|
||||
{
|
||||
char nextChar = value[i + 1];
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
<LangVersion>10.0</LangVersion>
|
||||
|
||||
<AssemblyName>AMWD.Common</AssemblyName>
|
||||
<RootNamespace>AMWD.Common</RootNamespace>
|
||||
@@ -11,7 +11,6 @@
|
||||
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
|
||||
<CopyRefAssembliesToPublishDirectory>false</CopyRefAssembliesToPublishDirectory>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<BuildInParallel>false</BuildInParallel>
|
||||
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
|
||||
@@ -46,8 +46,8 @@ namespace System
|
||||
/// <summary>
|
||||
/// Encodes a string to the hexadecimal system (base 16).
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="encoding"></param>
|
||||
/// <param name="str">The string to encode hexadecimal.</param>
|
||||
/// <param name="encoding">The text encoding to use (default: <see cref="Encoding.Default"/>)</param>
|
||||
/// <returns></returns>
|
||||
public static string HexEncode(this string str, Encoding encoding = null)
|
||||
{
|
||||
@@ -60,8 +60,8 @@ namespace System
|
||||
/// <summary>
|
||||
/// Decodes a string from the hexadecimal system (base 16).
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="encoding"></param>
|
||||
/// <param name="str">The hexadecimal encoded string to decode.</param>
|
||||
/// <param name="encoding">The text encoding to use (default: <see cref="Encoding.Default"/>)</param>
|
||||
/// <returns></returns>
|
||||
public static string HexDecode(this string str, Encoding encoding = null)
|
||||
{
|
||||
@@ -74,8 +74,8 @@ namespace System
|
||||
/// <summary>
|
||||
/// Encodes a string to base64.
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="encoding"></param>
|
||||
/// <param name="str">The string to encode with base64.</param>
|
||||
/// <param name="encoding">The text encoding to use (default: <see cref="Encoding.Default"/>)</param>
|
||||
/// <returns></returns>
|
||||
public static string Base64Encode(this string str, Encoding encoding = null)
|
||||
=> Convert.ToBase64String((encoding ?? Encoding.Default).GetBytes(str));
|
||||
@@ -83,8 +83,8 @@ namespace System
|
||||
/// <summary>
|
||||
/// Decodes a string from base64.
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="encoding"></param>
|
||||
/// <param name="str">The base64 encoded string to decode.</param>
|
||||
/// <param name="encoding">The text encoding to use (default: <see cref="Encoding.Default"/>)</param>
|
||||
/// <returns></returns>
|
||||
public static string Base64Decode(this string str, Encoding encoding = null)
|
||||
=> (encoding ?? Encoding.Default).GetString(Convert.FromBase64String(str));
|
||||
|
||||
Reference in New Issue
Block a user