locked
WebView resources from .Net standard library RRS feed

  • Question

  • User257294 posted

    Hello

    We are using a webview in Xamarin forms project, loading html using HtmlWebViewSource class.

    In our solution, we have got resources such as js, css, images in a .net standard library project, compiled as EmbeddedResource.

    How to get the webview to load resources from this library.

    Whatever examples I have seen until now require to embed in platform specific projects as AndroidAsset or BundleResource. I am looking to load directly from the .net standard library.

    Kindly advise asap.

    Thanks

    Sunday, October 21, 2018 5:33 AM

All replies

  • User369978 posted

    Whatever examples I have seen until now require to embed in platform specific projects as AndroidAsset or BundleResource.

    Is this sample that you have seen ?

    Any problem with it?

    Monday, October 22, 2018 9:54 AM
  • User257294 posted

    The mentioned sample loads HTML from an embeddedresource and then requires the iOS and Android projects to have resources in them.

    I have the resources already embedded in a .net standard library file (that is used in multiple solutions) - so wondering why to embed them again in the iOS and Android project files.

    Hope this clears.

    Monday, October 22, 2018 10:07 AM
  • User372105 posted

    I asked about having resources in net standard library on SO: https://stackoverflow.com/questions/59154143/resources-in-net-standard-library-project

    Tuesday, December 3, 2019 9:47 AM