assembly-loading

Microsoft.Diagnostics.Tracing.EventSource with the RabbitMQ.Client.dll exception

浪尽此生 提交于 2020-08-08 11:47:11
问题 Why may I be getting the following error and how could I fix it? An unhandled exception of type 'System.IO.FileLoadException' occurred in RabbitMQ.Client.dll Could not load file or assembly 'Microsoft.Diagnostics.Tracing.EventSource, Version=1.1.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) UPDATE After the comment in the comments

Microsoft.Diagnostics.Tracing.EventSource with the RabbitMQ.Client.dll exception

孤者浪人 提交于 2020-08-08 11:46:53
问题 Why may I be getting the following error and how could I fix it? An unhandled exception of type 'System.IO.FileLoadException' occurred in RabbitMQ.Client.dll Could not load file or assembly 'Microsoft.Diagnostics.Tracing.EventSource, Version=1.1.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) UPDATE After the comment in the comments

Trying to bind configuration: System.ComponentModel.TypeConverter can't be loaded

我们两清 提交于 2020-02-24 11:24:18
问题 I am trying to use ASP.NET Core configuration (specifically Microsoft.Extensions.Configuration.Json) in a console application. When I call IConfigurationRoot.Bind() it throws a FileNotFound exception for the assembly System.ComponentModel.TypeConverter . To my knowledge TypeConverter is in the System.ComponentModel namespaces in the System assembly, not the fictitious System.ComponentModel.TypeConverter assembly. This appears to be a bug. Or am I missing something? I'm targeting .NET 4.5.2,

Load assembly from memory

♀尐吖头ヾ 提交于 2020-01-14 13:42:10
问题 I am porting a Java application where classes are loaded and "executed" at runtime from memory (a byte array). I am trying to achieve the same thing in C#, but I am having problems ( System.IO.FileNotFoundException exceptions) when trying to load assemblies from byte arrays (using the AppDomain.Load method). static void Main(string[] args) { var domain = AppDomain.CreateDomain("foo"); domain.AssemblyResolve += new ResolveEventHandler(domain_AssemblyResolve); var assembly = domain.Load(

Could not load file or assembly 'Microsoft.Practices.Unity'

青春壹個敷衍的年華 提交于 2020-01-01 04:07:47
问题 I am trying to upgrade Unity to version (2.1.505.2), but when I run the application I get the following FileLoadException Could not load file or assembly 'Microsoft.Practices.Unity, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. We are upgrading from Unity 2.0.414.0 to 2.1.505.2. All project references in the solution that refer to Unity refer to the correct version of the dll There is no Unity dll referenced in the Gac. (double checked by

Why am I getting a MissingMethodException when calling F# code from PowerShell?

馋奶兔 提交于 2019-12-12 18:25:05
问题 I'm trying to use PowerShell to call some F# code which uses Akka.Net actors. The F# code works fine in unit testing and when run from the F# interpreter, but when I call the same code from a PowerShell cmdlet I get the following exception: System.MissingMethodException: Method not found: 'Void Nessos.FsPickler.BinarySerializer..ctor(Microsoft.FSharp.Core.FSharpOption`1<Boolean>, Microsoft.FSharp.Core.FSharpOption`1<Nessos.FsPickler.ITypeNameConverter>)'. at Akka.FSharp.Serialization

Activator.CreateInstance: Could not load type from assembly

蹲街弑〆低调 提交于 2019-12-08 15:58:06
问题 I'm trying to create an instance of a class implemented in a plugin .dll in my project to do type discovery. I'm receiving this exception: Could not load type 'Action' from assembly 'SquidReports.DataCollector.Plugin.BES, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. This is the exact method signature I'm using: https://msdn.microsoft.com/en-us/library/d133hta4(v=vs.110).aspx In other words, I'm attempting to spawn the object based on the Assembly name and the class name, like so:

Could not load file or assembly 'Microsoft.Practices.Unity'

筅森魡賤 提交于 2019-12-03 10:20:26
I am trying to upgrade Unity to version (2.1.505.2), but when I run the application I get the following FileLoadException Could not load file or assembly 'Microsoft.Practices.Unity, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. We are upgrading from Unity 2.0.414.0 to 2.1.505.2. All project references in the solution that refer to Unity refer to the correct version of the dll There is no Unity dll referenced in the Gac. (double checked by checking gacutil -l ) I removed all Unity dlls from the archive. Double checked with powershell PS C:\> ls

Loading an assembly targeted for .NET 4.5 on a .NET 4.0 app domain

别来无恙 提交于 2019-11-28 10:55:35
Assuming the system has .NET 4.0 and .NET 4.5 installed. Is it possible to load and work with a .NET 4.5 assembly from an assembly written targeting .NET 4.0? Simply put, can I call Assembly.Load from .NET 4.0 code to load a .NET 4.5 targeting assembly? Assuming a system as .NET 4.0 and .NET 4.5: As stated in marcgravell's blog linked by sehe 4.5 is an in-place over-the-top install on top of 4.0, in the GAC; once you have installed 4.5, 4.0 runs with the 4.5 assemblies Then calling Assembly.Load from a .NET code targeting 4.0 (compiled by a 4.0 compiler), will actually run in using the 4.5