Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
643 views
in Technique[技术] by (71.8m points)

xamarin.forms - FileNotFoundException: Could not load file or assembly Syncfusion.sfpopuplayout.XForms

I'm not sure how to resolve this. During runtime, I'm getting an initialization error

System.IO.FileNotFoundException: Could not load file or assembly 'Syncfusion.SfPopupLayout.XForms, Version=18.4451.0.33, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

The file (if this is the correct one) exists here:

C:Users....nugetpackagessyncfusion.xamarin.sfpopuplayout18.4.0.33lib
etstandard2.0Syncfusion.SfPopupLayout.XForms.dll

This is happening in the constructor of my ContentPage.

The Dependencies/Packages folder shows Syncfusion.Xamarin.SfPopupLayout(18.4.0.33). I see the error is reporting 18.4451.0.33. Is that a significant difference ? What do I do ?

Thanks.

EDIT: I have installed the latest version of this package, using nuget.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Install the Syncfusion.Xamarin.SfPopupLayout from NuGet.

enter image description here

After that, you could use this control.

Xaml:

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         xmlns:d="http://xamarin.com/schemas/2014/forms/design"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
         mc:Ignorable="d"
         x:Class="Test.MainPage">

<sfPopup:SfPopupLayout x:Name="popupLayout">
    <sfPopup:SfPopupLayout.Content>
        <StackLayout x:Name="mainLayout">
            <Button x:Name="clickToShowPopup" Text="ClickToShowPopup" 
           VerticalOptions="Start" HorizontalOptions="FillAndExpand"
            Clicked="ClickToShowPopup_Clicked"/>
        </StackLayout>
    </sfPopup:SfPopupLayout.Content>
</sfPopup:SfPopupLayout>  

</ContentPage>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...