here is a link on migration from blazor 8 to 9.
https://www.telerik.com/blogs/things-know-before-migrate-blazor-app-net-9
Note: .net 9 added a new solution template for blazor apps where there is a server project and a client project.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I've been taking a Pluralsight course on learning Blazor. It's been great, but it is a bit older. It was written when .NET 8 was the current version of .NET. I created my version of the project using .NET 9, because it was my understand, from the instructor's comments, that I could use .NET 9 instead of .NET 8. I ran into a different issue in a previous module of the course, concerning Entity Framework 8, which the instructor didn't realize would occur until later, after other people taking the course a year ago, encountered. In the module I am currently going through the instructor is having us add a Blazor WebAssembly project, which was initially created in a throw away application, to the application we've been working on, which was a server-side application. However, after adding AddInteractiveWebAssemblyComponents() to the main project's Program.cs, I get the following error:
'IServerSideBlazorBuilder' does not contain a definition for 'AddInteractiveWebAssemblyComponents' and no accessible extension method 'AddInteractiveWebAssemblyComponents' accepting a first argument of type 'IServerSideBlazorBuilder' could be found (are you missing a using directive or an assembly reference?)
This was not an issue for the instructor's original application he wrote using .NET 8. I'm wondering if this is another discrepancy between .NET 8 and .NET 9, in Blazor development? I've asked in the Pluralsight course's discussion forum, but no one has responded. This course is over a year old, so maybe the instructor has moved on and won't return to this older course. However, I am still stuck with not knowing what is wrong nor why it is wrong. And all I've done is add AddInteractiveWebAssemblyComponents(). Here's what I've got now, which is exactly what the instructor said to add:
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents()
.AddInteractiveWebAssemblyComponents();
Please let me know if I'm correct, that the problem is the difference between .NET 8 and .NET 9, and adding a WebAssembly project to a Visual Studio solution after having created the Visual Studio solution as a server-side application only. Or if that isn't the issue, what is wrong?
here is a link on migration from blazor 8 to 9.
https://www.telerik.com/blogs/things-know-before-migrate-blazor-app-net-9
Note: .net 9 added a new solution template for blazor apps where there is a server project and a client project.