Skip to content

Commit

Permalink
Migration to .net 8 #286
Browse files Browse the repository at this point in the history
  • Loading branch information
valentasm committed Dec 15, 2023
1 parent a468053 commit a272f1b
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 29 deletions.
2 changes: 1 addition & 1 deletion BlazorGoogleMaps.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClientSideDemoNet7", "ClientSideDemoNet7\ClientSideDemoNet7.csproj", "{101D4021-9338-498D-834D-0335F6B8175B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClientSideDemoNet8", "ClientSideDemoNet7\ClientSideDemoNet8.csproj", "{101D4021-9338-498D-834D-0335F6B8175B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 1 addition & 1 deletion ClientSideDemoNet7/App.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@using ClientSideDemoNet7
@using ClientSideDemoNet8
<Router AppAssembly="@typeof(Startup).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
2 changes: 0 additions & 2 deletions ClientSideDemoNet7/Pages/MapMarker.razor
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
@page "/mapMarker"
@using GoogleMapsComponents
@using GoogleMapsComponents.Maps
@using System.Diagnostics
@using ClientSideDemoNet7.Shared

<h1>Google Map Markers</h1>

Expand Down
6 changes: 3 additions & 3 deletions ClientSideDemoNet7/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using System.Threading.Tasks;

namespace ClientSideDemoNet7
namespace ClientSideDemoNet8
{
public class Startup
{
Expand Down
4 changes: 2 additions & 2 deletions ClientSideDemoNet7/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.JSInterop
@using ClientSideDemoNet7
@using ClientSideDemoNet7.Shared
@using ClientSideDemoNet8
@using ClientSideDemoNet8.Shared
16 changes: 7 additions & 9 deletions GoogleMapsComponents/GoogleMapsComponents.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@
</PropertyGroup>

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>true</IsPackable>
<RestoreAdditionalProjectSources>
https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json;
https://dotnet.myget.org/F/blazor-dev/api/v3/index.json;
</RestoreAdditionalProjectSources>

<LangVersion>latest</LangVersion>
<RazorLangVersion>3.0</RazorLangVersion>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<PackageId>BlazorGoogleMaps</PackageId>
<Version>3.3.2</Version>
<Version>4.0.0</Version>
<Authors>Rungwiroon</Authors>
<Company>QueueStack Solution</Company>
<Product>BlazorGoogleMaps</Product>
Expand Down Expand Up @@ -53,11 +50,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.32" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.32" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" />
<PackageReference Include="Microsoft.JSInterop" Version="8.0.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="OneOf" Version="3.0.263" />
<PackageReference Include="System.Text.Json" Version="7.0.3" />
<PackageReference Include="System.Text.Json" Version="8.0.0" />
</ItemGroup>

</Project>
18 changes: 9 additions & 9 deletions ServerSideDemo/Pages/GMap.razor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Threading.Tasks;
using GoogleMapsComponents.Maps;
using GoogleMapsComponents.Maps;
using Microsoft.AspNetCore.Components;
using System;
using System.Threading.Tasks;

namespace ServerSideDemo.Pages;

Expand Down Expand Up @@ -85,16 +85,16 @@ protected async Task RemoveMarker(Marker TheMarker)
public async Task MapInitialized()
{
#if DEBUG
Console.WriteLine("GMap Initialized:");
Console.WriteLine($"\t Height: {Height}");
Console.WriteLine($"\t Zoom: {Options.Zoom}");
Console.WriteLine($"\t Center: ({Options.Center.Lat}, {Options.Center.Lng})");
Console.WriteLine("GMap Initialized:");
Console.WriteLine($"\t Height: {Height}");
Console.WriteLine($"\t Zoom: {Options.Zoom}");
Console.WriteLine($"\t Center: ({Options.Center.Lat}, {Options.Center.Lng})");
#endif
if (MeMarker != null)
{
#if DEBUG
var pos = await MeMarker.GetPosition();
Console.WriteLine($"\t Me: ({pos.Lat}, {pos.Lng})");
var pos = await MeMarker.GetPosition();
Console.WriteLine($"\t Me: ({pos.Lat}, {pos.Lng})");
#endif
await AddMeMarker();
}
Expand Down
2 changes: 1 addition & 1 deletion ServerSideDemo/ServerSideDemo.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit a272f1b

Please sign in to comment.