What setting must I turn on to get error messages?

Ingmar Crone 51 Reputation points
2022-06-24T11:53:50.097+00:00

It happens alot with Blazor that it doesn't compile and also there isn't an error message.

Now, with all other times this happened I know that I need to check all components to see if the references and model names are correct.

Can I please get a Microsoft confirmation that you guys are aware of this issue?

-- -- --
The message I would like VS to show me is:

  • What exactly is wrong and where, Or
  • What component breaks during compiling, Or
  • Anything to point me in the right direction.
    -- -- --
    (Is there a setting that turns this behaviour on and off?)

Please tell me if you guys are aware of this issue.

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,404 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ingmar Crone 51 Reputation points
    2022-06-28T09:40:58.6+00:00

    Hi Dilion @Zhi Lv - MSFT , I find it really kind that you point this out.
    I'm really thinking if I should make a video to show this.

    The error list that you show is indeed the place where I would expect errors to be shown.
    Only no errors get produced, there are no errors. It only doesn't compile.

    To reproduce this issue:
    Normally you can change names of properties etc. with the commanc 2 times (ctrl + r).
    If you do this while you're in a model, it doesn't change the names in the html part of the blazor component.

    So, lets say you call another component, used as a partial:
    <Some_Component @ref_ahref ="Component_Reference" Model="Some_Model" EventCallback="BeingCalled" />

    Now, if the code shown above, isn't open. So you're working on another piece of code somewhere else.
    And now you change the name of "Some_Component", to for example "ABetterComponentName". The code cannot compile. But also, no error is shown.

    Also if you change "Model" into "AMoreSpecificModelName".
    Again, if you're not in the code where the original call is being made. The same thing happens:
    The code cannot compile. But also, no error is shown.

    So basically. Everytime you rename something (parameter, reference etc.) and the code it is used in, is not open.
    The code will not compile, And also give no errors in the errorlist.

    And it happens everywhere the code isn't recognized as c# code. If the piece of code is open, you get more error messages.
    But if the code is not open, as in, the tab of code is closed. It doesn't compile, and also no errors.

    I hope this makes things a little bit more clear. It really is an error within visual studio. There are errors, but no messages.