Somehow for the previous commit hash, which had only numbers in its
short version (0122072), nuget failed with:
Run $date = get-date -format "yyyyMMdd-HHmm"
Attempting to build package from 'TgSharp.Core.csproj'.
Error NU5010: Version string specified for package reference '0.1.0-date.20200414-0908.git.0122072' is invalid.
File does not exist (TgSharp.0.1.0-date.20200414-0908.git.0122072.nupkg).
Now we remove the "." after "date" and "git" and use double-dash
to separate initial version from the sub-version.
The schema is in https://core.telegram.org/schema/json so it's more
logical to expect the file to be named `json`, which is what would
happen if you download it with wget, for example.
Because we might use dependencies soon that require this framework.
And anyway these days the .NET world is mostly a hybrid between
.NETStandard/.NETCore libs and .NET4.6 ones, not older than that.
(This commit was brought from TLSharp [1] version 0.1.0.522.)
[1] 709e5be7cc
WARNING: NU5118: File 'D:\a\TLSharp\TLSharp\TLSharp.Core\bin\Debug\TLSharp.Core.dll' is not added because the package already contains file 'lib\net45\TLSharp.Core.dll'
(This commit was brought from TLSharp [1] version 0.1.0.521.)
[1] 6b35857923
This pipeline doesn't come with Mono out-of-the-box like the GH-Actions
one, so then we need to install mono ourselves (and there are 3
different ways to do it).
When trying to SendRequest it was throwing an exception saying "cannot cast object of type TeleSharp.TL.TLStickerSet to TeleSharp.TL.Messages.TLStickerSet"
Fixes https://github.com/sochix/TLSharp/issues/826
Added CancellationToken with default value to all async methods in TLSharp.Core
Added ConfigureAwait(false) to all async methods in TLSharp.Core
SendRequestAsync replaced to SendAuthenticatedRequestAsync in methods that need auth
Private modifier in SendAuthenticatedRequestAsync changed to internal
Based on PR created by @IaRuslan
Fix naming for models properties (Use JsonProperty instead)
Move models to separate folder
Rename models
Remove unused references in Program.cs
Use string instead of String
Added methods for working with usernames:
Check username (Validates a username and checks availability)
Update username (Changes username for the current user)
Now user can set directory to store sessions somewhere else
other than the folder where the program's executable is.
(Based on patch from Felony <onyfel@gmail.com> contributed
in https://github.com/sochix/TLSharp/pull/874 )
People are reporting that under some circumstances, an infinite
loop could happen when TLSharp tries to handle a reconnection to
a different DC, if the DC instructed to be used is the same as
the one that was used in the last connection.
Not sure how could this happen (although the analysis present in
this github issue [1] might help understand it), but this commit
helps to make TLSharp fail fast (with an exception) instead of an
infinite loop from now on, which will help avoiding people file
issues such as [2] and [3] and instead maybe file a proper bug
report easier to understand, to try to fix the underlying root
cause.
[1] https://github.com/sochix/TLSharp/issues/719
[2] https://github.com/sochix/TLSharp/issues/803
[3] https://github.com/sochix/TLSharp/issues/839