From 6cf985afb9ee161485a02b892830c6dca91d121f Mon Sep 17 00:00:00 2001 From: GrahamTheCoder Date: Thu, 21 Dec 2023 00:24:10 +0000 Subject: [PATCH 1/2] Update to dot net 8 and react 18 render method --- Web/ClientApp/src/index.tsx | 10 ++++++---- Web/Web.csproj | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Web/ClientApp/src/index.tsx b/Web/ClientApp/src/index.tsx index 4d7bc2d44..3815feb31 100644 --- a/Web/ClientApp/src/index.tsx +++ b/Web/ClientApp/src/index.tsx @@ -1,17 +1,19 @@ import 'bootstrap/dist/css/bootstrap.css'; import React from 'react'; import ReactDOM from 'react-dom'; +import { createRoot } from 'react-dom/client'; import { BrowserRouter } from 'react-router-dom'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href') || undefined; -const rootElement = document.getElementById('root'); -ReactDOM.render( +const container = document.getElementById('root'); +const root = createRoot(container!); + +root.render( - , - rootElement); + ); registerServiceWorker(); \ No newline at end of file diff --git a/Web/Web.csproj b/Web/Web.csproj index ba38f8456..e568ee773 100644 --- a/Web/Web.csproj +++ b/Web/Web.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 ICSharpCode.CodeConverter.Web ICSharpCode.CodeConverter.Web true @@ -21,7 +21,7 @@ - + From ee0a02bb38e170be71f44117df1ca0d712b086bb Mon Sep 17 00:00:00 2001 From: GrahamTheCoder Date: Thu, 21 Dec 2023 00:29:16 +0000 Subject: [PATCH 2/2] Set the path in the url needed to debug locally --- Web/Properties/launchSettings.json | 51 +++++++++++++++--------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/Web/Properties/launchSettings.json b/Web/Properties/launchSettings.json index 743acf504..c8ccfa679 100644 --- a/Web/Properties/launchSettings.json +++ b/Web/Properties/launchSettings.json @@ -1,29 +1,30 @@ { - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:40163", - "sslPort": 44360 - } + "profiles": { + "CodeConverter": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "https://localhost:44463/CodeConverter", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" + }, + "applicationUrl": "https://localhost:7183;http://localhost:5183" }, - "profiles": { - "CodeConverter": { - "commandName": "Project", - "launchBrowser": true, - "applicationUrl": "https://localhost:7183;http://localhost:5183", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" - } - } + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" + } } + }, + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:40163", + "sslPort": 44360 + } + } } \ No newline at end of file