Closed bnemetchek closed 5 years ago
Same here, it has to do with the announced breaking changes: https://devblogs.microsoft.com/aspnet/asp-net-core-and-blazor-updates-in-net-core-3-0-preview-9/
Severity Code Description Project File Line Suppression State Suppression State Error CS0234 The type or namespace name 'UIMouseEventArgs' does not exist in the namespace 'Microsoft.AspNetCore.Components' (are you missing an assembly reference?)108 Active
Severity Code Description Project File Line Suppression State Suppression State Error CS0234 The type or namespace name 'UIMouseEventArgs' does not exist in the namespace 'Microsoft.AspNetCore.Components' (are you missing an assembly reference?)108 Active
Check out the section that says:
Replace Microsoft.AspNetCore.Components.UIEventArgs with System.EventArgs and remove the “UI” prefix from all EventArgs derived types (UIChangeEventArgs -> ChangeEventArgs, etc.).
Here: https://devblogs.microsoft.com/aspnet/asp-net-core-and-blazor-updates-in-net-core-3-0-preview-9/
Thank you for a wonderful framework. Is there an ETA, for when a "Preview 9" version will be released?
Same here, I can't run the project because of the UI events change. I can try to provide a pull request to fix this @SamProf.
Already in pregress. Today will be release preview 9
The main thing I don't understand yet if you try to upgrade a project from preview8 to preview9 is where I can get IComponentContext
from or how to replace it. There is an issue on excatly that topic: https://github.com/aspnet/AspNetCore/issues/13711.
I've upgraded MatBlazor in my project locally to preview9 now (Check https://github.com/SeppPenner/MatBlazor/tree/preview9 as well) with these issues remaining:
IComponentContext
doesn't exist somehow? (https://github.com/aspnet/AspNetCore/issues/13711)ComponentContext.IsConnected
isn't possible for the same reason.EditContext?.FieldClass
is now EditContext?.FieldCssClass
? (https://github.com/aspnet/AspNetCore/issues/13713)JSRuntime.SetCurrentJSRuntime(Js);
doesn't seem to exist anymore? (https://github.com/aspnet/AspNetCore/issues/13714)i've done the same :)
IComponentContext: MS removed the context they assume the use case is gone https://github.com/aspnet/AspNetCore/commit/1f7d59d8f1e7cd1bc8d816cb1e78f3c40ccc26e7
We don't believe that this is needed anymore. We no longer call OnAfterRender when you're prerendering, so the main use case of this type is gone.
i've done the same :)
IComponentContext MS removed the context they assume the use context is gone aspnet/AspNetCore@1f7d59d
We don't believe that this is needed anymore. We no longer call OnAfterRender when you're prerendering, so the main use case of this type is gone.
So this should be simply removed? Ok, that's easy.
Thank you so much for making this excellent project !! Since I migrated to preview9 I got some bugs in the beginning, but installing the latest preview9 templates will solve all the issues. If you then start from scratch with a dotnet new blazorwasm template (I create them with the --hosted flag) the MS sample project works. Getting MatBlazor nuget library 1.6.4 works as expected but:
I had a working prototype displaying a small sample form with a couple of MatTextField and MatNumericUpdownField fields working flawlessly with preview8. I bind mine to a very simple POCO class and I am getting this exception (the component does not even display anymore):
blazor.webassembly.js:1 WASM: System.TypeLoadException: Could not set up parent class, due to: Could not set up parent class, due to: Generic Type Definition failed to init, due to: Could not set up parent class, due to: Could not set up parent class, due to: Could not load type of field 'MatBlazor.BaseMatComponent:1 member:(null) assembly:MatBlazor.dll type:BaseMatInputComponent
1 member:(null) assembly:MatBlazor.dll type:BaseMatTextField member:(null)
here is the markup:
Parameters class has a NodeX property of type int. I changed the type to be a string and I got the same exception. If I use a MatNumericUpDown instead I also get the same.
Can you guys please post a working example of these form controls inside an EditForm on the matblazor site ? Thanks a lot and best regards
@andean00 I would suggest waiting until the developers of this project have had a chance to update their code to be preview9 compatible before attempting to use it. I'm sure they currently have a lot on their plate to do before providing new examples. I'm sure it won't be long...
in Progress:
Thanks for that fast release! Waiting for that, and now i can continue today! My program evening is saved ;-)
MatBlazor 1.7.0 Released! Update to .NET Core 3.0 Preview 9
Maybe it's a little nit unstable. Please write issues if you you found something.
Thank you so much @SamProf! I will post any issues I find back.
@SeppPenner @Sebbstar Wow, I read that you also working on upgrade to Preview 9. Thank you so much for your effort.
I really welcome any help to this project. But there are too much changes at one time and I prefere make it myself. But I am very pleasantly surprised that I am not the only one interested in such global things.
Thank you very much. If you do something - please make PRs. I will check and merge your contribution to main brunch.
For what it's worth I was able to successfully upgrade two server-side projects to preview 9 without too many problems.
Most relevant to this project was updating App.razor and MainLayout.razor for me. Thanks again!
Yes I agree that MS made the p9 unstable with breakin changes. Serverside it should work. The problems I have are with client-side. I could not manage to get it working with a form bound to a poco class. I will wait a bit Thanks so much for the great effort !!
@andean00 and all, After I will upgrade BlazorFiddle I can try to help you in your projects.
@SeppPenner @Sebbstar Wow, I read that you also working on upgrade to Preview 9. Thank you so much for your effort.
I really welcome any help to this project. But there are too much changes at one time and I prefere make it myself. But I am very pleasantly surprised that I am not the only one interested in such global things.
Well, I was just trying to figure out some issues with the upgrade progress that might occur on your side as well.
@SamProf : Many thanks once again for doing this and willing to help in the client-side/webassembly world. Just to let you know, a few minutes ago I saw the 1.7.0 version and I updated the package. Right before that, not even the MatProgressBar was working and now it does after upgrading, yeah ! I will keeping adding controls to my solution and see how it goes ! have an excellent weekend !
MS changed the API surface around a bit to separate the GUI and other minor changes. I believe most apps using MatBlazor will no longer compile.