Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Error creating xaml.g.cs file with newest Xamarin.Forms version ?

$
0
0

Hi all,

I am a Xamarin Forms Developer and I used the WaitingPage implementation from Mitch Milan.

https://github.com/MitchMilam/WaitingPage

It works great. I made a little change in my code because I am using XLabs for MVVM stuff.
So I inherited the WaitingPage class from the XLabs BaseView class to use it for my XAML pages:

(Changed WaitingPage)
public class WaitingPage : BaseView
......
(CodeBehind class)

public partial class CameraPage : WaitingPage
  {
        public CameraPage ()
        {
        InitializeComponent ();
        this.ShowLoadingFrame = true;
        this.ShowLoadingMessage = true;
        this.ShadeBackground = true;
        this.WaitingOrientation = StackOrientation.Vertical;
        this.LoadingMessage = "Fotobibliothek durchsuchen...";

.....

to use the Waiting class for my XAML view code:

<?xml version="1.0" encoding="UTF-8"?>
<WaitingPage xmlns="http://xamarin.com/schemas/2014/forms" 
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
xmlns:XLabs="clr-namespace:XLabs.Forms.Mvvm;assembly=XLabs.Forms"
x:Class="AppName.CameraPage">

...

So far so good. Using a MessageCenter message I set the IsWaiting property to true and the waiting page is displayed.
BUT one hour ago I updated the Xamarin.Forms files from Xamarin and I got a very strange behavior:
When I make a project rebuild I got an error in the CameraPage.xaml.g.cs file !!!!!
The compiler created:

namespace AppName {
using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
public partial class CameraPage : global::Xamarin.Forms.WaitingPage {

....

Error CS0234: The type or namespace name WaitingPage' does not exist in the namespaceXamarin.Forms'. Are you missing an assembly reference?

Sure, the Xamarin.Forms namespace does NOT have a WaitingPage class !!!
But why does the compiler create this code ??
In my code I got no compiler error, only the the created xcml.g.cs file !!!

I can change the Page.xaml.g.cs manually and inherit the CameraPage class in my case from WaitingPage

public partial class CameraPage : WaitingPage {
...
I can make a normal build and start the app and the waiting page is displayed as before. But when I make a complete rebuild the "wrong" xaml.g.cs file is created again.

Does anyone have any idea ? What I am doing wrong ? Or is it a problem with the new Xamarin.Forms version 1.5.1.6468 ?
The error occurs after this update. Before this version I had no problems.

Any help welcome,

Best wishes from germany

Marco


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>