diff --git a/Google.Authenticator/MissingDependencyException.cs b/Google.Authenticator/MissingDependencyException.cs deleted file mode 100644 index de4d02a..0000000 --- a/Google.Authenticator/MissingDependencyException.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace Google.Authenticator -{ - public class MissingDependencyException : Exception - { - public MissingDependencyException(string message) : base(message) - { - } - - public MissingDependencyException(string message, Exception innerException) : base(message, innerException) - { - } - } -} \ No newline at end of file diff --git a/Google.Authenticator/TwoFactorAuthenticator.cs b/Google.Authenticator/TwoFactorAuthenticator.cs index 0a1d963..c716f1c 100644 --- a/Google.Authenticator/TwoFactorAuthenticator.cs +++ b/Google.Authenticator/TwoFactorAuthenticator.cs @@ -96,22 +96,6 @@ private static string GenerateQrCodeUrl(int qrPixelsPerModule, string provisionU } } - catch (TypeInitializationException e) - { - if (e.InnerException != null - && e.InnerException.GetType() == typeof(DllNotFoundException) - && e.InnerException.Message.Contains("libgdiplus")) - { - throw new MissingDependencyException( - "It looks like libgdiplus has not been installed - see" + - " https://github.com/codebude/QRCoder/issues/227", - e); - } - else - { - throw; - } - } catch (System.Runtime.InteropServices.ExternalException e) { if (e.Message.Contains("GDI+") && qrPixelsPerModule > 10) diff --git a/README.md b/README.md index ad05b7d..d5bcbed 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,10 @@ bool result = tfa.ValidateTwoFactorPIN(key, txtCode.Text) ## Updates -### 3.0.0-beta1 -Removed support for legacy .Net Framework. Lowest supported versions are now netstandard2.0 and .Net 4.6.2. -All use of System.Drawing has been removed. In 2.5, only Net 6.0 avoided System.Drawing. +### 3.0.0-beta +- Removed support for legacy .Net Framework. Lowest supported versions are now netstandard2.0 and .Net 4.6.2. +- All use of System.Drawing has been removed. In 2.5, only Net 6.0 avoided System.Drawing. +- Linux installations no longer need to ensure `libgdiplus` is installed as it is no longer used. ### 2.5.0 Now runs on .Net 6.0. @@ -50,4 +51,4 @@ Technically the QR Coder library we rely on still does not fully support .Net 6. * Don't use the secret key and `ManualEntryKey` interchangeably. `ManualEntryKey` is used to enter into the authenticator app when scanning a QR code is impossible and is derived from the secret key ([discussion example](https://github.com/BrandonPotter/GoogleAuthenticator/issues/54)) # Notes -On linux, you need to ensure `libgdiplus` is installed if you want to generate QR Codes. See [https://github.com/codebude/QRCoder/issues/227](https://github.com/codebude/QRCoder/issues/227). +*With versions prior to 3.0*, on linux, you need to ensure `libgdiplus` is installed if you want to generate QR Codes. See [https://github.com/codebude/QRCoder/issues/227](https://github.com/codebude/QRCoder/issues/227).