Skip to content

Commit

Permalink
Upgraded to .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
bislerium committed Nov 30, 2023
1 parent 47099c7 commit b759a3d
Show file tree
Hide file tree
Showing 121 changed files with 706 additions and 1,203 deletions.
101 changes: 86 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# Created by https://www.toptal.com/developers/gitignore/api/csharp,dotnetcore
# Edit at https://www.toptal.com/developers/gitignore?templates=csharp,dotnetcore

### Csharp ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
## Get latest from `dotnet new gitignore`

.vscode/
# dotenv files
.env

# User-specific files
*.rsuser
Expand Down Expand Up @@ -63,11 +60,14 @@ dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/

# .NET Core
# .NET
project.lock.json
project.fragment.lock.json
artifacts/

# Tye
.tye/

# ASP.NET Scaffolding
ScaffoldingReadMe.txt

Expand Down Expand Up @@ -308,6 +308,8 @@ node_modules/
*.dsp

# Visual Studio 6 technical files
*.ncb
*.aps

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
Expand Down Expand Up @@ -400,14 +402,83 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml
.idea

##
## Visual studio for Mac
##

### DotnetCore ###
# .NET Core build folders
bin/
obj/

# Common node modules locations
/node_modules
/wwwroot/node_modules
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/

# Mac bundle stuff
*.dmg
*.app

# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/csharp,dotnetcore
# Vim temporary swap files
*.swp
13 changes: 7 additions & 6 deletions App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
namespace BikeSparesInventorySystem;

public partial class App : Application
namespace BikeSparesInventorySystem
{
public App()
public partial class App : Application
{
InitializeComponent();
public App()
{
InitializeComponent();

MainPage = new MainPage();
MainPage = new MainPage();
}
}
}
129 changes: 66 additions & 63 deletions BikeSparesInventorySystem.csproj
Original file line number Diff line number Diff line change
@@ -1,72 +1,75 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>BikeSparesInventorySystem</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<EnableDefaultCssItems>false</EnableDefaultCssItems>

<!-- Display name -->
<ApplicationTitle>Bikare</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.companyname.bikesparesinventorysystem</ApplicationId>
<ApplicationIdGuid>082A4B34-31E2-40AF-B128-8FFC7F395313</ApplicationIdGuid>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-maccatalyst|AnyCPU'">
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-maccatalyst|AnyCPU'">
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-windows10.0.19041.0|AnyCPU'">
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-windows10.0.19041.0|AnyCPU'">
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>

<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" />

<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />

<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<PropertyGroup>
<TargetFrameworks>net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->

<OutputType>Exe</OutputType>
<RootNamespace>BikeSparesInventorySystem</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<EnableDefaultCssItems>false</EnableDefaultCssItems>
<Nullable>enable</Nullable>

<!-- Display name -->
<ApplicationTitle>Bikare</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.companyname.bikesparesinventorysystem</ApplicationId>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>

<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />

<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />

<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Bogus" Version="34.0.2" />
<PackageReference Include="CsvHelper" Version="30.0.1" />
<PackageReference Include="ExcelMapper" Version="5.2.542" />
<PackageReference Include="MudBlazor" Version="6.11.0" />
<PackageReference Include="PSC.Blazor.Components.Chartjs" Version="6.0.41" />
<PackageReference Include="MudBlazor" Version="6.11.1" />
<PackageReference Include="PSC.Blazor.Components.Chartjs" Version="6.0.43" />
</ItemGroup>

</Project>
</Project>
19 changes: 10 additions & 9 deletions BikeSparesInventorySystem.sln
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31611.283
VisualStudioVersion = 17.8.34316.72
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BikeSparesInventorySystem", "BikeSparesInventorySystem.csproj", "{D15FA96D-38D1-47C2-8E54-626D3809E031}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BikeSparesInventorySystem", "BikeSparesInventorySystem.csproj", "{85FA3708-1E7F-4C62-954E-7CECB80D5CFF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D15FA96D-38D1-47C2-8E54-626D3809E031}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D15FA96D-38D1-47C2-8E54-626D3809E031}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D15FA96D-38D1-47C2-8E54-626D3809E031}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{D15FA96D-38D1-47C2-8E54-626D3809E031}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D15FA96D-38D1-47C2-8E54-626D3809E031}.Release|Any CPU.Build.0 = Release|Any CPU
{D15FA96D-38D1-47C2-8E54-626D3809E031}.Release|Any CPU.Deploy.0 = Release|Any CPU
{85FA3708-1E7F-4C62-954E-7CECB80D5CFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85FA3708-1E7F-4C62-954E-7CECB80D5CFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85FA3708-1E7F-4C62-954E-7CECB80D5CFF}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{85FA3708-1E7F-4C62-954E-7CECB80D5CFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{85FA3708-1E7F-4C62-954E-7CECB80D5CFF}.Release|Any CPU.Build.0 = Release|Any CPU
{85FA3708-1E7F-4C62-954E-7CECB80D5CFF}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
SolutionGuid = {F7523861-47C9-41AB-923B-489660167ABA}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@inject ISnackbar Snackbar
@inject IDialogService DialogService
@inject BikeSparesInventorySystem.Data.Repositories.Repository<Spare> SpareRepository;
@inject BikeSparesInventorySystem.Repositories.Repository<Spare> SpareRepository;

<MudFab Color="Color.Primary" DisableElevation="true" StartIcon="@Icons.Material.Filled.Approval" IconSize="Size.Small" OnClick="Approve" Label="Approve" />
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace BikeSparesInventorySystem.Shared.Buttons;
namespace BikeSparesInventorySystem.Components.Buttons;

public partial class ApproveButton
{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace BikeSparesInventorySystem.Shared.Buttons;
namespace BikeSparesInventorySystem.Components.Buttons;

public partial class DarkModeButton
{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace BikeSparesInventorySystem.Shared.Buttons;
namespace BikeSparesInventorySystem.Components.Buttons;

public partial class ExportButton<T> where T : IModel
{
Expand All @@ -14,7 +14,7 @@ public async Task ExportFile(FileExtension extension)
try
{
string filePath = Explorer.GetDefaultExportFilePath<T>(extension);
Data.Providers.FileProvider<T> provider = Explorer.GetFileProvider<T>(extension);
FileProvider<T> provider = Explorer.GetFileProvider<T>(extension);
await repo.ExportAsync(provider, filePath);

Snackbar.Add($"Exported to {filePath}!", Severity.Info);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace BikeSparesInventorySystem.Shared.Buttons;
namespace BikeSparesInventorySystem.Components.Buttons;

public partial class ImportButton<T> where T : IModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@inject BikeSparesInventorySystem.Data.Services.AuthService AuthService;
@inject BikeSparesInventorySystem.Services.AuthService AuthService;
@inject NavigationManager NavigationManager;
@inject IDialogService DialogService
@inject ISnackbar Snackbar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using BikeSparesInventorySystem.Pages;

namespace BikeSparesInventorySystem.Shared.Buttons;
namespace BikeSparesInventorySystem.Components.Buttons;

public partial class LogoutButton
{
Expand Down
5 changes: 5 additions & 0 deletions Components/Buttons/SeedButton.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@inject BikeSparesInventorySystem.Services.SeederService _seederService;
@inject BikeSparesInventorySystem.Repositories.Repository<User> UserRepository
@inject ISnackbar SnackBar;

<MudButton OnClick="@SeedData">Seed</MudButton>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace BikeSparesInventorySystem.Shared.Buttons;
namespace BikeSparesInventorySystem.Components.Buttons;

public partial class SeedButton
{
Expand Down
Loading

0 comments on commit b759a3d

Please sign in to comment.