teauxfu
teauxfu
CC#
Created by teauxfu on 5/18/2023 in #help
❔ Razor pages asp-validation-for="MyProperty " vs asp-validation-summary="All"
5 replies
CC#
Created by teauxfu on 5/11/2023 in #help
❔ Advice on Blazor+TypeScript debugging in Visual Studio
Hey there, I'm working on a Blazor Server app in Visual Studio. I've followed some guides on adding TypeScript, and got the compiler integration working with code isolation. That is to say, my Index.razor.ts gets processed into a Index.razor.js + source map. I can import the code into my component and call it just fine. My question is about debugging this TS/JS. I read and tried to follow the MS guide here https://learn.microsoft.com/en-us/visualstudio/javascript/debug-nodejs?view=vs-2022, but the only breakpoints that are being hit are when I go into my browser dev tools, then set a breakpoint on the JS from within the browser. Visual Studio will notice that, and I can inspect objects at the breakpoint from either the browser or a temporal tab that shows up in VS. Breakpoints that I set in the TS or JS within Visual Studio directly are not being hit. I feel like / imagined that I could set a breakpoint on the TS in Visual Studio, and deal with it from there -- is that just not how it works? I understand that the browser will be running JS, not TS, but from what I'd read I was under the impression the TS could be debugged directly. Am I just wrong on that point? Is it working as it should and my assumptions are incorrect? Thanks for taking the time to answer!
34 replies
CC#
Created by teauxfu on 4/5/2023 in #help
❔ ✅ Is there a way to execute a .NET Interactive notebook from the command line?
I found this related Stack Overflow post, which comes pretty close to what I want. However I'm expecting rather to run something like dotnet-interactive run "path/to/my/notebook.dib" https://stackoverflow.com/questions/67801621/can-i-run-net-interactive-ipynb-from-command-line
13 replies
CC#
Created by teauxfu on 3/3/2023 in #help
❔ ✅ How does .NET MAUI Blazor relate to Blazor Server or WebAssembly?
Or am I conflating those ideas? I see the .NET MAUI Blazor project template index.html has the line <script src="_framework/blazor.webview.js" autostart="false"></script>. So that tells me it isn't using WebAssembly, right? I want to write a Blazor app with the intention of using it as a desktop application. I think either PWA via WebAssembly or Blazor inside MAUI as a desktop exe would work. I'm curious if there's some solution layout which would allow building both. The app wouldn't be useful on phones or tablets, so I'm not concerned about those targets. I'm just interested in .NET + xplat desktop UI, without resorting to Electron. I saw this reddit post in which a comment suggests using a shared project structure where you keep the Blazor project separate, and just reference it from the MAUI "host" if you will. https://www.reddit.com/r/dotnet/comments/pqi891/net_maui_app_vs_net_maui_blazor_app/ I'm interested in pursuing this route, but not sure whether I should have the dedicated Blazor project be a WebAssembly or Server. Or if it even matters at this point and I might as well use a Razor Class Library template.
8 replies