Could Not Load File or Assembly ... the Parameter Is Incorrect

Could not load file or assembly ... The parameter is incorrect

Looks like a corrupted assembly being referenced.

Clear both:

  1. the \bin folder of your project

  2. the temp folder (should be C:\Users\your_username\AppData\Local\Temp\Temporary ASP.NET Files in windows 7)

and see if the error still happens

Could not load file or assembly or one of its dependencies

  1. Check if you are referencing an assembly which in turn referencing an old version of unity. For example let's say you have an assembly called ServiceLocator.dll which needs an old version of Unity assembly, now when you reference the ServiceLocator you should provide it with the old version of Unity, and that makes the problem.

  2. May be the output folder where all projects build their assemblies, has an old version of unity.

You can use FusLogVw to find out who is loading the old assemblies, just define a path for the log, and run your solution, then check (in FusLogvw) the first line where the Unity assembly is loaded, double click it and see the calling assembly, and here you go.

Could not load file or assembly 'EntityFramework.SqlServer' or one of its dependencies. The parameter is incorrect

Empty/Delete the 'bin' folder of your start-up project!

Clear the Temp ASP.Net files/assemblies!
See this SO answer

Generally, the location should be, the below folder.
If you are using other version of framework, then please refer to the SO link I mentioned to find details for cleaning the temp folders for various version of framework.

C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files

Could not load file or assembly 'Interop.Excel', The parameter is incorrect

Seems like you have referenced corrupted dll, try to clean the temp folder

C:\Users\your_username\AppData\Local\Temp\Temporary ASP.NET Files

AND

C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files

Could not load file or assembly 'MySql.Data' the parameter is incorrect

Try using an older version of MySql. Use the NuGet-Manager and download version 6.8.8 of MySql.Data, always worked for me.

could not load file or assembly Error after Upgrade .Net Version

there is different between last version and new
i need to improve version of this and change my import and remove old version Dll

using Excel
var ExcelApp = New Excel.Application()

to

using Microsoft.Office.Interop.Excel
var ExcelApp = New Microsoft.Office.Interop.Excel.Application()


Related Topics



Leave a reply



Submit