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

WinUI 3.0: Named elements appear in codebehind intellisense only after building the project #1534

Closed
thomasclaudiushuber opened this issue Nov 4, 2019 · 4 comments
Assignees
Labels
bug Something isn't working product-winui3 WinUI 3 issues team-Markup Issue for the Markup team

Comments

@thomasclaudiushuber
Copy link
Contributor

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

  1. Create a new WinUI 3.0 UWP app
  2. Add this TextBox to the MainPage.xaml file
<TextBox x:Name="textBox"/>
  1. Save the file
  2. Go to MainPage.xaml.cs and go to the constructor.
  3. Type "textB", you don't get intellisense.

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

@msft-github-bot msft-github-bot added this to Needs triage in Controls Triage Nov 4, 2019
@danzil danzil self-assigned this Nov 4, 2019
@danzil
Copy link

danzil commented Nov 4, 2019

Thanks for the bug report! Any chance you could confirm your version of Visual Studio?

@danzil danzil moved this from Needs triage to Investigate / needs follow-up in Controls Triage Nov 4, 2019
@msft-github-bot msft-github-bot added the needs-assignee-attention Assignee needs to follow-up or investigate this issue label Nov 4, 2019
@danzil danzil added the winui3α label Nov 4, 2019
@kmahone
Copy link
Member

kmahone commented Nov 4, 2019

@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

thomasclaudiushuber added a commit to thomasclaudiushuber/winrt-related that referenced this issue Nov 4, 2019
Add a bullet point under Developer Tools for this known issue:
microsoft/microsoft-ui-xaml#1534
@thomasclaudiushuber
Copy link
Contributor Author

@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: MicrosoftDocs/winrt-related#153

@jevansaks jevansaks added this to Needs triage in Markup Triage via automation Nov 4, 2019
@jevansaks jevansaks removed this from Investigate / needs follow-up in Controls Triage Nov 4, 2019
@msft-github-bot msft-github-bot removed the needs-assignee-attention Assignee needs to follow-up or investigate this issue label Nov 4, 2019
@jevansaks jevansaks added the bug Something isn't working label Nov 4, 2019
@danzil danzil moved this from Needs triage to Backlog in Markup Triage Nov 4, 2019
@jevansaks jevansaks added the team-Markup Issue for the Markup team label Nov 7, 2019
@thomasclaudiushuber
Copy link
Contributor Author

@jevansaks @danzil @kmahone
I tried this with WinUI 3 Preview 3 and Visual Studio 2019 16.9 Preview 1, not reproducable there anymore, which means it has been solved in the meantime. I close this issue. Thanks!

@krschau krschau added the product-winui3 WinUI 3 issues label Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product-winui3 WinUI 3 issues team-Markup Issue for the Markup team
Projects
No open projects
Development

No branches or pull requests

6 participants