Description
Describe the Issue
When I create a simple MAUI project, in file MauiApp1\Platforms\Windows\App.xaml.cs
for method InitializeComponent I get a compiler error: 'App' does not contain a definition for 'InitializeComponent' and no accessible extension method 'InitializeComponent' accepting a first argument of type 'App' could be found (are you missing a using directive or an assembly reference?)CS1061.
But when I do dotnet build I get info Build Succeeded!
Steps To Reproduce
-
I created a simple MAUI project.
-
In file MauiApp1\Platforms\Windows\App.xaml.cs, for method InitializeComponent I get compiler error:
'App' does not contain a definition for 'InitializeComponent' and no accessible extension method 'InitializeComponent' accepting a first argument of type 'App' could be found (are you missing a using directive or an assembly reference?)CS1061. -
But when I do dotnet build I get info Build Succeeded!
Expected Behavior
The compiler should recognize the method InitializeComponent from MauiWinUIApplication class.
Environment Information
- OS: Windows 11
- VSCode: 1.87.2
- .NET MAUI v0.9.7, C# v2.22.5, C# Dev Kit v1.4.29
| VS Bug 2032244
Activity