diff --git a/Src/Support/Google.Apis.Auth/Google.Apis.Auth.csproj b/Src/Support/Google.Apis.Auth/Google.Apis.Auth.csproj
index f5ff99df4ad..9e507b22162 100644
--- a/Src/Support/Google.Apis.Auth/Google.Apis.Auth.csproj
+++ b/Src/Support/Google.Apis.Auth/Google.Apis.Auth.csproj
@@ -42,7 +42,11 @@ This package includes auth components like user-credential, authorization code f
-
+
+
+
+
+
OAuth2/AwsExternalAccountCredential.cs
diff --git a/Src/Support/Google.Apis.Auth/OAuth2/ComputeCredential.cs b/Src/Support/Google.Apis.Auth/OAuth2/ComputeCredential.cs
index 8034b5a413a..0dc7821b7f5 100644
--- a/Src/Support/Google.Apis.Auth/OAuth2/ComputeCredential.cs
+++ b/Src/Support/Google.Apis.Auth/OAuth2/ComputeCredential.cs
@@ -379,13 +379,12 @@ private static async Task IsGoogleBiosAsync()
bool IsWindows()
{
-#if NET45
+#if NET462
// RuntimeInformation.IsOsPlatform is not available for NET45.
// We are probably on Windows, unless we are using Mono which means we might be
// elsewhere. But we don't have a reliable way to determine that, so let's
// return false, always.
- // Note that this check will go away after
- // https://github.com/googleapis/google-api-dotnet-client/issues/2561.
+ // Note that this check can go away after we update to 4.7.1 or higher.
return false;
#else
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
@@ -394,13 +393,12 @@ bool IsWindows()
bool IsLinux()
{
-#if NET45
+#if NET462
// RuntimeInformation.IsOsPlatform is not available for NET45.
// There's a chance we are on Linux if we are using Mono.
// But we don't have a reliable way to determine that, so let's
// return false, always.
- // Note that this check will go away after
- // https://github.com/googleapis/google-api-dotnet-client/issues/2561.
+ // Note that this check can go away after we update to 4.7.1 or higher.
return false;
#else
return RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
@@ -410,10 +408,6 @@ bool IsLinux()
bool IsWindowsGoogleBios()
{
Logger.Info("Checking BIOS values on Windows.");
-#if NET45 || NETSTANDARD1_3
- Logger.Debug("System.Management is not supported in net45 and netstandard1.3");
- return false;
-#else
System.Management.ManagementClass biosClass = new ("Win32_BIOS");
using var instances = biosClass.GetInstances();
@@ -438,7 +432,6 @@ bool IsWindowsGoogleBios()
Logger.Debug("No Win32_BIOS management object found.");
}
return isGoogle;
-#endif
}
async Task IsLinuxGoogleBiosAsync()
diff --git a/Src/Support/Google.Apis.Tests/CultureSwitcher.cs b/Src/Support/Google.Apis.Tests/CultureSwitcher.cs
index 634cb6486c7..ed8fbe107db 100644
--- a/Src/Support/Google.Apis.Tests/CultureSwitcher.cs
+++ b/Src/Support/Google.Apis.Tests/CultureSwitcher.cs
@@ -47,14 +47,5 @@ internal CultureSwitcher(CultureInfo newCulture)
public void Dispose() => SetCulture(_originalCulture);
- private void SetCulture(CultureInfo culture)
- {
- // CultureInfo.CurrentCulture is the preferred way to set this,
- // but it was read-only on .NET Framework before v4.6.
-#if NET452
- System.Threading.Thread.CurrentThread.CurrentCulture = culture;
-#else
- CultureInfo.CurrentCulture = culture;
-#endif
- }
+ private void SetCulture(CultureInfo culture) => CultureInfo.CurrentCulture = culture;
}