Run migrate.exe without installed dataprovider
up vote
0
down vote
favorite
I am trying to run migrate.exe to update my database without installing the mysql ADO.NET DataProvider.
- I copied the
migrate.exe
to the directory containing my app, theentityframework.dll
and themysql.data.dll (Version 6.9.9.0)
- I added a migrate.config file with the content
migrate.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<!--<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />-->
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.9.9.0" newVersion="6.9.9.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Now I want to run the following command
migrate.exe MyApp.Core ^
/connectionString="Server=...;database=myapp;Port=3306;Uid=root;Pwd=pwd" ^
/connectionProviderName="MySql.Data.MySqlClient"
and get the error
ERROR: The ADO.NET provider with invariant name 'MySql.Data.MySqlClient'
is either not registered in the machine or application config file,
or could not be loaded. See the inner exception for details.
According to this stackoverflow post this should work. Am I missing something?
mysql entity-framework ado.net entity-framework-migrations
add a comment |
up vote
0
down vote
favorite
I am trying to run migrate.exe to update my database without installing the mysql ADO.NET DataProvider.
- I copied the
migrate.exe
to the directory containing my app, theentityframework.dll
and themysql.data.dll (Version 6.9.9.0)
- I added a migrate.config file with the content
migrate.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<!--<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />-->
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.9.9.0" newVersion="6.9.9.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Now I want to run the following command
migrate.exe MyApp.Core ^
/connectionString="Server=...;database=myapp;Port=3306;Uid=root;Pwd=pwd" ^
/connectionProviderName="MySql.Data.MySqlClient"
and get the error
ERROR: The ADO.NET provider with invariant name 'MySql.Data.MySqlClient'
is either not registered in the machine or application config file,
or could not be loaded. See the inner exception for details.
According to this stackoverflow post this should work. Am I missing something?
mysql entity-framework ado.net entity-framework-migrations
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to run migrate.exe to update my database without installing the mysql ADO.NET DataProvider.
- I copied the
migrate.exe
to the directory containing my app, theentityframework.dll
and themysql.data.dll (Version 6.9.9.0)
- I added a migrate.config file with the content
migrate.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<!--<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />-->
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.9.9.0" newVersion="6.9.9.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Now I want to run the following command
migrate.exe MyApp.Core ^
/connectionString="Server=...;database=myapp;Port=3306;Uid=root;Pwd=pwd" ^
/connectionProviderName="MySql.Data.MySqlClient"
and get the error
ERROR: The ADO.NET provider with invariant name 'MySql.Data.MySqlClient'
is either not registered in the machine or application config file,
or could not be loaded. See the inner exception for details.
According to this stackoverflow post this should work. Am I missing something?
mysql entity-framework ado.net entity-framework-migrations
I am trying to run migrate.exe to update my database without installing the mysql ADO.NET DataProvider.
- I copied the
migrate.exe
to the directory containing my app, theentityframework.dll
and themysql.data.dll (Version 6.9.9.0)
- I added a migrate.config file with the content
migrate.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<!--<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />-->
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.9.9.0" newVersion="6.9.9.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Now I want to run the following command
migrate.exe MyApp.Core ^
/connectionString="Server=...;database=myapp;Port=3306;Uid=root;Pwd=pwd" ^
/connectionProviderName="MySql.Data.MySqlClient"
and get the error
ERROR: The ADO.NET provider with invariant name 'MySql.Data.MySqlClient'
is either not registered in the machine or application config file,
or could not be loaded. See the inner exception for details.
According to this stackoverflow post this should work. Am I missing something?
mysql entity-framework ado.net entity-framework-migrations
mysql entity-framework ado.net entity-framework-migrations
asked Nov 8 at 15:09
Jürgen Steinblock
18.5k1481147
18.5k1481147
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53210564%2frun-migrate-exe-without-installed-dataprovider%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown