What is your question?
I am using the Google.Ads.GoogleAds library to version 24.1.0 and getting an error in the System.Memory library when loading the Grpc.Core library:
Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 308:
Line 309: // Get the ConversionUploadService.
Line 310: ConversionUploadServiceClient conversionUploadService =
Line 311: client.GetService(Google.Ads.GoogleAds.Services.V22.ConversionUploadService);
Line 312:
Source File: C:\inetpub\wwwroot\movemanager\libraries\UploadEnhancedConversionsForLeads.cs Line: 310
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
(Fully-specified)
LOG: Appbase = file:///C:/inetpub/wwwroot/movemanager/
LOG: Initial PrivatePath = C:\inetpub\wwwroot\movemanager\bin
Calling assembly : Grpc.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad.
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\inetpub\wwwroot\movemanager\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/movemanager/e9660af9/d3cdf3e9/System.Memory.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/movemanager/e9660af9/d3cdf3e9/System.Memory/System.Memory.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/movemanager/bin/System.Memory.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Revision Number
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Stack Trace:
[FileLoadException: Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointerInternal(IntPtr ptr, Type t) +0
System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(IntPtr ptr, Type t) +156
Grpc.Core.Internal.UnmanagedLibrary.GetNativeMethodDelegate(String methodName) +66
Grpc.Core.Internal.NativeMethods..ctor(UnmanagedLibrary library) +843
Grpc.Core.Internal.NativeExtension.LoadNativeMethodsUsingExplicitLoad() +309
Grpc.Core.Internal.NativeExtension..ctor() +13
Grpc.Core.Internal.NativeExtension.Get() +145
Grpc.Core.GrpcEnvironment.GrpcNativeInit() +56
Grpc.Core.GrpcEnvironment..ctor() +87
Grpc.Core.GrpcEnvironment.AddRef() +144
Grpc.Core.Channel..ctor(String target, ChannelCredentials credentials, IEnumerable1 options) +199 Google.Ads.Gax.Lib.AdsChannel.CreateGrpcCoreChannel(Uri uri, ChannelCredentials credentials) +409 Google.Ads.Gax.Lib.AdsChannel..ctor(AdsConfig config, String url) +77 Google.Ads.Gax.Lib.CachedChannelFactory.GetChannel(AdsConfig config, String serverUrl) +678 Google.Ads.GoogleAds.Lib.GoogleAdsServiceClientFactory.GetService(ServiceTemplate3 serviceTemplate, GoogleAdsConfig config) +78
Google.Ads.GoogleAds.Lib.GoogleAdsClient.GetService(ServiceTemplate`3 serviceTemplate) +106
movemanager.libraries.UploadEnhancedConversionsForLeads.Run(GoogleAdsClient client, Int64 customerId, Int64 conversionActionId, String conversionDateTime, Double conversionValue, String orderId, String gclid, String Email, String Phone, String FirstName, String LastName, String Zipcode, String ConvActResName, String sessionAttributesEncoded, String sessionAttributes) in C:\inetpub\wwwroot\movemanager\libraries\UploadEnhancedConversionsForLeads.cs:310
movemanager.libraries.UploadEnhancedConversionsForLeads.UploadConversion(String strJobID, String strStatusID) in C:\inetpub\wwwroot\movemanager\libraries\UploadEnhancedConversionsForLeads.cs:262
MyApplication.FurnitureList.btnSave_Click(Object sender, EventArgs e) in C:\inetpub\wwwroot\movemanager\furnitureList\furnitureList.aspx.cs:900
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +139
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +150
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1959
The code I'm using is from the Upload Enhanced Conversions for Leads example in C#:
https://developers.google.com/google-ads/api/samples/upload-enhanced-conversions-for-leads
These are the entries in my Web.config for the assemblyBinding section:
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.28.2.0" newVersion="3.28.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Api.Gax.Grpc" publicKeyToken="3ec5ea7f18953e47" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.10.0.0" newVersion="4.10.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Api.CommonProtos" publicKeyToken="3ec5ea7f18953e47" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.16.0.0" newVersion="2.16.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Api.Gax.Rest" publicKeyToken="3ec5ea7f18953e47" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.10.0.0" newVersion="4.10.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.LongRunning" publicKeyToken="185c282632e132a0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
</assemblyBinding>
See package list for project:

I am trying to resolve this runtime error and any help would be appreciated
Thanks!
John O'Neil
johnoneil966@gmail.com
What is your question?
I am using the Google.Ads.GoogleAds library to version 24.1.0 and getting an error in the System.Memory library when loading the Grpc.Core library:
Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 308:
Line 309: // Get the ConversionUploadService.
Line 310: ConversionUploadServiceClient conversionUploadService =
Line 311: client.GetService(Google.Ads.GoogleAds.Services.V22.ConversionUploadService);
Line 312:
Source File: C:\inetpub\wwwroot\movemanager\libraries\UploadEnhancedConversionsForLeads.cs Line: 310
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
(Fully-specified)
LOG: Appbase = file:///C:/inetpub/wwwroot/movemanager/
LOG: Initial PrivatePath = C:\inetpub\wwwroot\movemanager\bin
Calling assembly : Grpc.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad.
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\inetpub\wwwroot\movemanager\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/movemanager/e9660af9/d3cdf3e9/System.Memory.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/movemanager/e9660af9/d3cdf3e9/System.Memory/System.Memory.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/movemanager/bin/System.Memory.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Revision Number
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Stack Trace:
[FileLoadException: Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointerInternal(IntPtr ptr, Type t) +0
System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(IntPtr ptr, Type t) +156
Grpc.Core.Internal.UnmanagedLibrary.GetNativeMethodDelegate(String methodName) +66
Grpc.Core.Internal.NativeMethods..ctor(UnmanagedLibrary library) +843
Grpc.Core.Internal.NativeExtension.LoadNativeMethodsUsingExplicitLoad() +309
Grpc.Core.Internal.NativeExtension..ctor() +13
Grpc.Core.Internal.NativeExtension.Get() +145
Grpc.Core.GrpcEnvironment.GrpcNativeInit() +56
Grpc.Core.GrpcEnvironment..ctor() +87
Grpc.Core.GrpcEnvironment.AddRef() +144
Grpc.Core.Channel..ctor(String target, ChannelCredentials credentials, IEnumerable
1 options) +199 Google.Ads.Gax.Lib.AdsChannel.CreateGrpcCoreChannel(Uri uri, ChannelCredentials credentials) +409 Google.Ads.Gax.Lib.AdsChannel..ctor(AdsConfig config, String url) +77 Google.Ads.Gax.Lib.CachedChannelFactory.GetChannel(AdsConfig config, String serverUrl) +678 Google.Ads.GoogleAds.Lib.GoogleAdsServiceClientFactory.GetService(ServiceTemplate3 serviceTemplate, GoogleAdsConfig config) +78Google.Ads.GoogleAds.Lib.GoogleAdsClient.GetService(ServiceTemplate`3 serviceTemplate) +106
movemanager.libraries.UploadEnhancedConversionsForLeads.Run(GoogleAdsClient client, Int64 customerId, Int64 conversionActionId, String conversionDateTime, Double conversionValue, String orderId, String gclid, String Email, String Phone, String FirstName, String LastName, String Zipcode, String ConvActResName, String sessionAttributesEncoded, String sessionAttributes) in C:\inetpub\wwwroot\movemanager\libraries\UploadEnhancedConversionsForLeads.cs:310
movemanager.libraries.UploadEnhancedConversionsForLeads.UploadConversion(String strJobID, String strStatusID) in C:\inetpub\wwwroot\movemanager\libraries\UploadEnhancedConversionsForLeads.cs:262
MyApplication.FurnitureList.btnSave_Click(Object sender, EventArgs e) in C:\inetpub\wwwroot\movemanager\furnitureList\furnitureList.aspx.cs:900
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +139
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +150
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1959
The code I'm using is from the Upload Enhanced Conversions for Leads example in C#:
https://developers.google.com/google-ads/api/samples/upload-enhanced-conversions-for-leads
These are the entries in my Web.config for the assemblyBinding section:
See package list for project:

I am trying to resolve this runtime error and any help would be appreciated
Thanks!
John O'Neil
johnoneil966@gmail.com