Skip to content

[Windows] Fix for CS1061 build error caused by missing HasMenuBarContent property in MauiToolbar#35040

Merged
kubaflo merged 1 commit into
dotnet:inflight/currentfrom
BagavathiPerumal:Fix-30254
Apr 20, 2026
Merged

[Windows] Fix for CS1061 build error caused by missing HasMenuBarContent property in MauiToolbar#35040
kubaflo merged 1 commit into
dotnet:inflight/currentfrom
BagavathiPerumal:Fix-30254

Conversation

@BagavathiPerumal
Copy link
Copy Markdown
Contributor

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

…bar` that was referenced in `RootNavigationView.IsHeaderContentEmpty()` but never defined, causing a CS1061 build error on Windows.
@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Apr 20, 2026
@sheiksyedm sheiksyedm marked this pull request as ready for review April 20, 2026 10:51
@sheiksyedm sheiksyedm requested a review from kubaflo April 20, 2026 10:51
@kubaflo kubaflo merged commit 800dedc into dotnet:inflight/current Apr 20, 2026
2 of 11 checks passed
@github-actions github-actions Bot added this to the .NET 10 SR7 milestone 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
@github-actions github-actions Bot locked and limited conversation to collaborators May 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration regressed-in-inflight/current

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants