mysql - Visual Studio 设置文件损坏/MySQL 连接问题

标签 mysql visual-studio visual-studio-2012 web-config app-config

我的 Visual Studio 2012 Professional 在使用三项目解决方案时遇到问题。 我整天都在努力处理 LinqToMySQL.edmx 文件,并让 MySQL 数据连接选项出现在服务器资源管理器中。 为此,我尝试安装 EFTools6.1.0ForVS2012。我试过的mysql连接器是mysql-connector-net-6.7.4。这在某一点上有效,但 MySQL dll 版本的其他问题意味着我回到原点(当我从 nuGet 6.8.3 获得最新版本的 DLL 时,它仍在寻找 6.7.4)。从那以后我得到了 6.7.4 并为所有项目添加了对 dll 的引用。我也试过编辑 machine.config 来寻找正确的 mysql 数据提供者。仍然没有快乐。

但是现在...

对于每个解决方案,在尝试访问“属性”>“设置”时无法读取 app.config 或 web.config 文件。

An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML

在 XML 验证器下检查时,所有文件似乎都是有效的。

在 VS2012 中打开项目时出现错误:

Microsoft Visual Studio The ProviderPackage package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file t:\Users\John\AppData\Roaming\Microsoft\VisualStudio\11.0\A ctivityLog.xml.

当尝试创建一个新项目时,我得到:

Failed to create a 'ImageSource' from the text '..\lmages\Medium.png'.

重新安装 Visual Studio 后问题仍然存在。 在事件日志中,最后的错误是:

    <entry>
    <record>235</record>
    <time>2014/03/25 10:28:31.202</time>
    <type>Warning</type>
    <source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
    <description>The catalog cache file is not up-to-date and has to be regenerated:</description>
    <path>C:\Users\John\AppData\Local\Microsoft\VisualStudio\11.0\ComponentModelCache\Microsoft.VisualStudio.Default.cache</path>
  </entry>
<entry>
    <record>236</record>
    <time>2014/03/25 10:28:31.211</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [Visual Studio Component Model Host Package]</description>
    <guid>{49D12072-378B-4FFA-A09E-40E0B5D097CC}</guid>
    <hr>80131902</hr>
    <errorinfo>Configuration system failed to initialize</errorinfo>
  </entry>
 <entry>
    <record>237</record>
    <time>2014/03/25 10:28:31.241</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [Visual Studio Component Model Host Package]</description>
    <guid>{49D12072-378B-4FFA-A09E-40E0B5D097CC}</guid>
    <hr>80131902</hr>
    <errorinfo>Configuration system failed to initialize</errorinfo>
  </entry>

最佳答案

看起来这些错误中的大部分是由框架文件夹中的 ma​​chine.config 文件中格式错误的 XML 引起的。 framework64 中的 ma​​chine.config 文件很好,这一定让我感到困惑。这就是使用记事本进行编辑的好处! mysql 连接器仍有问题,但这是一个单独的问题。

关于mysql - Visual Studio 设置文件损坏/MySQL 连接问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22616297/

相关文章:

c# - 安装 Visual Studio 11 beta 后,不再通过 Visual Studio 2010 执行测试

c++ - 在非 Debug模式下运行代码时出现问题

mysql - 值(value)不断重复

MySQL - 嵌套结果连接

php - 运行 PHP 脚本最快的方法是什么

visual-studio - Visual Studio 2010 测试 Controller 负载测试数据库配置失败?

c++ - 将 ListBox 复制到剪贴板,返回不保存的载体

visual-studio - Visual Studio 错误 : The "GenerateResource" task failed unexpectedly

c# - 添加到包含其他项目的 VS 解决方案后无法访问 IIS 上的项目

mysql - 如何使用查询删除数据库中某个单词后的文本?