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