Unable to connect to database. xxx.db.ConnectionException: DBServer::GetConnection: mscorlib: Could not load file or assembly 'Sybase.AdoNet4.AseClient, Version=4.157.1300.0, Culture=neutral' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040): at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at
我在bin文件夹中使用新的64位dll时出现上述错误。你能否从堆栈跟踪建议可能是什么错误?
答案 0 :(得分:0)
堆栈跟踪中最重要的消息是行:
public ArrayList<String> vyberNahodnaPismena() {
String[] seznamPismen = {"A", "Á", "B", "C", "Č", "D", "Ď", "E", "Ě", "É", "F", "G", "H", "I", "Í", "J", "K", "L", "M", "N", "O", "Ó", "P", "Q", "R", "Ř", "S", "Š", "T", "Ť", "U", "Ú", "Ů", "V", "W", "X", "Y", "Ý", "Z", "Ž"};
ArrayList<String> nahodnaPismena = new ArrayList<String>(Arrays.asList(seznamPismen));
ArrayList<String> pismena = new ArrayList<String>();
pismena.addAll(rozlozSlovoNaPismena(ziskejHadanku(ziskejAktualniCisloHadanky())));
Random nahodneCislo = new Random();
// value of pismena.size() is 5 for now
for(int i = 0; i < (44 - pismena.size()); i++) {
pismena.add(nahodnaPismena.get(nahodneCislo.nextInt(nahodnaPismena.size())));
System.out.println("i:"+i);
}
long seed = System.nanoTime();
Collections.shuffle(pismena, new Random(seed));
System.out.println("size"+pismena.size());
return pismena;
}
这表明问题可能与程序集引用不匹配。您应该执行以下操作来解决此问题:
The located assembly's manifest definition does not match the assembly reference.
文件夹的程序集和任何pdb(如果已添加)。如果嵌套在子目录中/bin
文件夹中的任何位置,请务必删除旧的.dll
。/bin
或web.config
,看看是否有任何可能包含旧版本信息的引用。