Is there any solution for not a file URL problem? - xamarin.ios

I get this error while i run my application:
{System.TypeLoadException: Could not load type of field due to: Could not load file or assembly 'System.IO.Compression, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
Any solution for this exception?

Related

TypeLoadException: Could not load type 'System.Net.Http.SocketsHttpHandler

Is there any way that i can overcome this error:
System.TypeInitializationException: 'The type initializer for 'Azure.Core.Pipeline.HttpClientTransport' threw an exception.'
TypeLoadException: Could not load type 'System.Net.Http.SocketsHttpHandler' from assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
The Framework that i was using is 4.7 and i was getting this error, when i try to get this value. SmsClient smsClient = new SmsClient(connectionString);
Here i've tried Bind Redirect to the latest version & the particular Version mentioned in the error 4.0.0.0 .
But still i was getting the same. Any suggestions for this...

How to resolve following issue : 'Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' error

getting this issue for crystal report: 'System.IO.FileLoadException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'...i have added log4net.dll on azure server via filezilla...
what steps to be done to resolve this issue

How can I resolve this NewtonSoft version conflict?

I'm working on an Azure function. I'm using Microsoft.Azure.Devices.Shared, which requires NewtonSoft v11, so I've implemented some manual binding redirects with the app domain which seems to be working (see below). But somehow, there is a hard reference to the WebJob app domain that NewtonSoft is conflicting with if I'm reading the log below correctly:
2018-05-21T22:03:03.824 [Info] Exception:
[A]Newtonsoft.Json.Linq.JObject cannot be cast to
[B]Newtonsoft.Json.Linq.JObject. Type A originates from
'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral,
PublicKeyToken=30ad4fe6b2a6aeed' in the context 'Default' at location
'D:\Program Files
(x86)\SiteExtensions\Functions\1.0.11702\bin\Newtonsoft.Json.dll'.
Type B originates from 'Newtonsoft.Json, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' in the context
'LoadNeither' in a byte array.
My Newtonsoft v11 dll is in the function's bin directory and is referenced there like so:
#r "bin\Newtonsoft.Json.dll"
There is actual code in the function that works correctly in the function:
dynamic eventHubMessage =
JsonConvert.DeserializeObject<JObject>(myEventHubMessage);
But when it hits this line:
CRSLTwinData twinData = IotHubProxy.GetTwinData(hubDeviceId);
It throws the exception. The reference to M.A.D.Shared and Newtonsoft 11 is therein.
I've tried everything I can to get the function to use the 11 version of the dll, but something is obviously out of whack.
UPDATE: we tried redirecting to 9 instead and got this:
2018-05-22T13:24:48.336 [Info] Exception: [A]Newtonsoft.Json.Linq.JObject cannot be cast to
[B]Newtonsoft.Json.Linq.JObject. Type A originates from
'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral,
PublicKeyToken=30ad4fe6b2a6aeed' in the context 'Default' at location
'D:\Program Files
(x86)\SiteExtensions\Functions\1.0.11702\bin\Newtonsoft.Json.dll'.
Type B originates from 'Newtonsoft.Json, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' in the context
'LoadFrom' at location 'D:\local\Temporary ASP.NET
Files\root\e801054b\3f30c00f\assembly\dl3\e5381214\00f64e9a_9af1d301\Newtonsoft.Json.dll'.
Then we tried redirect to 10 and got this :):
2018-05-22T14:16:14.509 [Info] Exception:
[A]Newtonsoft.Json.Linq.JObject cannot be cast to
[B]Newtonsoft.Json.Linq.JObject. Type A originates from
'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral,
PublicKeyToken=30ad4fe6b2a6aeed' in the context 'Default' at location
'D:\Program Files
(x86)\SiteExtensions\Functions\1.0.11702\bin\Newtonsoft.Json.dll'.
Type B originates from 'Newtonsoft.Json, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' in the context
'LoadFrom' at location 'D:\local\Temporary ASP.NET
Files\root\e801054b\3f30c00f\assembly\dl3\e5381214\00f64e9a_9af1d301\Newtonsoft.Json.dll'.
I presume you are using azure function 1.0 which has known assembly resolution problem.
Since webjob use strict version number of Newtonsoft json, what I have done in my project is to downgrade all mine to inline with the sdk's
Use Microsoft.NET.Sdk.Functions version 1.0.13, which consumes Newtonsoft.Json 10.0.3

Is it possible to reference external assembly with native dependencies in Azure function?

I'm getting following exception when doing aforementioned:
2017-12-10T12:40:39.771 Exception during runtime resolution of assembly 'Affdex, Version=3.4.1.1320, Culture=neutral, PublicKeyToken=null':
'System.IO.FileLoadException: Could not load file or assembly 'Affdex, Version=3.4.1.1320, Culture=neutral, PublicKeyToken=null'
or one of its dependencies. Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019)
File name: 'Affdex, Version=3.4.1.1320, Culture=neutral, PublicKeyToken=null' ---> System.IO.FileLoadException: Attempt to load an unverifiable executable with fixups
Is there a location that Azure Function runtime looks for dependencies (like Sys32/Inetsrv in Windows)?

Server Error in '/' Application. Could not load file or assembly 'System.Web.WebPages.Deployment, Version=3.0.0.0,

Server Error in '/' Application.
Could not load file or assembly 'System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
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.FileNotFoundException: Could not load file or assembly 'System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
System.Web.WebPages.WebPageRoute.DoPostResolveRequestCache(HttpContextBase context) +0
System.Web.WebPages.WebPageHttpModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) +89
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +141
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2053.0
Go to the references find the system. Web.webpages.deployment then go to the properties then check the version and then insert in to Web config file
I hope it helps.

Resources