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

Blazor. I can't insert html-code In #if DEBUG, but it worked in older versions #10895

Closed
1 task done
Andrey-2021 opened this issue Sep 17, 2024 · 2 comments
Closed
1 task done
Labels
area-blazor area-compiler Umbrella for all compiler issues

Comments

@Andrey-2021
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Blazor project.
I have updated Visual Studio, now - Microsoft Visual Studio Community 2022 - Current 17.11.
Before I have 17.10
In old version the code in ShowMyError.razor-component is work:

image

but after update its not work, error:
CS0103 div does not exist in the current context

Expected Behavior

The ability to insert html-code in #if DEBUG section

Steps To Reproduce

  1. create AnyName.razor component
  2. insert section in component:
    #if DEBUG
    #endif
  3. try insert div or span in #if DEBUG section

Exceptions (if any)

No response

.NET Version

8.0.400

Anything else?

No response

@javiercn javiercn transferred this issue from dotnet/aspnetcore Sep 17, 2024
@davidwengier
Copy link
Contributor

I believe the explanation for this is #10737 (comment)

@davidwengier davidwengier added the area-compiler Umbrella for all compiler issues label Sep 18, 2024
@333fred
Copy link
Member

333fred commented Sep 19, 2024

Duplicate of #10737.

@333fred 333fred closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor area-compiler Umbrella for all compiler issues
Projects
None yet
Development

No branches or pull requests

3 participants