Bug 60975 - Migrate to .NET Standard - Can't compile XAML
Summary: Migrate to .NET Standard - Can't compile XAML
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.5.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-12-04 20:09 UTC by Ian
Modified: 2017-12-05 01:03 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Ian 2017-12-04 20:09:01 UTC
I have included a Repro.

I converted a working PCL app (X.Forms 2.5) to .NET Standard (Runs on X.Forms 2.5 as well)

On only 1 XAML I get the error:
"No property, bindable property, or event found for 'FontSize', or mismatching type between value and property"

To reproduce the error.

Create a .NET Standard 2 project with XForms 2.4 or 2.5, fails on both. Add this "Login.xaml" page. Attempt to compile.

COmment out the Labels and it compiles.


-------------------------------------------



<?xml version="1.0" encoding="utf-8"?>

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
 
             x:Class="CoApp.Views.Test.LoginPageD"
             Title="Login">



    <Grid>
        <!---BACKGROUND IMAGE-->
        

        <!-- TIP: We use a scrollview so that if the password is too low, when the keyboard appears, Forms will automatically scroll it into view -->
        <ScrollView
             >
            <!-- MAIN CONTAINER -->
            <Grid
                ColumnSpacing="0"
                RowSpacing="0"
                HorizontalOptions="Fill"
                VerticalOptions="FillAndExpand">

                <Grid.RowDefinitions>
                    <RowDefinition Height="120" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <!-- LOGO -->
                <Grid
                    Grid.Row="0"
                    WidthRequest="60"
                    HeightRequest="60"
                    Margin="20"
                    VerticalOptions="End"
                    HorizontalOptions="Start">

                    <Image HorizontalOptions="Start" VerticalOptions="Center" WidthRequest="95" HeightRequest="95"
                           Source="icon.png" Aspect="AspectFill" />
                </Grid>


                <!--CLAIM TEXT-->
                <StackLayout
                    Grid.Row="1"
                    Spacing="10"
                    Padding="20,10"
                    Orientation="Vertical"
                    VerticalOptions="Center">
                    <Label 
                        LineBreakMode="WordWrap"
 
                        VerticalTextAlignment="Center"
                        FontAttributes="Bold">
                        <Label.FontSize>
                            <OnIdiom x:TypeArguments="x:Double" Phone="26" Tablet="36" />
                        </Label.FontSize>
                    </Label>

                    <Label
                        LineBreakMode="WordWrap"
                        Text="Login using your email and password."
                    
                        VerticalTextAlignment="Center">
                        <Label.FontSize>
                            <OnIdiom x:TypeArguments="x:Double"
                                     Phone="17"
                                     Tablet="27" />
                        </Label.FontSize>
                    </Label>

                    <BoxView
             
                        />

                </StackLayout>


                <!---FIELDS CONTAINER-->
                <Grid
                    Grid.Row="2"
                    Padding="20,0"
                    ColumnSpacing="0"
                    RowSpacing="0"
                    VerticalOptions="CenterAndExpand"
                    HeightRequest="180">


                    <StackLayout
                        Grid.Row="0"
                        VerticalOptions="StartAndExpand">
                        <StackLayout.Spacing>
                            <OnPlatform x:TypeArguments="x:Double">
                                <On Platform="Android">20</On>
                                <On Platform="iOS">40</On>
                            </OnPlatform>
                        </StackLayout.Spacing>
                        <!---EMAIL FIELD-->
                        <Entry
                            AutomationId="txtEmail"
                            Placeholder="E-mail"
                            >
                      
          

                        </Entry>

                        <!---PASSWORD FIELD-->
                        <Entry
                            AutomationId="txtPassword"
                            Placeholder="Password"
                        
                            IsPassword="true"
                         
                            VerticalOptions="StartAndExpand" >
 
                        </Entry>
 
                  
                    </StackLayout>


                </Grid>
 

            </Grid>
        </ScrollView>

    </Grid>

</ContentPage>
Comment 1 Samantha Houts [MSFT] 2017-12-05 01:03:23 UTC
Thank you for your submission. At this time, all new reports should be made on the Xamarin.Forms GitHub Issues repository. Please resubmit this report at https://github.com/xamarin/Xamarin.Forms/issues. This Bugzilla report will now be closed and will not be monitored.