[Windows] Fix for CS1061 build error caused by missing HasMenuBarContent property in MauiToolbar#35040
Merged
Merged
Conversation
…bar` that was referenced in `RootNavigationView.IsHeaderContentEmpty()` but never defined, causing a CS1061 build error on Windows.
kubaflo
approved these changes
Apr 20, 2026
PureWeen
added a commit
that referenced
this pull request
Apr 21, 2026
…ng branch (#35054) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ## Summary Fix milestone fallback for `inflight/*` and `darc/*` branches to read from `origin/main` instead of the staging branch itself. ## Problem PRs merged to `inflight/candidate` were milestoned as SR6 because `inflight/candidate` has `PatchVersion=60`. But those PRs will ultimately ship in SR7 (when the Candidate merges to `main`, which is at `PatchVersion=70`). ## Fix For staging branches (`inflight/*`, `darc/*`), read `Versions.props` from `origin/main` instead of `origin/{base.ref}`. These branches always feed into main, so main's version is the correct target. All other branches continue reading from `origin/{base.ref}` directly. ## Validated | PR | Base | Before | After | |---|---|---|---| | #34959 | inflight/candidate | SR6 (wrong) | SR7 ✅ | | #35040 | inflight/current | SR7 | SR7 ✅ | | #34969 | net11.0 | preview1 | preview4 ✅ | | #34620 | main (on SR6 branch) | SR6 | SR6 ✅ | 91 Pester tests pass. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen
pushed a commit
that referenced
this pull request
Apr 22, 2026
…ent property in MauiToolbar (#35040) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issues Details PR #30382 introduced a call to Toolbar?.HasMenuBarContent was introduced inside RootNavigationView.IsHeaderContentEmpty(), but the HasMenuBarContentproperty was not defined in MauiToolbar, which caused a CS1061 build error on Windows. **Error Details:** error CS1061: 'MauiToolbar' does not contain a definition for 'HasMenuBarContent' and no accessible extension method 'HasMenuBarContent' accepting a first argument of type 'MauiToolbar' could be found (are you missing a using directive or an assembly reference?) ### Description of Change Implemented the missing internal bool HasMenuBarContent property in MauiToolbar.xaml.cs. This property returns true when the toolbar has a non-null MenuBar containing at least one item, ensuring consistency with the existing visibility logic used in SetMenuBar(). ### Fixes Fixes build error introduced by PR #30382 on Windows
PureWeen
pushed a commit
that referenced
this pull request
Apr 28, 2026
…ent property in MauiToolbar (#35040) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issues Details PR #30382 introduced a call to Toolbar?.HasMenuBarContent was introduced inside RootNavigationView.IsHeaderContentEmpty(), but the HasMenuBarContentproperty was not defined in MauiToolbar, which caused a CS1061 build error on Windows. **Error Details:** error CS1061: 'MauiToolbar' does not contain a definition for 'HasMenuBarContent' and no accessible extension method 'HasMenuBarContent' accepting a first argument of type 'MauiToolbar' could be found (are you missing a using directive or an assembly reference?) ### Description of Change Implemented the missing internal bool HasMenuBarContent property in MauiToolbar.xaml.cs. This property returns true when the toolbar has a non-null MenuBar containing at least one item, ensuring consistency with the existing visibility logic used in SetMenuBar(). ### Fixes Fixes build error introduced by PR #30382 on Windows
PureWeen
pushed a commit
that referenced
this pull request
Apr 29, 2026
…ent property in MauiToolbar (#35040) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issues Details PR #30382 introduced a call to Toolbar?.HasMenuBarContent was introduced inside RootNavigationView.IsHeaderContentEmpty(), but the HasMenuBarContentproperty was not defined in MauiToolbar, which caused a CS1061 build error on Windows. **Error Details:** error CS1061: 'MauiToolbar' does not contain a definition for 'HasMenuBarContent' and no accessible extension method 'HasMenuBarContent' accepting a first argument of type 'MauiToolbar' could be found (are you missing a using directive or an assembly reference?) ### Description of Change Implemented the missing internal bool HasMenuBarContent property in MauiToolbar.xaml.cs. This property returns true when the toolbar has a non-null MenuBar containing at least one item, ensuring consistency with the existing visibility logic used in SetMenuBar(). ### Fixes Fixes build error introduced by PR #30382 on Windows
github-actions Bot
pushed a commit
that referenced
this pull request
May 6, 2026
…ent property in MauiToolbar (#35040) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issues Details PR #30382 introduced a call to Toolbar?.HasMenuBarContent was introduced inside RootNavigationView.IsHeaderContentEmpty(), but the HasMenuBarContentproperty was not defined in MauiToolbar, which caused a CS1061 build error on Windows. **Error Details:** error CS1061: 'MauiToolbar' does not contain a definition for 'HasMenuBarContent' and no accessible extension method 'HasMenuBarContent' accepting a first argument of type 'MauiToolbar' could be found (are you missing a using directive or an assembly reference?) ### Description of Change Implemented the missing internal bool HasMenuBarContent property in MauiToolbar.xaml.cs. This property returns true when the toolbar has a non-null MenuBar containing at least one item, ensuring consistency with the existing visibility logic used in SetMenuBar(). ### Fixes Fixes build error introduced by PR #30382 on Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issues Details
PR #30382 introduced a call to Toolbar?.HasMenuBarContent was introduced inside RootNavigationView.IsHeaderContentEmpty(), but the HasMenuBarContentproperty was not defined in MauiToolbar, which caused a CS1061 build error on Windows.
Error Details: error CS1061: 'MauiToolbar' does not contain a definition for 'HasMenuBarContent' and no accessible extension method 'HasMenuBarContent' accepting a first argument of type 'MauiToolbar' could be found (are you missing a using directive or an assembly reference?)
Description of Change
Implemented the missing internal bool HasMenuBarContent property in MauiToolbar.xaml.cs. This property returns true when the toolbar has a non-null MenuBar containing at least one item, ensuring consistency with the existing visibility logic used in SetMenuBar().
Fixes
Fixes build error introduced by PR #30382 on Windows