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

Xamarin.Forms with WPF build issue #13217

Closed
dcuccia opened this issue Dec 22, 2020 · 7 comments
Closed

Xamarin.Forms with WPF build issue #13217

dcuccia opened this issue Dec 22, 2020 · 7 comments
Labels
p/WPF s/unverified New report that has yet to be verified t/bug 🐛

Comments

@dcuccia
Copy link

dcuccia commented Dec 22, 2020

As previously described by @schnerring, there is still an issue with XamlC XFC0000 compilation errors for XF in WPF.

Environment:

  • netcoreapp3.1 with WPF
  • VS2019
  • Windows 10
  • Xamarin.Forms.Platform.WPF 4.8.0.1269

Error : XamlC error XFC0000 : Cannot resolve type "Application".

Repro: https://github.com/schnerring/XamarinWPFCompilationBug

I found a fix I don't understand in this article which I think is what @dfyx meant with removing the EmbeddedResource build action. I couldn't find anything about that in the official docs.

I added the fix to my repro code inside the csproj file and commented it:

<ItemGroup>
    <EmbeddedResource Remove="**/*.xaml" />
</ItemGroup>

As soon as you uncomment, the project compiles successfully.

Originally posted by @schnerring in #11101 (comment)

@mr5z
Copy link

mr5z commented Jan 23, 2021

Still experiencing this on XF 5.0.0.1905

image

@zaratul77
Copy link

Did anybody solve this?

@cris-m
Copy link

cris-m commented Feb 20, 2021

I am expecting this issues after updating to the latest Xamarin Form (5.0.0) in Visual Studio for Mac.
Screen Shot 2021-02-20 at 11 38 15

@cris-m
Copy link

cris-m commented Feb 25, 2021

I think it is not a problem, since many experimental controllers and converters have been remove in Xamarin Form and placed in Xamarin Community Toolkit. Here is the documentation about Xamarin Community Toolkit

@cdytoby
Copy link

cdytoby commented Mar 6, 2021

Same issue here, and the solution which the author provided works.

It only happens on .NET Core version or .NET 5 version of WPF. .NET Framework WPF doesn't have this issue.

Also, I'm not sure if this is caused by Xamarin.Forms or not, because this issue appears as soon as WPF project is created without any modification, and the error belongs to WPF project, not Xamarin Forms project.

@GeoDirk
Copy link

GeoDirk commented May 28, 2021

Same problem that is only found when trying to compile the WPF .NET 5.0 application. Running version Xamarin.Forms 5.0.0.2012

Error : XamlC error XFC0000 : Cannot resolve type "Application".

Was resolved with the author's solution.

@jfversluis
Copy link
Member

Taking into consideration the remaining lifetime of Xamarin.Forms, the platform this is about, the age of this issue and the traction this issue has seen I think it's unlikely that this will get fixed. If it is something that you still would like to have, please consider opening a PR. Thanks!

@jfversluis jfversluis closed this as not planned Won't fix, can't repro, duplicate, stale Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p/WPF s/unverified New report that has yet to be verified t/bug 🐛
Projects
None yet
Development

No branches or pull requests

8 participants