Skip to content

Commit

Permalink
COREX-525 [Cleanup] - Update from net6.0 to net8.0 - templates (#39)
Browse files Browse the repository at this point in the history
- Update net6.0 to net8.0
  • Loading branch information
raffii90 authored May 24, 2024
1 parent 607f88f commit 77e048a
Show file tree
Hide file tree
Showing 12 changed files with 222 additions and 226 deletions.
84 changes: 42 additions & 42 deletions content/BatchJobProcessor/BatchJobProcessor.csproj
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<LangVersion>latest</LangVersion>
<RootNamespace>EMG</RootNamespace>
<AssemblyName>EMG.BatchJobProcessor</AssemblyName>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<LangVersion>latest</LangVersion>
<RootNamespace>EMG</RootNamespace>
<AssemblyName>EMG.BatchJobProcessor</AssemblyName>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

<ItemGroup>
<!--#if (ConfigureAWS)-->
<PackageReference Include="AWSSDK.Core" Version="3.7.106.44" />
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="3.7.7" />
<!--#endif-->
<!--#if (AddLoggly)-->
<PackageReference Include="EMG.Extensions.Logging.Loggly" Version="1.3.0" />
<!--#endif-->
<ItemGroup>
<!--#if (ConfigureAWS)-->
<PackageReference Include="AWSSDK.Core" Version="3.7.304.4" />
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="3.7.300" />
<!--#endif-->
<!--#if (AddLoggly)-->
<PackageReference Include="EMG.Extensions.Logging.Loggly" Version="1.4.0" />
<!--#endif-->

<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="6.0.0" />
<PackageReference Include="Kralizek.Extensions.Configuration.Objects" Version="2.0.1" />

<PackageReference Include="Kralizek.Extensions.Logging" Version="2.0.1" />
<PackageReference Include="AWS.Logger.AspNetCore" Version="3.1.0" />

<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.0.2" />
</ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="8.0.0" />
<PackageReference Include="Kralizek.Extensions.Configuration.Objects" Version="2.0.1" />

<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="appsettings.*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="hostsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<PackageReference Include="Kralizek.Extensions.Logging" Version="3.0.0" />
<PackageReference Include="AWS.Logger.AspNetCore" Version="3.5.3" />

<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.0.2" />
</ItemGroup>

<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="appsettings.*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="hostsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions content/BatchJobProcessor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ private async Task OnExecuteAsync(CommandLineApplication app)
OptionalArgument = OptionalArgument
};

logger.LogInformation(parameters, s => $"Starting job");
logger.LogInformation($"Starting job", parameters);

await processor.ExecuteAsync(parameters).ConfigureAwait(false);

logger.LogInformation(parameters, s => $"Job complete");
logger.LogInformation($"Job complete", parameters);

