Puck
Puck
CC#
Created by Puck on 11/8/2023 in #help
❔ Best, most reliable NER (Named Entity Recognition) Library for .NET?
I'm looking for a NER library that is supported with .net framework & .net core. I do not want to use services like google or azure to do my NER as for my use case it is very mild and I don't want to pay for something so small. Upon looking at NER libraries, there isn't really a clear direction on the most straightforward to use, reliability and well documented. I'm just looking for a NER library like SpaCy. I know there's SpaCy.NET but don't really know how well it performs as it isn't a full implementation and seems to be dead. Looking for something more maintained. Overall I am looking for *something easy to use *well maintained *fairly efficient and uses some sort of prediction algorithm to help predict a few things based on context (optional but would prefer) *one that works in .net core and framework, or just one or the other but in this case framework will be what I am using The closest so far I have found was Stanford NER but it has so many dependencies so was looking to see if anything better exists. It can be a wrapper to anything as well as long as it's fairly straight forward to use
13 replies
CC#
Created by Puck on 10/29/2023 in #help
❔ .NET Framework 4.8 Vs .Net Core for Longterm Support
So .NET Framework 4.8 has an indeinfite support while .NET 6 is going to go EOL in Nov, 2024 while .NET 8 will in Nov, 2026. What is better to go with for long term support? Say I didn't want to update the program at all and everything necessary dependency wise will always be included and function as intended. Is there a reason to go for .NET 6 outside of Framework 4.8 if I am not going to use new features? I know .NET Core has newer features and better support for the long term, but if I wasn't constantly upgrading the project to 6 -> 7 -> 8 -> 9 etc and just want the program to work on windows 10+ for say the next 30 years without any code updates, what would you think is a better option? You can assume the program will function as an automated tester that sends and receives web requests only, based on specific results. Nothing else.
104 replies
CC#
Created by Puck on 5/24/2023 in #help
❔ update-package : Failed to add reference to 'xyz'. Error HRESULT E_FAIL has been returned
So I don't really know what happened. Turned my pc on, opened a project I created 2 days ago. My pacakges.config file was missing and was like ok weird. Made nuget recreate it and realized my references were gone so forced a reinstall through nuget. Now, for whatever reason I keep getting failed HRESULTS. It isn't specific to discord.net, it happens to random packages the more I retry, it just picks a random package to error. I have tried to delete the nuget cache, nuget.config file and I have also ran the command that is meant to fix the problem gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll but no luck. I have both VS 2022 and 2017, both of them seem to return the same exact issue now. I'm not sure what happened but I think a cache is corrupt? I just don't know which one...
I have tried to create a new project with .net framework console, tried different versions ranging from 4.6-4.8 and still the issue persists. I'd only have to assume it would be the same for .net core.
Here is the error I get
update-package : Failed to add reference to 'Discord.Net.Core'.
Error HRESULT E_FAIL has been returned from a call to a COM component.
At line:1 char:1
+ update-package -reinstall
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Update-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand

update-package : Failed to add reference to 'Discord.Net.Core'.
Error HRESULT E_FAIL has been returned from a call to a COM component.
At line:1 char:1
+ update-package -reinstall
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Update-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand

Would love to know if someone has managed to fix this before because this is the first time It has happened to me. Very frustrating 😦 It doesn't seem to matter what VS I use, be it 2017 or 2022, it gives the same issue even if I create a new project on both VS's separately.
5 replies
CC#
Created by Puck on 3/9/2023 in #help
❔ How to ORM joins using sqlite-net?
I am currently using .NET6 and this sqlite https://github.com/praeclarum/sqlite-net for a small project. I wanted to know what the best way to get a good ORM going. I used to use Dapper in the past for System.Data.Sqlite but that has issues of its own. Say we have an example schema (primary key, auto increment , db layout are irrelevant so dw about it, just using this for an example and not in the real world)
public class House{
public int Id {get;set;}
public string Name {get;set;}
}

public class HouseCost{
public int Id {get;set;}
public int HouseId {get;set;}
public decimal Cost {get;set;}
}

public class HouseDto{
public House house {get;set;}
public HouseCost {get;set;}
}
public class House{
public int Id {get;set;}
public string Name {get;set;}
}

public class HouseCost{
public int Id {get;set;}
public int HouseId {get;set;}
public decimal Cost {get;set;}
}

public class HouseDto{
public House house {get;set;}
public HouseCost {get;set;}
}
How can I bind this inner join into HouseDto? SELECT * FROM House INNER JOIN HouseCost ON HouseCost.HouseId = House.Id Now, I know I can just make a class and paste them in such as
public class HouseDto{
public int Id {get;set;}
public int HouseId {get;set;}
public decimal Cost {get;set;}
public string Name {get;set;}
}
public class HouseDto{
public int Id {get;set;}
public int HouseId {get;set;}
public decimal Cost {get;set;}
public string Name {get;set;}
}
But there are 2 issues with this approach. Issue #1. It gets messy, like real messy if I want to add/change some things. Issue #2. How would it know where to Bind HouseId and HouseCost's Id, since they are both the same name. I'd assume I'd need to have an attribute to make them unique? With dapper, this was solved by letting it bind to each individual object, which would prevent all these issues. But I cannot seem to figure out how it's done in sqlite-net. I know it may not be possible with this library. If it isn't possible, is there a library similar to this that supports Async reading/writing with full multi-threading with the basic .Insert(obj) and Query<T>() sql-net offers?
21 replies
CC#
Created by Puck on 3/4/2023 in #help
Vs2022 - Any way to change icons back to vs2019 or less?
So I recently switched to Vs2022 and was wondering if you could revert the icons back to the original? I'm having a hard time looking at the newer icons, they just look so wrong on many different levels. Had searched the net for a while but couldn't find any reliable information about this, so I'd assume there is no real way? I'm looking to change mostly the save, open, folder and intellisense popup icons (if at all possible)
18 replies
CC#
Created by Puck on 10/26/2022 in #help
How to change cipher suites in .NET 6 on windows without regedit?
I know there's an option for SslClientAuthenticationOptions.CipherSuitesPolicy but the issue is it's only supported on linux or mac. I'm wondering if there's a way to change the cipher suites in some way (be it a library or alternative property). I know you can use CURL to do this but I'd much prefer if it was something that can easily be referenced to in c# itself without making a wrapper around curl with cmd args. I know you can manually change it through the registry but this is only valid for newer versions of windows as some cipher suites were not implemented until then. I know bouncy castle gives the option to manually accept a fingerprint with the support of the newer ciphers. But it does not support a lot of http features without having to manually implement every single one by itself. Would be nice if there was a library that had support like there is on python. Any kind of help will be appreciated
1 replies
CC#
Created by Puck on 10/20/2022 in #help
Nullable strings in .net 6
So I'm a little bit new to .NET 6 coming from .NET framework. Do we have to make a string string? in .NET6 and above if it's nullable or can we ignore it? Say I have a parameter void Foo(string str = null), I get warned by rider because it says it's a null literal in a non-nullable reference type but it compiles just fine. Is it best practice to have the strings declared like string? when nullable So in the end, we use string when it wont ever be null and string? when it is nullable in .net 6?
5 replies