Describe the bug
Named elements appear only in code-behind Intellisense after building the project. Looks like the intermediate output folder is not generated/updated when editing the XAML doc.
Steps to reproduce the bug
<TextBox x:Name="textBox"/>
Build the project. Then you get intellisense.
Further tests: Go to the obj folder and navigate down to the MainPage.g.i.cs that contains the textBox field. Change the name of the textBox in the MainPage.xaml file to something else. Note that the MainPage.g.i.cs won't update after this change. The MainPage.g.i.cs file only updates after building the project.
Expected behavior
When changing the MainPage.xaml file, the MainPage.g.i.cs should be generated automatically, so that named elements can be accessed in the codebehind file without manually building the project.
Version Info
OS: Windows 10 1903
NuGet package version: Microsoft.WinUI 3.0.0-alpha.191101.0
Thanks for the bug report! Any chance you could confirm your version of Visual Studio?
@danzil, I can repro this in both:
Visual Studio 2019 Preview: Version 16.4.0 Preview 3.0
Visual Studio 2019: Version 16.3.6
@danzil I'm using 16.4.0 Preview 3.0.
@kmahone Thanks, great you were able to repo it.
I've created a PR for the docs: https://github.com/MicrosoftDocs/winrt-related/pull/153
Most helpful comment
@danzil, I can repro this in both:
Visual Studio 2019 Preview: Version 16.4.0 Preview 3.0
Visual Studio 2019: Version 16.3.6