Skip to content

Commit 7db05fd

Browse files
committed
Use version 3.7 of Google APIs (#674)
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. * Add assembly resolver to try to load version independent assemblies from Google.
1 parent 9823d84 commit 7db05fd

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

dotnet/src/dotnetframework/Projects/StoreManager/StoreManager.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
<PackageId>GeneXus.StoreManager</PackageId>
1010
</PropertyGroup>
1111
<ItemGroup>
12-
<PackageReference Include="Google.Apis" Version="1.57.0" />
13-
<PackageReference Include="Google.Apis.AndroidPublisher.v3" Version="1.57.0.2741" />
14-
<PackageReference Include="Google.Apis.Auth" Version="1.57.0" />
15-
<PackageReference Include="Google.Apis.Core" Version="1.57.0" />
12+
<PackageReference Include="Google.Apis.AndroidPublisher.v3" Version="1.55.0.2582" />
1613
<PackageReference Include="log4net" Version="2.0.11" />
1714
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
1815
<PackageReference Include="Zlib.Portable.Signed" Version="1.11.0" />

dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/ExternalProviderGoogle.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,19 @@ public ExternalProviderGoogle() : this(null)
4949

5050
public ExternalProviderGoogle(GXService providerService) : base(providerService)
5151
{
52+
#if NETFRAMEWORK
53+
AppDomain.CurrentDomain.AssemblyResolve += (sender, args) =>
54+
{
55+
if (args.Name.StartsWith(nameof(Google)))
56+
{
57+
int sep = args.Name.IndexOf(',');
58+
if (sep != -1)
59+
return System.Reflection.Assembly.Load(args.Name.Remove(sep));
60+
}
61+
62+
return null;
63+
};
64+
#endif
5265
Initialize();
5366
}
5467

dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/GXGoogleCloud.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Google.Api.Gax" Version="4.0.0" />
12-
<PackageReference Include="Google.Api.Gax.Rest" Version="4.0.0" />
13-
<PackageReference Include="Google.Apis" Version="1.57.0" />
14-
<PackageReference Include="Google.Apis.Storage.v1" Version="1.57.0.2685" />
15-
<PackageReference Include="Google.Cloud.Storage.V1" Version="4.0.0" />
11+
<PackageReference Include="Google.Cloud.Storage.V1" Version="3.7.0" />
1612
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
1713
</ItemGroup>
1814
<ItemGroup>

dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/app.config

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<runtime>
44
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5-
<dependentAssembly>
6-
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
7-
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
8-
</dependentAssembly>
95
<dependentAssembly>
106
<assemblyIdentity name="Google.Apis.Storage.v1" publicKeyToken="4b01fa6e34db77ab" culture="neutral" />
11-
<bindingRedirect oldVersion="0.0.0.0-1.27.1.888" newVersion="1.27.1.888" />
7+
<bindingRedirect oldVersion="0.0.0.0-1.55.0.2526" newVersion="1.55.0.2526" />
128
</dependentAssembly>
139
<dependentAssembly>
1410
<assemblyIdentity name="Google.Apis" publicKeyToken="4b01fa6e34db77ab" culture="neutral" />
15-
<bindingRedirect oldVersion="0.0.0.0-1.28.0.0" newVersion="1.28.0.0" />
11+
<bindingRedirect oldVersion="0.0.0.0-1.55.0.0" newVersion="1.55.0.0" />
1612
</dependentAssembly>
1713
<dependentAssembly>
1814
<assemblyIdentity name="Google.Apis.Core" publicKeyToken="4b01fa6e34db77ab" culture="neutral" />
19-
<bindingRedirect oldVersion="0.0.0.0-1.28.0.0" newVersion="1.28.0.0" />
15+
<bindingRedirect oldVersion="0.0.0.0-1.55.0.0" newVersion="1.55.0.0" />
2016
</dependentAssembly>
2117
<dependentAssembly>
2218
<assemblyIdentity name="Google.Apis.PlatformServices" publicKeyToken="4b01fa6e34db77ab" culture="neutral" />
23-
<bindingRedirect oldVersion="0.0.0.0-1.28.0.0" newVersion="1.28.0.0" />
19+
<bindingRedirect oldVersion="0.0.0.0-1.55.0.0" newVersion="1.55.0.0" />
2420
</dependentAssembly>
2521
<dependentAssembly>
2622
<assemblyIdentity name="Google.Api.Gax" publicKeyToken="3ec5ea7f18953e47" culture="neutral" />
27-
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
23+
<bindingRedirect oldVersion="0.0.0.0-3.6.0.0" newVersion="3.6.0.0" />
2824
</dependentAssembly>
2925
<dependentAssembly>
3026
<assemblyIdentity name="Google.Apis.Auth" publicKeyToken="4b01fa6e34db77ab" culture="neutral" />
31-
<bindingRedirect oldVersion="0.0.0.0-1.28.0.0" newVersion="1.28.0.0" />
27+
<bindingRedirect oldVersion="0.0.0.0-1.55.0.0" newVersion="1.55.0.0" />
3228
</dependentAssembly>
3329
<dependentAssembly>
3430
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />

0 commit comments

Comments
 (0)