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

[XamlC] Collection was modified; enumeration operation may not execute. #17563

Closed
drasticactions opened this issue Sep 22, 2023 · 3 comments
Closed
Assignees
Labels
area-xaml XAML, CSS, Triggers, Behaviors platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 t/bug Something isn't working

Comments

@drasticactions
Copy link
Contributor

Description

If you have <?xaml-comp compile="true" ?> enabled in your ResourceDictionary, it will fail to compile with a enumeration error.

https://github.com/davidortinau/ControlGallery/blob/main/src/ControlGallery/Resources/Styles/DefaultStyles.xaml#L1-L6

Steps to Reproduce

Add a resourcedictonary file and set XamlC to compile.

Link to public reproduction project repository

https://github.com/davidortinau/ControlGallery

Version with bug

8.0.0-rc.1.9171

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS

Affected platform versions

No response

Did you find any workaround?

Disable XamlC

Relevant log output

Resources\Styles\Text.xaml : XamlC error : Collection was modified; enumeration operation may not execute. [X:\Code\Wor
k\ControlGallery\src\ControlGallery\ControlGallery.csproj::TargetFramework=net8.0-maccatalyst]
Resources\Styles\Text.xaml : XamlC error : Collection was modified; enumeration operation may not execute. [X:\Code\Wor
k\ControlGallery\src\ControlGallery\ControlGallery.csproj::TargetFramework=net8.0-ios]
Resources\Styles\Text.xaml : XamlC error : Collection was modified; enumeration operation may not execute. [X:\Code\Wor
k\ControlGallery\src\ControlGallery\ControlGallery.csproj::TargetFramework=net8.0-android]
@drasticactions drasticactions added the t/bug Something isn't working label Sep 22, 2023
@jfversluis
Copy link
Member

Same/related to #17461 ? Where something similar is also mentioned

@jfversluis jfversluis added the area-xaml XAML, CSS, Triggers, Behaviors label Sep 22, 2023
@StephaneDelcroix
Copy link
Contributor

Same/related to #17461 ? Where something similar is also mentioned

no, but I think I already fixed that

@StephaneDelcroix StephaneDelcroix self-assigned this Sep 22, 2023
@StephaneDelcroix
Copy link
Contributor

dupe of #17333, fixed by #17364

@ghost ghost locked as resolved and limited conversation to collaborators Oct 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-xaml XAML, CSS, Triggers, Behaviors platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants