Skip to content

Commit

Permalink
Upgrade to .NET 8.0, and use Central Package Management.
Browse files Browse the repository at this point in the history
  • Loading branch information
IEvangelist committed Nov 17, 2023
1 parent da91a52 commit 407d40e
Show file tree
Hide file tree
Showing 25 changed files with 998 additions and 1,020 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
uses: actions/setup-dotnet@main
with:
dotnet-version: 8.0.x
dotnet-quality: preview

- name: Restore dependencies for ${{ matrix.project }}
run: |
Expand All @@ -64,7 +63,6 @@ jobs:
uses: actions/setup-dotnet@main
with:
dotnet-version: 8.0.x
dotnet-quality: preview

- name: Run tests
run: |
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
uses: actions/setup-dotnet@main
with:
dotnet-version: 8.0.x
dotnet-quality: preview
- name: Test
run: dotnet test --filter "Category!=EndToEnd" --configuration Release

Expand Down Expand Up @@ -67,7 +66,6 @@ jobs:
uses: actions/setup-dotnet@main
with:
dotnet-version: 8.0.x
dotnet-quality: preview

- name: Restore dependencies for ${{ matrix.project }}
run: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/publish-to-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
uses: actions/setup-dotnet@main
with:
dotnet-version: 8.0.x
dotnet-quality: preview
- name: Publish .NET Core Project
run: dotnet publish samples/Blazor.ExampleConsumer/Blazor.ExampleConsumer.csproj -c Release -o release --nologo

Expand Down
73 changes: 29 additions & 44 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,46 +1,31 @@
<Project>
<PropertyGroup>
<_ParentDirectoryBuildPropsPath Condition="'$(_DirectoryBuildPropsFile)' != ''">$([System.IO.Path]::Combine('..', '$(_DirectoryBuildPropsFile)'))</_ParentDirectoryBuildPropsPath>
</PropertyGroup>

<Import Project="$(_ParentDirectoryBuildPropsPath)" Condition="Exists('$(_ParentDirectoryBuildPropsPath)')"/>

<PropertyGroup>
<WarningLevel>3</WarningLevel>
<AnalysisLevel>preview</AnalysisLevel>
<Features>strict</Features>
</PropertyGroup>

<PropertyGroup>
<DefaultTargetFrameworks>net7.0;net8.0</DefaultTargetFrameworks>
</PropertyGroup>

<!-- .NET 7 package reference versions -->
<PropertyGroup Condition="'$(TargetFramework)' == 'net7.0'">
<DependencyInjectionVersion>7.0.0</DependencyInjectionVersion>
<PrimitivesVersion>7.0.0</PrimitivesVersion>
<JSInteropVersion>7.0.12</JSInteropVersion>
<ComponentsWebVersion>7.0.12</ComponentsWebVersion>
</PropertyGroup>

<!-- .NET 8 package reference versions -->
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
<DependencyInjectionVersion>8.0.0-rc.2.23479.6</DependencyInjectionVersion>
<PrimitivesVersion>8.0.0-rc.2.23479.6</PrimitivesVersion>
<JSInteropVersion>8.0.0-rc.2.23480.2</JSInteropVersion>
<ComponentsWebVersion>8.0.0-rc.2.23480.2</ComponentsWebVersion>
</PropertyGroup>

<PropertyGroup>
<IsPackable>true</IsPackable>
</PropertyGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup>
<SourceLinkCreate>true</SourceLinkCreate>
<SourceLinkOriginUrl>https://github.com/IEvangelist/azure-cosmos-dotnet-repository</SourceLinkOriginUrl>
</PropertyGroup>
<PropertyGroup>
<_ParentDirectoryBuildPropsPath Condition="'$(_DirectoryBuildPropsFile)' != ''">$([System.IO.Path]::Combine('..', '$(_DirectoryBuildPropsFile)'))</_ParentDirectoryBuildPropsPath>
</PropertyGroup>

<Import Project="$(_ParentDirectoryBuildPropsPath)" Condition="Exists('$(_ParentDirectoryBuildPropsPath)')"/>

<PropertyGroup>
<WarningLevel>3</WarningLevel>
<AnalysisLevel>preview</AnalysisLevel>
<Features>strict</Features>
</PropertyGroup>

<PropertyGroup>
<DefaultTargetFrameworks>net7.0;net8.0</DefaultTargetFrameworks>
<LangVersion>preview</LangVersion>
</PropertyGroup>

