Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

.Net Core Support #419

Open
Dolfik1 opened this issue Mar 9, 2017 · 15 comments
Open

.Net Core Support #419

Dolfik1 opened this issue Mar 9, 2017 · 15 comments

Comments

@Dolfik1
Copy link

Dolfik1 commented Mar 9, 2017

The TLSharp library dependent on BigMath, which not support .Net Core. It's possible to abandon this dependence?

@knocte
Copy link
Collaborator

knocte commented Mar 10, 2017

Pull requests are welcome.

@sochix
Copy link
Owner

sochix commented Mar 16, 2017

@Dolfik1 I think nope. But you can propose alternatives

@hadi77ir
Copy link

hadi77ir commented Apr 4, 2017

I'm thinking that replacing BigMath with https://github.com/ricksladkey/dirichlet-numerics is possible ...

@HamedFathi
Copy link

@Dolfik1 , You can use this BigMathCore

@knocte
Copy link
Collaborator

knocte commented May 23, 2017

How about using System.Numerics' BigInteger?

@knocte
Copy link
Collaborator

knocte commented May 23, 2017

Actually, I've tried the following patch below (to remove BigMath dep), and the solution still builds:

$ git diff
diff --git a/TeleSharp.TL/TLUtils.cs b/TeleSharp.TL/TLUtils.cs
index f4c285b..a63d41d 100644
--- a/TeleSharp.TL/TLUtils.cs
+++ b/TeleSharp.TL/TLUtils.cs
@@ -1,5 +1,4 @@
-<U+FEFF>using BigMath;
-using BigMath.Utils;
+<U+FEFF>
 using System;
 using System.Collections.Generic;
 using System.IO;
@@ -156,26 +155,4 @@ namespace TeleSharp.TL
             writer.Write(src);
         }
     }
-    public class Int128Util
-    {
-        public static Int128 Deserialize(BinaryReader reader)
-        {
-            return reader.ReadBytes(16).ToInt128(0,true);
-        }
-        public static void Serialize(Int128 src, BinaryWriter writer)
-        {
-            writer.Write(src.ToBytes(true));
-        }
-    }
-    public class Int256Util
-    {
-        public static Int256 Deserialize(BinaryReader reader)
-        {
-            return reader.ReadBytes(32).ToInt256(0, true);
-        }
-        public static void Serialize(Int256 src, BinaryWriter writer)
-        {
-            writer.Write(src.ToBytes(true));
-        }
-    }
 }
diff --git a/TeleSharp.TL/TeleSharp.TL.csproj b/TeleSharp.TL/TeleSharp.TL.csproj
index 65252c2..fcb256f 100644
--- a/TeleSharp.TL/TeleSharp.TL.csproj
+++ b/TeleSharp.TL/TeleSharp.TL.csproj
@@ -30,10 +30,6 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="BigMath, Version=0.5.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\BigMath.0.5.0\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\BigMath.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Xml.Linq" />

Can someone check if it's really being used or not? From what I can see, it's not.

@v1r7u
Copy link

v1r7u commented Jan 29, 2018

Here is a PR for it: #687

@guylando
Copy link

@knocte @sochix I converted the solution and projects to netstandard, check this out if you can use it:
https://github.com/guylando/TLSharp

@seriouz
Copy link

seriouz commented May 17, 2018

@guylando please make a PR!

@guylando
Copy link

@seriouz #763

@LORDofDOOM
Copy link

LORDofDOOM commented May 24, 2018

I've already create a PR 4 month ago - #687

@guylando
Copy link

@LORDofDOOM
That PR is stuck and not merged because from what I have seen there is a change in the dotnet version in there which makes knokte not merge it.
My PR just upgraded to netstandard without changing dotnet version.

@LORDofDOOM
Copy link

LORDofDOOM commented May 25, 2018

@guylando: As I wrote in the comments in PR the change to 4.6.1 version is needed because netstandard is not compatible with 4.5.

https://docs.microsoft.com/en-US/dotnet/standard/net-standard

If you don't change version in your PR this may work but it is not a future proof/valid change because it could break on updates in other netstandard libraries.

@guylando
Copy link

@LORDofDOOM if you believe your PR should be merged then you should push it to happen and talk to TLSharp maintainers. It becomes irrelevant if PR exists and nothing is done with it for 4 months

@LORDofDOOM
Copy link

@guylando: I believe my PR should get merged because it works and match best practice. Also appveyor build is passing and I've have changed anything what's required by reviews.

But I cant merge - Thats done by maintainers. I've no idea why it's still blocked

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants