[英]Linq to Entities strange deploying behavior
Hi I started building apps with this technology and I am facing a weird problem... on some machines I need to add theese lines to the app.config to get to work: 嗨我开始用这种技术构建应用程序,我面临一个奇怪的问题...在某些机器上我需要将theese行添加到app.config才能开始工作:
<system.data>
<DbProviderFactories>
<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.3.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
while in other machines it runs well without theese lines.... the thing is that when I add theese lines the app wont run on machines that did not needed theese lines in the firs place, and I would like not to publish to versions of the app, is there a way to solve this? 而在其他机器上它运行良好没有theese线....事情是,当我添加theese线时,应用程序将不会在第一个地方不需要theese线的机器上运行,我不想发布到版本的该应用程序,有没有办法解决这个问题?
Any Help would be appreciated!!! 任何帮助,将不胜感激!!!
Would post as comment but i can't yet.** 会发表评论,但我还不能。**
It could be your machine.configs are different. 它可能是你的机器。配置是不同的。 I would check to make sure your DbProviderFactories are registered consistently in the machine.config.
我会检查以确保您的DbProviderFactories在machine.config中一致地注册。
Did you try removing it? 你试过删除吗?
<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.3.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.