Blazor WebAssembly
![]() 5/10/2021 3:22 PM
|
---|
We are attempting to use CadLib NetStandard in a .Net Blazor WebAssembly project and are running into an issue calling WWLicense.SetLicense(). The application assembly is signed with key you've provided. We are using WW.Cad.Standard version 1.0.0-rc52 |
![]() 5/11/2021 12:43 PM
|
---|
I tried a Blazor web assembly project (I'm still on .NET Core 3.1 at the moment, VS 2019), but can't seem to debug program.cs (the breakpoint doesn't get hit). Blazor isn't production ready is it? I don't want to invest too much time in these experimental technologies MS comes up with. - Wout |
![]() 5/11/2021 12:57 PM
|
---|
I believe Blazor Web Assembly has been production ready for over a year: https://visualstudiomagazine.com/articles/2020/05/19/blazor-webassembly-3-2.aspx I have not tried .NET Core 3.1, as we have moved to .NET 5.0. Are you able to reproduce the error in 3.1? I expect the library itself to work if we can get past this issue with setting the license. Are there any alternative ways of doing this so we can verify that? |
![]() 5/11/2021 1:01 PM
|
---|
Well, nothing actually happens in .NET 3.1, and I can't even debug it. Maybe I need to do it in .NET 5.0 to be able to debug? |
![]() 5/11/2021 2:36 PM
|
---|
Its possible. I am using VS Code (there are VS instructions as well), and have followed the instructions here, and can successfully hit my break points: https://docs.microsoft.com/en-us/aspnet/core/blazor/debug?view=aspnetcore-5.0&tabs=visual-studio my steps: Create app: sign assembly with key. <PropertyGroup> add code to set license: WWLicense.SetLicense("license here"); set up launch.json like this: {
from debug menu, run and debug the configuration from the above launch.json |
![]() 5/13/2021 2:56 PM
|
---|
Hi, It looks like the BouncyCastle.NetCore library that CadLib is using is not working in web assembly (new BigInteger(byte[]) crashes, without throwing an exception). I can file a bug report to BouncyCastle. Debugging is painful too by the way, 90% of the time it doesn't work, and without a Task.Delay at the start the debugger doesn't even attach and you're left wondering what the hell is happening. Even with the Task.Delay debugging sometimes works, but mostly it doesn't, because something crashes before you get there. Plus in IIS Express debugging doesn't work either, VS doesn't bother notifying you of this either. All together a rather unpleasant experience. For now I'm gonna say that CadLib doesn't support Blazor. - Wout |
![]() 5/13/2021 4:22 PM
|
---|
Thank you for looking into this. I have also tried simply referencing the BouncyCastle.NetCore, and tried creating a BigInteger from a Blazor project, and i see the same behavior. If you want to file a bug it would be appreciated - I may do the same. |