ullmark/hashids.net

CoreCLR Support

bchavez opened this issue ยท 6 comments

Drop in source copy doesn't seem to compile under DNX Core RC1:

C:\projects\bogus\Source\Bogus\Hashids.cs(363,35):
DNXCore,Version=v5.0 error CS0117: 'string' does not contain a definition for 'Copy'

Any ideas?

Thanks,
Brian

Hi. @bchavez hashids.net was built before dotnet core and such existed, so support might not exist right now, I am working on trying to catch up with adding support and getting knowledge on how to best change the project to support all the different targets.

There are PRs available for this ex.
#16

In the meantime maybe you could test that code out. I'll try to get it merged asap! Sorry for the hold up, but have been without windows for a while ๐Ÿ˜„ but back in business now.

Hi @ullmark , no worries. I pretty much just changed one line: bchavez/Bogus@4763ab8

I don't think this is a permanent fix. I think CoreCLR will have string.Copy in RC2, but I'm not totally sure. It's not super critical in my case, so a little hack like this will work fine. ๐Ÿ‘ Sorry for the dupe issue, feel free to close the issue if necessary.

Would love to see a .net core version of this

@CVertex Hi, yup I agree. At first I didn't want to change the api based on some alpha version of Core that might change. Now I have a branch where I've converted the entire library to a "portable class library" which seems the best fit for this kind of library.

However I don't feel Microsoft does a good job explaining PLC or if it needs to be build and distributed some other way on nuget.. etc. If you're a person that have more knowledge of dotnet core I'd gladly take some input.

@ullmark I did some quick searching for Migrating nugets to .NET core and didn't find anything useful. I've never built a nuget package before, so I wish I could help.
I've only been playing with ASP.NET core apps. Perhaps next time I play with .NET core I'll experiment with building a nuget from a class library. Apparently the dotnetcore tooling makes it much easier to make nuget packages from any project.

Support has been added in version 1.2.0