Reputation: 17026
I have downloaded and installed MySql Connector for .NET 6.10.7.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="assemblies" type="Simple.Framework.AssembliesConfigurationSection, Simple.Framework"/>
</configSections>
<connectionStrings>
<add name="PTSystemMySql"
connectionString="Data Source=localhost;Database=PrescriptionTrackingSystem;User ID=root;Password=xyz;"
providerName="MySql.Data.MySqlClient" />
</connectionStrings>
</configuration>
But, I have two problems:
MySql.Data.dll
isn't showing up in the Visual Studio reference manager:MySql.Data.dll
:But, I am still getting an error:
An unhandled exception of type 'System.Configuration.ConfigurationErrorsException'
occurred in System.Data.dll
Additional information: Failed to find or load the registered .Net Framework
Data Provider.`
Note. I am 100% sure that there is no problem with the source code. Coz, the source code is fully functional in case of MS Access and MS SQL Server.
Upvotes: 1
Views: 1530
Reputation: 46
You seem to use an old version of .NET (your screenshot shown "Targeting: .NET Framework 2.0").
According to the documentation, connector version 6.10.7 required .Net 4.5.2 at least.
Upvotes: 3