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

.Net 5 version #302

Closed
ja-iris opened this issue Feb 23, 2021 · 18 comments
Closed

.Net 5 version #302

ja-iris opened this issue Feb 23, 2021 · 18 comments

Comments

@ja-iris
Copy link

ja-iris commented Feb 23, 2021

Can someone provide some notes in upgrading the project to .NET 5.
Is there any plans to update the project?

Tried using the "Migrate from ASP.NET Core 3.1 to 5.0" page for guidance.
https://docs.microsoft.com/en-us/aspnet/core/migration/31-to-50?view=aspnetcore-5.0&tabs=visual-studio
It builds with the suggested change.
Having problems with the SQLite database:
Unhandled exception: SQLite Error 1: 'no such column: p.ConsumedTime'

@tesar-tech
Copy link

There is the 5.0 branch https://github.com/dotnet-presentations/blazor-workshop/tree/release/5.0

@ja-iris
Copy link
Author

ja-iris commented Feb 24, 2021

Thanks, I missed that branch coming from a link from somewhere else.
I had to open it in full Visual Studio and update the nuget packages for it to work using "Manage NuGet packages for Solution".
Presumably there's an equivalent way to do this in Visual Studio Code, or is there an extension people use for this?

@ja-iris
Copy link
Author

ja-iris commented Feb 24, 2021

(It was stage 08-templated-components where running the command created it as .Net 5 presumably could have added more parameters)
dotnet new razorclasslib -o BlazingComponents
dotnet sln add BlazingComponents

@ja-iris
Copy link
Author

ja-iris commented Feb 24, 2021

'Nuget Package Manager GUI' extension 'Update all Packages' options worked for me.

If I copy a save-points folder and then open that folder in Visual Studio Code, shouldn't it just work?
If not I'll close this one.

@lohithgn
Copy link

Thanks, I missed that branch coming from a link from somewhere else.
I had to open it in full Visual Studio and update the nuget packages for it to work using "Manage NuGet packages for Solution".
Presumably there's an equivalent way to do this in Visual Studio Code, or is there an extension people use for this?

Hi. As far as i know - there is nothing of this sort for VS Code. But when you are using VSCode, you will need to do most of these kind of things from command line. Dotnet CLI supports a concept of global tool. There is an excellent tool called "dotnet-outdated". You can find it here: https://github.com/dotnet-outdated/dotnet-outdated. You install this as a global tool. Then go to the folder where the main SLN file is present and run the command "dotnet outdated". this command will scan all projects in the solution file and list if any package in any project is outdated. Here is a screenshot from when i ran on BlazinPizza src folder:
image
It also has an option to update the package automatically to latest available version. Do look in to the tools documentation.

Hope this helps

@lohithgn
Copy link

'Nuget Package Manager GUI' extension 'Update all Packages' options worked for me.

If I copy a save-points folder and then open that folder in Visual Studio Code, shouldn't it just work?
If not I'll close this one.

Yes. Your understanding is correct.

@lohithgn
Copy link

@ja-iris we now have .NET6 and i believe @timheuer is working on upgrading the codebase to .NET 6. If this is no more an issue for you, do consider closing this issue. Thanks.

@csharpfritz
Copy link
Collaborator

I'm going through and updating the project to .NET 6 today.

@csharpfritz
Copy link
Collaborator

This will be superceded by #330

@dotnetspark
Copy link
Contributor

Should this be closed then?

@csharpfritz
Copy link
Collaborator

csharpfritz commented Mar 16, 2022 via email

@surfmuggle
Copy link

surfmuggle commented Mar 30, 2022

Using the save-point getting started i did run into problems. These issues

  1. library 'hostpolicy.dll' required to execute the application was not found - dotnet/sdk
  2. Could not find hostpolicy.dll - microsoft/vstest

might be related.

Because of the problems i switched to the folder src see below.

@surfmuggle
Copy link

surfmuggle commented Mar 30, 2022

In my attempt to use release 5 i did this

Errors

  • Inside Programm.cs the line builder.RootComponents.Add<App>("#app"); shows that App is not known or not found
  • On the developer console are several error messages:

AuthenticationService.js:1

GET https://localhost:5001/_configuration/BlazingPizza.Client 404

and also

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Could not load settings from '_configuration/BlazingPizza.Client'
      Error: Could not load settings from '_configuration/BlazingPizza.Client'
          at Function.createUserManager 

and several errors from blazor.webassembly.js:1

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Could not load settings from '_configuration/BlazingPizza.Client'
      Error: Could not load settings from '_configuration/BlazingPizza.Client'
        at Function.createUserManager 

They point to the file AuthenticationService.js on different ports

https://localhost:5001/_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication
              /AuthenticationService.js:1:5893
             /AuthenticationService.js:1:5027

@csharpfritz
Copy link
Collaborator

@surfmuggle I just cloned the repository and was able to compile and run the src/BlazingPizza.Server project with no code changes and no problems. Everything functions normally.

You should run the application from the BlazingPizza.Server project, as the application is hosted on the ASP.NET Core framework

@dotnetspark
Copy link
Contributor

There is PR for upgrading to .NET 6 already. I would suggest to wait until it gets merged or -what I did- upgrade your copy. Also, .NET 5 support will be dropped on May, reason why I'm suggesting to use .NET 6

@csharpfritz
Copy link
Collaborator

@ylr-research - the PR has been merged, and I agree - migrate to .NET 6 for the long term support (LTS)

@dotnetspark
Copy link
Contributor

Thanks for the update @csharpfritz. Let me refresh my copy. I think this issue can be closed.

@surfmuggle
Copy link

surfmuggle commented Mar 31, 2022

@csharpfritz Thanks for the hint. It now works.
Regarding the end of support for version 5 in may 2022; our company is a little slow on the upgrade on new .NET version but luckily i found out today that 6.0 can now be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants