The errors are also ignored when it's built on the buildserver and you only find out when the page crashes the first time it's opened.
Blazor Error list stays empty
Hi there,
The Error list stays empty while using blazor.
The errors existing in Blazor components cause build errors but the errors aren't shown in the error list.
With kind regards
5 answers
Sort by: Newest
-
-
Aeroverra 1 Reputation point
2022-12-04T04:18:25.57+00:00 Can confirm I have had this issue on and off for over 1.5 years on both stable and preview versions.
-
Ingmar Crone 51 Reputation points
2022-09-20T17:29:34.61+00:00 @Zhi Lv - MSFT thanks for trying, the next time I have the issue I will use your link to report it.
-
-
Ingmar Crone 51 Reputation points
2022-09-10T06:40:51.247+00:00 Okay, just so you guys understand what's going on.
------SomeBlazorComponent.razor------
<p>@DeezNutz </p>@Aidan Wick {
private string Name {get;set;} = SomeNamespacePart1.SomeNamespacePart2.SomeStaticClass.Name;
}
------end SomeBlazorComponent.razor------------SomeStaticClass.cs------
namespace SomeNamespacePart1.SomeNamespacePart2
{
public static class SomeStaticClass(){
public static string Name {get;} = "SomeSpecificName";
}
}
------end SomeStaticClass.cs------If you now are in the SomeStaticClass file and change the namespace (by hand do make sure it goes wrong),
from "SomeNamespacePart1.SomeNamespacePart2" to "SomeNamespacePart1" for example.
Then you rebuild the solution. It will give compile errors but don't show them in "Error List" (Ctrl+\,E).
Only if you then go to the SomeBlazorComponent.razor file. It then shows the errors in the Error List.This means that if you are not in your blazor component at the moment (which you aren't because you're in another file)
You don't know where the error is (and if you have really bad luck, you need to open ALL the blazor components one by one to see if the error is there.)I really hope this message makes it to someone from the blazor development team or the Visual Studio development team.
With kind regards