Skip to content

[WPF] VSCode shows error for WPF project: "The name 'InitializeComponent' does not exist in the current context (Roslyn CS0103) #5958

Open
@HyVong007

Description

@HyVong007

1/ Install .NET Core 7.0
2/ Create WPF project with "dotnet new wpf"
3/ VSCode > Open Folder.

After awhile, VSCode shows many errors:

"The name 'InitializeComponent' does not exist in the current context"
Moreover, any variables declared in .XAML file will cause error if these variables are used in .CS file
Hope VSCode Dev Team will fix bugs soon, thank you very much !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions