Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completely Breaks MAUI App Or Fails to Recognize CachedImage control #17

Open
pouchbunny opened this issue Feb 28, 2024 · 1 comment
Open

Comments

@pouchbunny
Copy link

Description

Can't even build project after installation or fails to even recognize CachedImage control

Steps to Reproduce

Create new project and run.

Add NuGet package, Using statement in MauiProject.cs, and Use in builder services, then attempts to run

Severity Code Description Project File Line Suppression State Details
Error CS0234 The type or namespace name 'MauiWinUIApplication' does not exist in the namespace 'Microsoft.Maui' (are you missing an assembly reference?) MauiApp2 (net8.0-android) X:\AppProjects\MAUI\MauiApp2\MauiApp2\obj\Debug\net8.0-windows10.0.19041.0\win10-x64\Platforms\Windows\App.g.i.cs 40 Active

Strange enough IF you create a new project. Add nuget package and using/use statements and then run. It runs just fine, HOWEVER....

Add xmls statement in XAML. No issues.

Add <ffimageloading:CachedImage Source="image"/>

Expected Behavior

Project runs normally

Actual Behavior

MauiWinUIApplication is now missing assembly reference among other items like its delegates.

Basic Information

  • Version with issue: 1.0.9
  • Last known good version: no clue
  • Platform: Visual Studio 2022 - MAUI project with NET 8

Screenshots

image

image

image

Reproduction Link / Code

@microspaze
Copy link
Owner

microspaze commented Feb 29, 2024

@pouchbunny You use the wrong namespace for CachedImage. It is in FFImageLoading.Maui namespace not FFImageLoading namespace.

1.Install NuGet package: FFImageLoading.Maui NuGet
2.Add .UseFFImageLoading() to your MAUI app builder.
3.Add xmlns:ffimageloading="clr-namespace:FFImageLoading.Maui;assembly=FFImageLoading.Maui" to your MAUI Xaml page references.
4.Add <ffimageloading:CachedImage Source="xxx.jpg"></ffimageloading:CachedImage> to display image.

Besides you need to update the FFImageLoading.Maui lib to the latest 1.1.0 which fixed a crash bug for windows platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants