Remove Microsoft.AspNetCore.Components.Web dependency#52
Remove Microsoft.AspNetCore.Components.Web dependency#52ryanelian merged 1 commit intoryanelian:5.0.0from
Conversation
|
Hello and thanks for the PR!
That is very interesting. I didn't know that my library can be run on Xamarin Blazor. Amazing! Before I accept this PR, I just want to double check, Have you actually tried running your branch on Xamarin Blazor on a real mobile device?
This library was originally written on .NET Core Razor Class Library project 3.0, which added that file by default. I've never touched that file personally, but left it alone because why fix things that are not broken? |
Yes, I already use this library on my project, the only thing that I had to define edit controls which notify parent EditContext about changes. I haven't really checked running it with this branch, because Xamarin does not support net5.0 (they plan to add net6.0), so I cannot use latest version :( . The only thing that I haven't thought about when created this PR - while Components.Web dependency is not required for this library (well, apart from nameof usage), removing this dependency would be a breaking change for projects, where is no direct reference to Components.Web (i.e. it is added transitively). |
Truly remarkable. I can't wait to develop Blazor on Xamarin in near future.
I'll see what I can do to make the next version compatible with both .NET 5 and .NET Core 3.1
Logically it shouldn't be a breaking change since people don't usually use this library outside Blazor app / Razor class library. But just to be safe, I'll publish the new package with changed dependency as version 5.0.0 later. Alright, I'm convinced. I'll accept the PR into a development branch for me to play with. Thanks! |
Replace
Microsoft.AspNetCore.Components.Webdependency withMicrosoft.AspNetCore.Components.Forms.That would allow to avoid unnecessary dependencies when using this library with non-Web Blazor implementations (e.g. https://github.com/xamarin/MobileBlazorBindings).
I've also removed
_Imports.razorfile, is that needed for some reason?