Trying to load From NetStandard 2.0 Library "PCL" EmbeddedResource
See original GitHub issueDescription
Hello, I’m unable to load Sample.svg from Sample code. My “PCL” is type of NetStandard Library 2.0. I have added a folder called Resources and inside it I added the sample svg from the sample project selecting the image as EmbeddedResource.
PD: I’m also using native forms.
Expected Behavior
I do this in XAML
xmlns:ffimageloadingsvg="clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms">
<ffimageloadingsvg:SvgCachedImage
WidthRequest="200"
HeightRequest="200"
Source="resource://MyProject.Resources.Sample.svg" />
And it should show the image in 200x200
Actual Behavior
Nothing happens
Basic Information
- Version with issue: 2.3.4
- Last known good version: I used ffimageloading in native projects and Forms PCL projects.
- Platform: iOS but I suppose Android too.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
c# - Embedded resource in .Net Core libraries
UPDATE: .NET Core 1.1 and later have dropped project.json and returned to .csproj files. This changes Step 2, but not all that much....
Read more >Why not able to load netstandard.dll when creating new ...
dll you are trying to load is a reference assembly that which cannot be loaded for runtime on .NET Framework as pointed out...
Read more >Unable to create an Analyzer targeting Roslyn 2.0 #18414
You are trying to install this package into a project that targets '. ... NET Standard 1.3 libraries instead of PCL libraries?
Read more >Getting Started: Xamarin Forms with .NET Standard
NET Standard support we need to replace the PCL with a .NET Standard library. Whilst Visual Studio used to have a mechanism for...
Read more >Add System.ComponentModel.DataAnnotations to .NET ...
I have started to upgrade our Domain / Logic libraries from PCL and full . ... NET Standard 2.0 libraries. ... I've tried...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nexussays I modified lib to throw an exception if
CachedImageRenderer.Init
is not called: https://github.com/luberda-molinet/FFImageLoading/commit/cc221ff94284b980c11e41be6ffe69117339f726Seems to be caused by forgetting to call
CachedImageRenderer.Init();
in your Activity or AppDelegate. @CarLoOSX does that fix it for you too?Is this documented anywhere? I see it in the SVG page but it’s incidental to the topic of that section and I presumed it was just needed if I was using
CachedImage
.There should really be a runtime exception thrown if
CachedImageRenderer.Init();
isn’t called.