logglyProcessor.FlushMessages(); // flush the logs, to prevent losing logs due to buffering for short lived applications
}
Expand Down
58 changes: 29 additions & 29 deletions content/EventLambdaFunction/EventLambdaFunction.csproj
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AWSProjectType>Lambda</AWSProjectType>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<RootNamespace>EMG</RootNamespace>
<AssemblyName>EMG.EventLambdaFunction</AssemblyName>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AWSProjectType>Lambda</AWSProjectType>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<RootNamespace>EMG</RootNamespace>
<AssemblyName>EMG.EventLambdaFunction</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Amazon.Lambda.Logging.AspNetCore" Version="3.1.0" />
<!--#if (ConfigureAWS)-->
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="3.7.7" />
<!--#endif-->
<!--#if (AddLoggly)-->
<PackageReference Include="EMG.Extensions.Logging.Loggly" Version="1.3.0" />
<!--#endif-->
<PackageReference Include="Kralizek.Extensions.Logging" Version="2.0.1" />
<PackageReference Include="Kralizek.Lambda.Template" Version="5.0.0" />
<PackageReference Include="Kralizek.Extensions.Configuration.Objects" Version="2.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Amazon.Lambda.Logging.AspNetCore" Version="3.1.0" />
<!--#if (ConfigureAWS)-->
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="3.7.300" />
<!--#endif-->
<!--#if (AddLoggly)-->
<PackageReference Include="EMG.Extensions.Logging.Loggly" Version="1.4.0" />
<!--#endif-->
<PackageReference Include="Kralizek.Extensions.Logging" Version="3.0.0" />
<PackageReference Include="Kralizek.Lambda.Template" Version="5.0.0" />
<PackageReference Include="Kralizek.Extensions.Configuration.Objects" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions content/EventLambdaFunction/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"Mock Lambda Test Tool": {
"commandName": "Executable",
"commandLineArgs": "--port 5050",
"workingDirectory": ".\\bin\\$(Configuration)\\net6.0",
"executablePath": "%USERPROFILE%\\.dotnet\\tools\\dotnet-lambda-test-tool-6.0.exe"
"workingDirectory": ".\\bin\\$(Configuration)\\net8.0",
"executablePath": "%USERPROFILE%\\.dotnet\\tools\\dotnet-lambda-test-tool-8.0.exe"
}
}
}
4 changes: 2 additions & 2 deletions content/EventLambdaFunction/aws-lambda-tools-defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"profile": "",
"region": "eu-west-1",
"configuration": "Release",
"framework": "net6.0",
"framework": "net8.0",
"function-name": "EventLambdaFunction",
"function-role": "",
"function-runtime": "dotnet6",
"function-runtime": "dotnet8",
"function-memory-size": 128,
"function-timeout": 30,
"function-handler": "EMG.EventLambdaFunction::EMG.Function::FunctionHandlerAsync"
Expand Down
10 changes: 5 additions & 5 deletions content/HostedService/HostedService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(RequiresWindows)' == 'False' OR '$(RequiresWindows)' == ''">net6.0</TargetFramework>
<TargetFramework Condition="'$(RequiresWindows)' == 'False' OR '$(RequiresWindows)' == ''">net8.0</TargetFramework>
<TargetFramework Condition="'$(RequiresWindows)' == 'True'">net48</TargetFramework>
<LangVersion>latest</LangVersion>
<RootNamespace>EMG.Hosted_Service</RootNamespace>
Expand All @@ -11,10 +11,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EMG.Extensions.Logging.Loggly" Version="1.3.0" />
<PackageReference Include="Kralizek.Extensions.Logging" Version="2.0.1" />
<PackageReference Include="Kralizek.Extensions.Configuration.Objects" Version="2.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
<PackageReference Include="EMG.Extensions.Logging.Loggly" Version="1.4.0" />
<PackageReference Include="Kralizek.Extensions.Logging" Version="3.0.0" />
<PackageReference Include="Kralizek.Extensions.Configuration.Objects" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(Nybus)' == 'Current'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"Mock Lambda Test Tool": {
"commandName": "Executable",
"commandLineArgs": "--port 5050",
"workingDirectory": ".\\bin\\$(Configuration)\\net6.0",
"executablePath": "%USERPROFILE%\\.dotnet\\tools\\dotnet-lambda-test-tool-6.0.exe"
"workingDirectory": ".\\bin\\$(Configuration)\\net8.0",
"executablePath": "%USERPROFILE%\\.dotnet\\tools\\dotnet-lambda-test-tool-8.0.exe"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AWSProjectType>Lambda</AWSProjectType>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<RootNamespace>EMG</RootNamespace>
<AssemblyName>EMG.RequestResponseLambdaFunction</AssemblyName>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AWSProjectType>Lambda</AWSProjectType>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<RootNamespace>EMG</RootNamespace>
<AssemblyName>EMG.RequestResponseLambdaFunction</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Amazon.Lambda.Logging.AspNetCore" Version="3.1.0" />
<!--#if (ConfigureAWS)-->
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="3.7.7" />
<!--#endif-->
<!--#if (AddLoggly)-->
<PackageReference Include="EMG.Extensions.Logging.Loggly" Version="1.3.0" />
<!--#endif-->
<PackageReference Include="Kralizek.Extensions.Logging" Version="2.0.1" />
<PackageReference Include="Kralizek.Lambda.Template" Version="5.0.0" />
<PackageReference Include="Kralizek.Extensions.Configuration.Objects" Version="2.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Amazon.Lambda.Logging.AspNetCore" Version="3.1.0" />
<!--#if (ConfigureAWS)-->
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="3.7.300" />
<!--#endif-->
<!--#if (AddLoggly)-->
<PackageReference Include="EMG.Extensions.Logging.Loggly" Version="1.4.0" />
<!--#endif-->
<PackageReference Include="Kralizek.Extensions.Logging" Version="3.0.0" />
<PackageReference Include="Kralizek.Lambda.Template" Version="5.0.0" />
<PackageReference Include="Kralizek.Extensions.Configuration.Objects" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"profile": "",
"region": "eu-west-1",
"configuration": "Release",
"framework": "net6.0",
"framework": "net8.0",
"function-name": "RequestResponseLambdaFunction",
"function-role": "",
"function-runtime": "dotnet6",
"function-runtime": "dotnet8",
"function-memory-size": 128,
"function-timeout": 30,
"function-handler": "EMG.RequestResponseLambdaFunction::EMG.Function::FunctionHandlerAsync"
Expand Down
45 changes: 22 additions & 23 deletions content/UnitTestProject/UnitTestProject.csproj
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!--#if (TargetFramework == 'netcore') -->
<TargetFramework>net6.0</TargetFramework>
<!-- #elseif (TargetFramework == 'fx')
<TargetFramework>net48</TargetFramework>
#elseif (TargetFramework == 'both')
<TargetFrameworks>netcoreapp3.1;net48</TargetFrameworks>
#endif -->
<IsPackable>false</IsPackable>
<RootNamespace>Tests</RootNamespace>
<AssemblyName>UnitTestProject</AssemblyName>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup>
<!--#if (TargetFramework == 'netcore') -->
<TargetFramework>net8.0</TargetFramework>
<!-- #elseif (TargetFramework == 'fx')
<TargetFramework>net48</TargetFramework>
#elseif (TargetFramework == 'both')
<TargetFrameworks>net8.0;net48</TargetFrameworks>
#endif -->
<IsPackable>false</IsPackable>
<RootNamespace>Tests</RootNamespace>
<AssemblyName>UnitTestProject</AssemblyName>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.18.0" />
<PackageReference Include="AutoFixture.AutoMoq" Version="4.18.0" />
<PackageReference Include="AutoFixture.Idioms" Version="4.18.0" />
<PackageReference Include="AutoFixture.NUnit3" Version="4.18.0" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoFixture.AutoMoq" Version="4.18.1" />
<PackageReference Include="AutoFixture.Idioms" Version="4.18.1" />
<PackageReference Include="AutoFixture.NUnit3" Version="4.18.1" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
</ItemGroup>

</Project>
Loading

0 comments on commit 77e048a

Please sign in to comment.