From 8f90ef968dc267820a9abfe8ef785c097cad2abc Mon Sep 17 00:00:00 2001 From: Fede Azzato Date: Tue, 23 Aug 2022 15:22:51 -0300 Subject: [PATCH 1/5] Use version 3.7 of Google APIs This is so that Microsoft.BCL.AsyncInterfaces is resolved to version 5.0.0 instead of 6.0.0, which conflicts with the rest of .NET Framework standard classes. --- .../Providers/Storage/GXGoogleCloud/GXGoogleCloud.csproj | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/GXGoogleCloud.csproj b/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/GXGoogleCloud.csproj index 965b1b5f9..f941eac47 100644 --- a/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/GXGoogleCloud.csproj +++ b/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/GXGoogleCloud.csproj @@ -8,11 +8,10 @@ - - + - + From 52c4b205fa13f54bf586a5328a0a86497cf32a93 Mon Sep 17 00:00:00 2001 From: Fede Azzato Date: Wed, 24 Aug 2022 19:01:45 -0300 Subject: [PATCH 2/5] Remove transitive dependencies --- .../dotnetframework/Projects/StoreManager/StoreManager.csproj | 3 --- .../Providers/Storage/GXGoogleCloud/GXGoogleCloud.csproj | 3 --- 2 files changed, 6 deletions(-) diff --git a/dotnet/src/dotnetframework/Projects/StoreManager/StoreManager.csproj b/dotnet/src/dotnetframework/Projects/StoreManager/StoreManager.csproj index c41b2182e..d4978dcde 100644 --- a/dotnet/src/dotnetframework/Projects/StoreManager/StoreManager.csproj +++ b/dotnet/src/dotnetframework/Projects/StoreManager/StoreManager.csproj @@ -9,10 +9,7 @@ GeneXus.StoreManager - - - diff --git a/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/GXGoogleCloud.csproj b/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/GXGoogleCloud.csproj index f941eac47..e8dd2dcb3 100644 --- a/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/GXGoogleCloud.csproj +++ b/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/GXGoogleCloud.csproj @@ -8,9 +8,6 @@ - - - From 99412263782c955d8e0381fcac2ebfc2ea0d7926 Mon Sep 17 00:00:00 2001 From: Fede Azzato Date: Wed, 24 Aug 2022 19:02:46 -0300 Subject: [PATCH 3/5] Roll back dependency to the latest compatible with GXGoogleCloud.csproj --- .../dotnetframework/Projects/StoreManager/StoreManager.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/src/dotnetframework/Projects/StoreManager/StoreManager.csproj b/dotnet/src/dotnetframework/Projects/StoreManager/StoreManager.csproj index d4978dcde..39fa35871 100644 --- a/dotnet/src/dotnetframework/Projects/StoreManager/StoreManager.csproj +++ b/dotnet/src/dotnetframework/Projects/StoreManager/StoreManager.csproj @@ -9,7 +9,7 @@ GeneXus.StoreManager - + From 48498a2356b4c2e33574de7dcfed03e8160b8532 Mon Sep 17 00:00:00 2001 From: Fede Azzato Date: Wed, 24 Aug 2022 19:06:03 -0300 Subject: [PATCH 4/5] Update dependencies version in config This is just to avoid confusion, cause class libraries don't have binding redirects. --- .../Providers/Storage/GXGoogleCloud/app.config | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/app.config b/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/app.config index 70e434f96..612d6bc68 100644 --- a/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/app.config +++ b/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/app.config @@ -1,34 +1,30 @@ - + - - - - - + - + - + - + - + - + From ecda3fe0ffec4d414ade359bb404778ae6cc764f Mon Sep 17 00:00:00 2001 From: Fede Azzato Date: Wed, 24 Aug 2022 19:07:44 -0300 Subject: [PATCH 5/5] Add assembly resolver to try to load version independent assemblies from Google --- .../Storage/GXGoogleCloud/ExternalProviderGoogle.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/ExternalProviderGoogle.cs b/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/ExternalProviderGoogle.cs index db2714e3c..7d6042b7b 100644 --- a/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/ExternalProviderGoogle.cs +++ b/dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/ExternalProviderGoogle.cs @@ -49,6 +49,19 @@ public ExternalProviderGoogle() : this(null) public ExternalProviderGoogle(GXService providerService) : base(providerService) { +#if NETFRAMEWORK + AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => + { + if (args.Name.StartsWith(nameof(Google))) + { + int sep = args.Name.IndexOf(','); + if (sep != -1) + return System.Reflection.Assembly.Load(args.Name.Remove(sep)); + } + + return null; + }; +#endif Initialize(); }