BLAZOR not loading with .Net 8 upgrading from .Net 7

Lopez, Carlos 0 Reputation points
2024-07-17T16:21:20.84+00:00

My team has developed a Blazor web app in .net 7. Due to our web servers requirements the entire App had to be upgraded to .net 8. Now, the app gets to the 100 in a circle view but never loads the content. When looking in the console found the following message.

Error: Failed to start platform. Reason: TypeError: Cannot read properties of undefined (reading 'AspNetCore')

I have tried to clear the cached in visual studio and in the browser, that didn't help

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,585 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 65,661 Reputation points
    2024-07-17T17:10:42.9666667+00:00
    0 comments No comments

  2. Ping Ni-MSFT 4,335 Reputation points Microsoft Vendor
    2024-07-18T08:54:30.67+00:00

    Hi @Lopez, Carlos,

    Here are several steps you can take to troubleshoot and resolve this issue:

    • Make sure all your NuGet packages are updated to versions that are compatible with .NET 8. You can run command in Package Manager Console to check:
        dotnet list package --outdated
      
    • Try to manually remove all the Bin and Obj directories in the projects.
    • Ensure that none of the APIs you're using have been deprecated in .NET 8. This includes any third-party libraries or components.
    • Clear the browser cache, local storage and session storage.
    • After checking all above, Right-click the project to clean and rebuild the project. User's image
    • If all the steps not working, please follow the official document step by step to check if you miss something which you need upgrade the project to .NET 8. Then clean and rebuild the project again.

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Rena

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.