Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Error: : XamlC error XFC0000 : Cannot resolve type "MediaElement" when i add x:Name to MediaElement in xaml file #1384

Closed
stoff99 opened this issue Jun 10, 2021 · 2 comments
Labels
bug Something isn't working. Breaky break. s/unverified This issue needs verification/reproduction by a team member. PRs cannot be accepted/merged.

Comments

@stoff99
Copy link

stoff99 commented Jun 10, 2021

Description

When i add x:Name to MediaElement i get XamlC error XFC0000 : Cannot resolve type "MediaElement" but its compiling.
Also when i use the variable definition in the code its marked as red but its compiling and i can call methods of it.

Steps to Reproduce

  1. Create a new Flyout Xamarin Forms app.
  2. Add the MediaElement in the AboutPage.xaml:
    <xct:MediaElement Source="https://sec.ch9.ms/ch9/5d93/a1eab4bf-3288-4faf-81c4-294402a85d93/XamarinShow_mid.mp4 " ShowsPlaybackControls="True"/>
  3. Press "Save" (CMD+S) and everythings is ok, you see no error
  4. Add x:Name="VideoElement" and press "Save" (CMD+S), now you see the error "Errors in file generation."
    <xct:MediaElement Source="https://sec.ch9.ms/ch9/5d93/a1eab4bf-3288-4faf-81c4-294402a85d93/XamarinShow_mid.mp4 " ShowsPlaybackControls="True" x:Name="VideoElement" />
  5. Open the errors window and you can see the error: XamlC error XFC0000 : Cannot resolve type "MediaElement"
  6. When you now compile, its working.
  7. Open now the AboutPage.xaml.cs and try to get the VideoElement.
  8. VideoElement is marked red.
  9. Type VideoElement.Play(); and run the app.
  10. Everything is working fine without any crash but the error still exists in the error window.

Basic Information

  • Version with issue:
  • Last known good version: 1.1.0 and also the 1.2.0-pre2
  • IDE: VS Mac Community V8.10.1 (build 71)

Workaround

Its working but the error is still present in error window

Reproduction imagery

TestApp_–Views_AboutPage_xaml–Visual_Studio_Community_2019_for_Mac_und_Inbox•_stefan_habacher_yahoo_de_und_WhatsApp

Errors_und_TestApp_–Views_AboutPage_xaml–Visual_Studio_Community_2019_for_Mac_und_Inbox•_stefan_habacher_yahoo_de

@stoff99 stoff99 added bug Something isn't working. Breaky break. s/unverified This issue needs verification/reproduction by a team member. PRs cannot be accepted/merged. labels Jun 10, 2021
@iamomkar
Copy link

Facing same issue with popup

Error : XamlC error XFC0000 : Cannot resolve type "Popup"

@jfversluis
Copy link
Member

Closing this and leaving #1311 open. This all seems to be the same issue and is more a bug in the tooling than something we can do :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working. Breaky break. s/unverified This issue needs verification/reproduction by a team member. PRs cannot be accepted/merged.
Projects
None yet
Development

No branches or pull requests

3 participants