Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to .NET 8 #1010

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup .NET Core SDK 6
uses: actions/setup-dotnet@v2
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
dotnet-version: '8.x'

- name: Install dependencies
run: dotnet restore
Expand All @@ -31,10 +31,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup .NET Core SDK 6
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
dotnet-version: '8.x'

- name: Install dependencies
run: dotnet restore
Expand All @@ -60,10 +60,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup .NET Core SDK 6
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
dotnet-version: '8.x'

- name: Install dependencies
run: dotnet restore
Expand Down
96 changes: 45 additions & 51 deletions Gordon360/Gordon360.csproj
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Target Name="GetGitHash" BeforeTargets="WriteGitHash" Condition="'$(BuildHash)' == ''">
<PropertyGroup>
<VerFile>$(IntermediateOutputPath)gitver</VerFile>
<BuildFile>$(IntermediateOutputPath)buildtime</BuildFile>
</PropertyGroup>
<Exec Command="git -C $(ProjectDir) describe --long --always &gt; $(VerFile)" />
<Exec Command="echo $([System.DateTime]::UtcNow) &gt; $(BuildFile)" />
<ReadLinesFromFile File="$(VerFile)">
<Output TaskParameter="Lines" ItemName="GitVersion" />
</ReadLinesFromFile>
<ReadLinesFromFile File="$(BuildFile)">
<Output TaskParameter="Lines" ItemName="BuildTime" />
</ReadLinesFromFile>
<PropertyGroup>
<BuildHash>@(GitVersion)</BuildHash>
<BuildTime>@(BuildTime)</BuildTime>
</PropertyGroup>
</Target>

<Target Name="WriteGitHash" BeforeTargets="CoreCompile">
<PropertyGroup>
<CustomAssemblyInfoFile>$(IntermediateOutputPath)CustomAssemblyInfo.cs</CustomAssemblyInfoFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CustomAssemblyInfoFile)" />
</ItemGroup>
<ItemGroup>
<AssemblyAttributes Include="AssemblyMetadata">
<_Parameter1>GitHash</_Parameter1>
<_Parameter2>$(BuildHash)</_Parameter2>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyMetadata">
<_Parameter1>BuildTime</_Parameter1>
<_Parameter2>$(BuildTime)</_Parameter2>
</AssemblyAttributes>
</ItemGroup>
<WriteCodeFragment Language="C#" OutputFile="$(CustomAssemblyInfoFile)" AssemblyAttributes="@(AssemblyAttributes)" />
</Target>
<PropertyGroup>
<Target Name="GetGitHash" BeforeTargets="WriteGitHash" Condition="'$(BuildHash)' == ''">
<PropertyGroup>
<VerFile>$(IntermediateOutputPath)gitver</VerFile>
<BuildFile>$(IntermediateOutputPath)buildtime</BuildFile>
</PropertyGroup>
<Exec Command="git -C $(ProjectDir) describe --long --always &gt; $(VerFile)" />
<Exec Command="echo $([System.DateTime]::UtcNow) &gt; $(BuildFile)" />
<ReadLinesFromFile File="$(VerFile)">
<Output TaskParameter="Lines" ItemName="GitVersion" />
</ReadLinesFromFile>
<ReadLinesFromFile File="$(BuildFile)">
<Output TaskParameter="Lines" ItemName="BuildTime" />
</ReadLinesFromFile>
<PropertyGroup>
<BuildHash>@(GitVersion)</BuildHash>
<BuildTime>@(BuildTime)</BuildTime>
</PropertyGroup>
</Target>
<Target Name="WriteGitHash" BeforeTargets="CoreCompile">
<PropertyGroup>
<CustomAssemblyInfoFile>$(IntermediateOutputPath)CustomAssemblyInfo.cs</CustomAssemblyInfoFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CustomAssemblyInfoFile)" />
</ItemGroup>
<ItemGroup>
<AssemblyAttributes Include="AssemblyMetadata">
<_Parameter1>GitHash</_Parameter1>
<_Parameter2>$(BuildHash)</_Parameter2>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyMetadata">
<_Parameter1>BuildTime</_Parameter1>
<_Parameter2>$(BuildTime)</_Parameter2>
</AssemblyAttributes>
</ItemGroup>
<WriteCodeFragment Language="C#" OutputFile="$(CustomAssemblyInfoFile)" AssemblyAttributes="@(AssemblyAttributes)" />
</Target>
<PropertyGroup>
<OutputType>Exe</OutputType>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>
Expand All @@ -62,21 +61,16 @@
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.3" />
<PackageReference Include="Microsoft.Graph" Version="4.27.0" />
<PackageReference Include="Microsoft.Identity.Web" Version="1.23.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="6.0.0" />
</ItemGroup>
<PropertyGroup>
<StartupObject></StartupObject>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
Expand All @@ -96,7 +90,7 @@
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UserSecretsId>6b677d3a-d64b-4693-bfe1-4883788ecf0f</UserSecretsId>
<Nullable>enable</Nullable>
Expand Down
Loading