-
Notifications
You must be signed in to change notification settings - Fork 169
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
BlazorWebView needs to support Razor Class Libraries with Static Web Assets #129
Comments
|
Ideas: Support for Razor Class Libraries (RCLs) means that you can build your UI once and then consume it from a Blazor Server app, Blazor WASM app, Mobile Blazor Bindings Hybrid App, etc. There might be some restrictions, but most things should just work. |
|
Also need to demonstrate how to use DI so that when the RCL is hosted on different platforms (e.g. web, iOS, Android), each can provide its own platform-optimized implementation of that service. For example, geolocation APIs can be done differently on browser vs. using Xamarin.Essentials on devices. |
|
How this gonna be manage? Since we have all blazor RCLs on a base project blazor wasm and server needs the wwwroot/index.html as their entry point. I tried working around with a default blazor project and adding reference from the base class I got it up and running but for some reason it doesn't see the pages folder RCLs, I mean index, counter and weather pages shows 404 page. I will diging in a little bit more to see if I can get a prototype working |
|
Ok I got it working. I just needed to add and change some reference on
and
I deleted everything else except the Also I changed I also see we need to share or have in common some services with blazor wasm/server like for example For everything going on top of xamarin the default project is Ok. But for blazor wasm and blazor server we may want to initialize others services that are web specific. On xamarin we may want to use Xamarin.Essentials instead. |
|
I propose making 3 folders for services on base project On native apps we call common and native services. |
|
@Eilon when you gonna do a new template and nuget package version? I saw you are still having one more task for take out a new preview based on the current milestone. I am using nighly build at this moment but I saw @jspuij did some changes to the template structure, when we can have this template changes? |
|
Hi @arivera12 the nightly feed has both the updated NuGet packages for the code as well as the NuGet packages that contain the templates! Learn more here: https://docs.microsoft.com/mobile-blazor-bindings/contribute/nightly-builds |
|
I've written up an initial walkthrough to guide people to build a Razor Class Library (RCL) and use it in a Mobile Blazor Bindings app and in a Blazor Web app. You can check it out in the pre-publish format here: https://github.com/MicrosoftDocs/mobile-blazor-bindings/blob/master/mobile-blazor-bindings/walkthroughs/shared-web-ui.md This will eventually go live on the Microsoft Docs site. But in the meantime please have a look if you'd like to learn more and let me know if you have any feedback! |
No description provided.
The text was updated successfully, but these errors were encountered: