我目前正试图运行一个C#程序,该程序是在Windows CE v6.0机器上使用Microsoft Visual C#2005创建的这是一个条形码扫描仪/掌上电脑是一个控制台程序,但是当我运行程序时,我发现了错误:。获取错误“文件或程序集名称”MySql.Data,版本= 6.7.4.0 ...'
File or assembly name 'MySql.Data,Version=6.7.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D' , or one of its dependencies was not found.
纵观细节,它是一个TypeLoadException
app.manifest
档案: 210
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<applicationRequestMinimum>
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
</security>
</trustInfo>
<system.data>
<DbProviderFactories>
<remove name="MySQL Data Provider" />
<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.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
</asmv1:assembly>
编辑 如果上述错误没有出现,其他类似的一个显示出来:
File or assembly name 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089', or one of its dependencies, was not found.
那么您是否在相同的目录或GAC中有相关的程序集? –