-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] XAML compiler broke with 4.7.0 #11101
Comments
@StephaneDelcroix Could be related with #11021? |
I'm currently running into this as well... Every page now generates the error above... I'm downgrading in the meantime :) |
it is definitely related to the changes done on #11042 Those errors happen on "UpdateDesignTimeXaml" the first time the IDE tries to update the files. But it doesn't affect the compilation of the project at all. @Dids by
you mean HotReload ? |
@StephaneDelcroix, it doesn't affect the compilation but it does affect the functionality... This is frustrating guys... |
@kaniosm I'm not trying to produce bad excuses by saying it still builds. This issue, like any regression, is top priority for us. We're on this, we hope to get a fix really soon, and that'll be followed by a service release for 4.7.0. can you explain a bit more about Registered routes no longer working ? |
Hi @StephaneDelcroix, I’m not implying you are giving bad excuses. Sorry if it seemed so! I was just trying to clarify that even if it builds there are still issues that might be related to this. |
Hi - just to follow up: Sample errors that arise from this issue: It builds but MSBuild:UpdateDesignTimeXaml code generator crashes. This initially only affects hot reloads (and annoys my OCD as errors are show plenty). You can still pull off a bit of debugging. After a while the IDE gets quite flakey and triggers random freezes which is probably more an issue for the VS Mac team than the Xamarin forms team. At this point code behind is not compiled (which is what @kaniosm is experiencing!) and you have to clean project and restart IDE. |
@StephaneDelcroix shell routes are fine, it just happened that both routes I was testing were using multibinding, which requires a converter, which was not the case in my proxy implementation. |
xf 4.7 same issue... |
I'm relieved (/cc @PureWeen) |
The same using Visual Studio 2019 for Windows. Error: XamlC error XFC0000 : Cannot resolve type "Application". |
I can also confirm the fix in version 4.7.0.1080 as well. Thank you guys |
Can confirm it as well: Fixed in 4.7.0.1080. Good Job! |
Still happens for me in 4.7.0.1179 with a new .Net Core 3.1 project. |
@dfyx please open a new issue, with an attached repro. thx |
Just got it, I was missing a line from the project file that removes the EmbeddedResource build action from WPF XAML files. That could be a little clearer from the documentation. I'll add a new issue as soon as I'm sure about the details. |
Please reopen, this issue returns in 4.8.0.1269 |
Xamarin.Forms 4.8.0.1269 works fine here, but I'm only targeting iOS at the moment (as well as working from macOS + VS4Mac), so maybe the issue is platform specific this time around? |
Xamarin Forms 4.8.0.1269+325-sha.f6490bf7d-azdo.3951545 with VS 2019 on Windows 10 - All fine! |
Environment:
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:
As soon as you uncomment, the project compiles successfully. |
Using .NET Core WPF app the fix above by @schnerring worked for me as well. |
Still an issue with 4.8.0.1560 (.NET Core WPF). Workaround mentioned by @schnerring worked. |
it didn't work for me, instead, the whole threw all sorts of errors |
Not sure this is resolved. @schnerring 's work-around worked for me as well on 4.8.0.1687. My scenario is deploying MobileBlazorBindings hybrid components in an existing WPF app. I only observed this issue when adding to my existing project with vanilla WPF UserControls. The source is here: https://github.com/dcuccia/MobileBlazorBindings/tree/master/samples/HybridAppStandalone |
Currently experiencing this issue as well. Ive dotted my I's and crossed my T's but cant seem to find any obvious reason. Will try to downgrade to fix. |
I am experiencing this issue after Visual studio for Mac update to version 8.8.6 (build 15) and Xamarin Forms 5.0.0.1905. Is there any fix without downgrading Xamarin Forms ? |
For anyone experiencing this issue please open a new ticket. I am not sure if the closed issues are monitored. |
|
This is still an error and it's two years later so it says a lot about the team developing Visual Studio. I am using VS 2022. Now the error occurred when I made a small C# code change so most of the excuses above are no good. I need to close / open VS 2022 to get rid of this problem. Along with the horrible OS Win 11 MS has been doing a very poor job in the last while. |
I had this issue recently as well. Reason was a 3rd party NuGet Package using URL for package reference. If I recall correctly it was rg.plugins.popup. Before I had Changing it to Basically don't use URLs - use the old way. This XamlC error XFC0000 seems to be some kind of a catch-all error for unhandled errors in the XAML compiler. Hope it helps. |
I haven't tried it, but the link mentioned above had this potential workaround. |
+1 |
Still an issue I'm experiencing with MAUI: Severity Code Description Project File Line Suppression State Solution wont build at all. I've cleaned, rebuilt, closed, reopend, recleaned, rebuilt, restarted my computer, repaired visual studio, restored nugget packages, restarted my computer, done all that again and nothing has fixed any of it. |
That work around helped me. Thank you! |
Description
Updating to Xamarin.Forms 4.7.0 broke something in the XAML compilation, where every XAML file change fails to save.
Downgrading to the latest 4.6.x release fixes it, while restarting the IDE and/or deleting bin/obj directories does not.
Additionally, the application still compiles and runs fine without any errors or warnings, but any changes made to the XAML do not persist to the application itself.
Example errors from "Tool Output":
Steps to Reproduce
AppShell.xaml
in any way and hit SaveExpected Behavior
XAML should successfully save after any edits.
Actual Behavior
XAML fails to generate files when saving changes.
Basic Information
Reproduction Link
https://github.com/Dids/XAMLCompilationBug
Workaround
Downgrade to Xamarin.Forms 4.6.0.967 or older.
The text was updated successfully, but these errors were encountered: