I have an App.config where I would like to replace the provider specified in machine.config with a different version of the provider. I have tried removing the provider by name with remove
and have now tried removing them all with clear
.
This seems to have no effect: The connection string is still loading the provider specified in machine.config
. For example, when use the configuration below, I expect the application not to find my provider.
<system.data>
<DbProviderFactories>
<clear />
</system.data>
Further, specifying a different name or trying to override the same name; also has no effect.
<system.data>
<DbProviderFactories>
<clear />
<add name="MySQL Data Provider" invariant="testprovider" description=".Net Framework Data Provider for MySQL"
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.3.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
</DbProviderFactories>
</system.data>