dotnet / dotnet/vscode-csharp

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

Open
#5,958 43 comments 25 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
17h 56m
Merged PRs (30d)
21

Description

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 !

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.