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

The "XamlCTask" task failed unexpectedly. #21910

Closed
Alex-Dobrynin opened this issue Apr 18, 2024 · 1 comment
Closed

The "XamlCTask" task failed unexpectedly. #21910

Alex-Dobrynin opened this issue Apr 18, 2024 · 1 comment
Labels
area-xaml XAML, CSS, Triggers, Behaviors platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@Alex-Dobrynin
Copy link

Alex-Dobrynin commented Apr 18, 2024

Description

If i have datatemplate and the root of it is customview like local:SomeCustomRootViewOfTheDataTemplate and if i have there some bindings using x:Bind from CompiledBindings.Maui nuget package I get next error during the build. If i change x:Bind to Binding it just successfully builds the app.

image

DataTemplateWithCustomRootView.zip

this is really critical, as cannot be workarounded

Steps to Reproduce

  1. Try to build provided test project

Link to public reproduction project repository

No response

Version with bug

8.0.20 SR4

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

No response

Did you find any workaround?

nope

Relevant log output

1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018: The "XamlCTask" task failed unexpectedly.
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018: System.Xml.XmlException: 'ntView' is an unexpected token. Expecting white space. Line 12, position 108.
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at System.Xml.XmlTextReaderImpl.ParseAttributes()
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at System.Xml.XmlTextReaderImpl.ParseElement()
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at System.Xml.XmlTextReaderImpl.ParseElementContent()
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at Microsoft.Maui.Controls.Xaml.XamlParser.ParseXamlElementFor(IElementNode node, XmlReader reader) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlParser.cs:line 61
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at Microsoft.Maui.Controls.Xaml.XamlParser.ReadNode(XmlReader reader, Boolean nested) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlParser.cs:line 174
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at Microsoft.Maui.Controls.Xaml.XamlParser.ParseXamlElementFor(IElementNode node, XmlReader reader) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlParser.cs:line 85
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at Microsoft.Maui.Controls.Xaml.XamlParser.ReadNode(XmlReader reader, Boolean nested) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlParser.cs:line 174
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at Microsoft.Maui.Controls.Xaml.XamlParser.ParseXamlElementFor(IElementNode node, XmlReader reader) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlParser.cs:line 114
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at Microsoft.Maui.Controls.Xaml.XamlParser.ReadNode(XmlReader reader, Boolean nested) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlParser.cs:line 174
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at Microsoft.Maui.Controls.Xaml.XamlParser.ParseXamlElementFor(IElementNode node, XmlReader reader) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlParser.cs:line 114
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at Microsoft.Maui.Controls.Xaml.XamlParser.ParseXaml(RootNode rootNode, XmlReader reader) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlParser.cs:line 49
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at Microsoft.Maui.Controls.Build.Tasks.XamlTask.ParseXaml(Stream stream, TypeReference typeReference) in D:\a\_work\1\s\src\Controls\src\Build.Tasks\XamlTask.cs:line 59
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at Microsoft.Maui.Controls.Build.Tasks.XamlCTask.Execute(IList`1& thrownExceptions) in D:\a\_work\1\s\src\Controls\src\Build.Tasks\XamlCTask.cs:line 124
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at Microsoft.Maui.Controls.Build.Tasks.XamlTask.Execute() in D:\a\_work\1\s\src\Controls\src\Build.Tasks\XamlTask.cs:line 38
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>d:\Nuget\packages\microsoft.maui.controls.build.tasks\8.0.7\buildTransitive\netstandard2.0\Microsoft.Maui.Controls.targets(154,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
1>Done building project "DataTemplateWithCustomRootView.csproj" -- FAILED.
@ninachen03
Copy link
Collaborator

Verified this issue with Visual Studio 17.10.0 Preview 4 (8.0.14 & 8.0.20).I can repro this issue.
image

@ninachen03 ninachen03 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Apr 19, 2024
@jsuarezruiz jsuarezruiz added the area-xaml XAML, CSS, Triggers, Behaviors label Apr 19, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2024
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 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants