Ormlite for MySql looking for wrong version - mysql

We've got a project using Ormlite.MySql built for .NET 4.0.
Ormlite and its dependencies are loaded via NuGet (it's ServiceStack.Ormlite.MySql 3.9.54), including MySql.Data 6.6.5.
When we try to run the code, however, we get a dependency error:
Could not load file or assembly 'MySql.Data, Version=6.6.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
The ServiceStack.OrmLite.MySql package in NuGet lists MySql.Data as a dependency, but doesn't list any specific version. In reflector, I can see that ServiceStack.OrmLite.MySql.dll is, in fact, referencing 6.6.4.0 of MySql.Data.dll.
Has anyone encountered this issue? I hate to hack the config file to redirect assmbly binding in general (always feels like a kludge).

I've just encountered the same problem. I solved it by downloading the Mysql.data.dll version 6.6.4.0 from servicestack on github: https://github.com/ServiceStack/ServiceStack.OrmLite/blob/master/lib/MySql.Data.dll

I had the same error. Just install with nuget : Mysql.data (it work for me)
nuget install the right version : "6.6.4"
(you could verify the version number in the nuget description)

Related

'Could not get dependencies for project reference' when include Connector/Net from Mysql

When complie my solution get the error 'Could not get dependencies for project reference' if include the MySql.Data.dll but the reference and the file are included.
Finally found the solution.
Is important verify the version supported. I used the version 6.10.6 connector and my project is in 4.5, only changed a the version of framework 4.5.2 and all is fine.
Here the Connector/Net Requirements
https://dev.mysql.com/doc/connector-net/en/connector-net-versions.html

Could not load file or assembly "MySQL.ConnectorInstaller"

In Visual Studio 2017, I'm trying to use the MySQL Web Configuration Tool, I get the following error:
Could not load file or assembly "MySQL.ConnectorInstaller,
Version=6.10.4.0 Culture=neutral, PublicKeyToken=c5687fc88969c44d' or
one of its dependencies. The system cannot find the file specified.
I have connector/net 6.10.4, MySQL for Visual Studio 2.0.5, MySql.Data 6.10.4, MqSql.Data.Entity 6.10.4, and MySql.Web 6.10.4 installed.
Can't find where to get MySQL.ConnectorInstaller (dll i presume).
Seems like 6.10.4 doesn't install the .dlls correctly. I downgraded back to 6.9.10 (via NuGet) and those work fine.

Google Adsense DotNet API 1.4 Cannot resolve reference assemblies

It is a windows phone project and it was working fine until I taught to implement the Payment Reports in it and upgraded to the 1.4 now I added the reference using the nuget package found here http://www.nuget.org/packages/Google.Apis.AdSense.v1_4/ chnaged the v1_3 to v1_4 and now I keep getting this error.
Error 1 Cannot resolve reference assemblies. Please check the reference assemblies. Cannot resolve dependency to assembly 'Google.Apis, Version=1.7.0.24060, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
I tried uninstalling the Nuget Package from the Nuget Manager completely and then Installed v1_3 again but now even this has stopped working...please can you tell me where did I go wrong?? and how to fix this issue now...

How to resolve Microsoft SQL geography type dependency on AppHarbor

I am trying to deploy my web service on AppHarbor through GitHub. My web service is using NHibernate.Spatial, which has Microsoft.SQLServer.Types version 10.0.0.0 as a dependency. This assembly is, if I understand correctly, installed along with SQL Server 2008. When I run my web service on my development computer, on which I have SQL Server 2008 installed, the service runs without trouble, but when I deploy to AppHarbor I get the following exception:
"Could not load file or assembly 'Microsoft.SqlServer.Types,
Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or
one of its dependencies. The system cannot find the file specified."
As I already build my own version of NHibernate.Spatial.MsSql2008, the assembly from which the dependency derives, I have simply tried copying the required dll into the bin folder when building this project, by setting the reference property Copy Local to true. This is also reflected in the web service bin folder which is pulled by AppHarbor through Git. This didn't help though and my guess is that my web service is looking for the dependency in a different folder than bin.
How do I make the Microsoft.SqlServer.Types assembly available on AppHarbor? As the exception states, this might also be caused by possible missing dependencies of Microsoft.SqlServer.Types, but how do I find if this is the case, and again, how do I make the dependencies of Microsoft.SqlServer.Types available on AppHarbor?
Here's a NuGet package with the Microsoft.SqlServer.Types assembly. You can use this in combination with NuGet package restore on AppHarbor.

FluentValidation - assembly's manifest definition does not match the assembly reference

After adding the latest version of FluentValidation.MVC3 to a NopCommerce aplication i am receiving the following error,
[Exception: Could not load file or assembly 'FluentValidation,
Version=3.2.0.0,Culture=neutral, PublicKeyToken=a82054b837897c66' or one
of its dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)
]
Nop.Core.Plugins.PluginManager.Initialize()
in C:\Nop 2.2 Source -Copy\just4fashion2.2source\Libraries\Nop.Core\
Plugins\PluginManager.cs:144
I think this is due to the project referencing an older version of the fluent validation dll
but im not sure how to fix this, is there a way to pinpoint the error further?
Any advice you can offer will be much appreciated.
You might find this post helpful on how to track down dependencies in your application. I think you're absolutely right that either your project or a dependency your project is taking references an older version of FluentValidation.
Another thought is if you add the dependency to FluentValidation.MVC3 via NuGet, NuGet tends to place assembly binding redirects in the web.config. This will tell any assemblies with a hard dependency on an older version of an assembly to "redirect" to the latest version.