<PropertyGroup>
<IsPackable>true</IsPackable>
</PropertyGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup>
<SourceLinkCreate>true</SourceLinkCreate>
<SourceLinkOriginUrl>https://github.com/IEvangelist/azure-cosmos-dotnet-repository</SourceLinkOriginUrl>
</PropertyGroup>
</Project>
41 changes: 41 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>

<!-- Use these versions regardless of TFM -->
<ItemGroup>
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="MinVer" Version="5.0.0-beta.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="System.Reactive.Linq" Version="6.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageVersion Include="Microsoft.Playwright" Version="1.39.0" />
<PackageVersion Include="xunit" Version="2.6.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
<PackageVersion Include="Basic.Reference.Assemblies" Version="1.4.5" />
<PackageVersion Include="Humanizer.Core" Version="2.14.1" />
</ItemGroup>

<!-- .NET 7.0 bits -->
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="7.0.14" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Primitives" Version="7.0.0" />
<PackageVersion Include="Microsoft.JSInterop" Version="7.0.14" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.14" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.14" />
</ItemGroup>

<!-- .NET 8.0 bits -->
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Primitives" Version="8.0.0" />
<PackageVersion Include="Microsoft.JSInterop" Version="8.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions blazorators.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
.gitignore = .gitignore
Directory.Build.props = Directory.Build.props
Directory.Packages.props = Directory.Packages.props
LICENSE = LICENSE
logo-large.png = logo-large.png
logo.png = logo.png
Expand Down
37 changes: 18 additions & 19 deletions samples/Blazor.ExampleConsumer/Blazor.ExampleConsumer.csproj
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Humanizer.Core" Version="2.14.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0-rc.2.23480.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0-rc.2.23480.2" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Humanizer.Core" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Blazor.Geolocation.WebAssembly\Blazor.Geolocation.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.LocalStorage.WebAssembly\Blazor.LocalStorage.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.Serialization\Blazor.Serialization.csproj" />
<ProjectReference Include="..\..\src\Blazor.SessionStorage.WebAssembly\Blazor.SessionStorage.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechRecognition.WebAssembly\Blazor.SpeechRecognition.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechSynthesis.WebAssembly\Blazor.SpeechSynthesis.WebAssembly.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Blazor.Geolocation.WebAssembly\Blazor.Geolocation.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.LocalStorage.WebAssembly\Blazor.LocalStorage.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.Serialization\Blazor.Serialization.csproj" />
<ProjectReference Include="..\..\src\Blazor.SessionStorage.WebAssembly\Blazor.SessionStorage.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechRecognition.WebAssembly\Blazor.SpeechRecognition.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechSynthesis.WebAssembly\Blazor.SpeechSynthesis.WebAssembly.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Humanizer.Core" Version="2.14.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Humanizer.Core" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Blazor.Geolocation\Blazor.Geolocation.csproj" />
<ProjectReference Include="..\..\src\Blazor.LocalStorage\Blazor.LocalStorage.csproj" />
<ProjectReference Include="..\..\src\Blazor.Serialization\Blazor.Serialization.csproj" />
<ProjectReference Include="..\..\src\Blazor.SessionStorage\Blazor.SessionStorage.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechRecognition\Blazor.SpeechRecognition.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechSynthesis\Blazor.SpeechSynthesis.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Blazor.Geolocation\Blazor.Geolocation.csproj" />
<ProjectReference Include="..\..\src\Blazor.LocalStorage\Blazor.LocalStorage.csproj" />
<ProjectReference Include="..\..\src\Blazor.Serialization\Blazor.Serialization.csproj" />
<ProjectReference Include="..\..\src\Blazor.SessionStorage\Blazor.SessionStorage.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechRecognition\Blazor.SpeechRecognition.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechSynthesis\Blazor.SpeechSynthesis.csproj" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions samples/BlazorServer.ExampleConsumer/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

global using System.Text.Json;
global using System.Text.Json.Serialization;
global using BlazorServer.ExampleConsumer.Models;
global using Microsoft.AspNetCore.Components;
global using Microsoft.JSInterop;
global using Microsoft.AspNetCore.Components;
global using BlazorServer.ExampleConsumer.Models;
global using static System.Globalization.CultureInfo;
Loading

0 comments on commit 407d40e

Please sign in to comment.