3 ms·
no third party libraries that fit the bill?
by gameswithgo 6y ago
no third party libraries that fit the bill?
- ocdtrekkie 6y agoI investigated a little bit, but most of the speech libraries on NuGet are either wrappers for Google/Microsoft/Amazon/IBM cloud services, or are dependent on System.Speech anyways. It's plausible if I really wanted to, I could run a separate service/application from some non-.NET-based alternative, but the integration is likely to be a lot messier. Right now, I'm not sure .NET 5 offers a compelling reason to drop .NET Framework, which Microsoft will presumably continue to support for at least the next decade. Microsoft still lacks a cross-platform desktop UI framework, they have no project template in Visual Studio that would let you write a service that can run as a service on both Windows and Linux, and .NET 5 is missing lots of Windows integration functionality like System.Speech as well. I'd really like to make my project both run as a service, and run cross-platform, but there doesn't appear to be a good path to do either one with .NET 5 yet, and it'd likely take substantial rewriting just to get my project to .NET 5 on Windows.
- ripley12 6y ago> they have no project template in Visual Studio that would let you write a service that can run as a service on both Windows and Linux I have lots of complaints about the state of the .NET ecosystem, but thankfully this one is pretty easy IMO. Basically just use the `dotnet new worker` .NET Core template; it scaffolds a project using the ASP.NET Core generic host, which can easily (a NuGet package and 1 line of code) be adapted to run as either a Windows Service or a systemd service on Linux. https://www.hanselman.com/blog/dotnetNewWorkerWindowsServicesOrLinuxSystemdServicesInNETCore.aspx https://www.hanselman.com/blog/dotnetNewWorkerWindowsService... https://www.reillywood.com/blog/dotnet-linux https://www.reillywood.com/blog/dotnet-linux
- ocdtrekkie 6y agoIt might be somewhat simple, but their paid Visual Studio IDE demonstrates no way to get there, and it probably should. The only project types tagged as services are .NET Framework templates to make a Windows service. I have to apparently read blog posts about how to get there myself with .NET Core. Suffice to say, Microsoft's move to the open source/Linux mindset may have come at the cost of being similarly confusing to get started with. Note that your blogs happily tell me to add a single NuGet package for Windows or Linux, but doesn't bother to tell me how to assemble a project that will work on both.
- ripley12 6y agoSeems like you can just call both UseWindowsService() and UseSystemd(), they will no-op if called on the wrong platform. Personally I think I'd rather split Linux+Windows into thin OS-specific projects, but I haven't tried that. Agreed that a template or better documentation for this kind of multiplatform scenario would be nice.
- 737maxtw 6y ago> Note that your blogs happily tell me to add a single NuGet package for Windows or Linux, but doesn't bother to tell me how to assemble a project that will work on both. Well, the rest of the owl is fairly simple in this case. System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform() can be used to query the OS type, and you specify which builder option (i.e. if islinux UseSystemd ) to use there. I'd type a proper example but on a cell phone. All of that said, YES you think they would document this better.
- ocdtrekkie 6y agoI mean, fundamentally it shouldn't even be "documented". They should have a template that just does it. I should select the Service (.NET Core) template, it should give me the start, restart, stop, etc. points to start adding code, and I should be able to select Windows or Linux as build options by default. Anything that requires I go read a blog post is a massive regression from legacy .NET Framework templates, where I never had to know how a service is built. Visual Studio has traditionally done most of the heavy lifting on managing scaffolding, but in the past couple releases I've found things are often broken unless I go manually edit some file that I previously never had to edit which can't even be edited from within the IDE.
- 737maxtw 6y agoI'll agree with you there. I'm not a fan of the scaffolding and the overall obtuseness around applicationbuilder, before I understood it the thing felt more unintelligible than a monad burrito to a first year cs student.
- 6y ago
- ZeroClickOk 6y ago> Microsoft still lacks a cross-platform desktop UI framework Avalonia to the rescue: https://github.com/AvaloniaUI/Avalonia https://github.com/AvaloniaUI/Avalonia
- ocdtrekkie 6y agoAnd if Microsoft wanted to bless Avalonia as such, great. In 2020, .NET shouldn't have like three Windows UI frameworks and zero officially recognized cross-platform ones, particularly if they want .NET Core to take off.
- tester756 6y ago>zero officially recognized cross-platform ones https://devblogs.microsoft.com/dotnet/introducing-net-multi-platform-app-ui/ https://devblogs.microsoft.com/dotnet/introducing-net-multi-... >if they want .NET Core to take off. Personally I don't need crossplatform (desktop) GUI at all. Backend is enough for me.
- nullsense 6y agoSame. No use for desktop GUI apps in SaaS CRUD apps.
- aliswe 6y agoI believe x platform ui is planned for net 6, ie nov 2021