Chciałbym bezpośrednio połączyć się z bibliotekami Dll, które są używane podczas kompilacji/runtime. Mój układ programu jest następujący: Console Exe uruchamia bibliotekę DLL winform. Ta biblioteka DLL używa wielu bibliotek dll do wykonania. Appconfig znajduje się w projekcie biblioteki winform. Na podstawie niektórych odczytów, jest winForm wyglądających na zły app.config? Zamierzam wykonać moją bibliotekę dll przy użyciu Assembly.LoadFrom();app.config dependentAssembly nie działa
stworzyłem plik app.config i dodaje następujące linie wewnątrz sekcji
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="CommonConversions"
publicKeyToken="null"
culture="neutral" />
<codeBase version="1.0.0.0"
href="file://C://BMS_ACTD//bin//DX//Globals//CommonConversions.dll"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="GlobalConstants"
publicKeyToken="null"
culture="neutral" />
<codeBase version="1.0.0.0"
href="file://C://BMS_ACTD//bin//DX//Globals//GlobalConstants.dll"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MessageInstance"
publicKeyToken="null"
culture="neutral" />
<codeBase version="1.0.0.0"
href="file://C://BMS_ACTD//bin//DX//Globals//MessageInstance.dll"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MessageInterface"
publicKeyToken="null"
culture="neutral" />
<codeBase version="1.0.0.0"
href="file://C://BMS_ACTD//bin//DX//Globals//MessageInterface.dll"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="ToolsInterface"
publicKeyToken="null"
culture="neutral" />
<codeBase version="1.0.0.0"
href="file://C://BMS_ACTD//bin//DX//Globals//ToolsInterface.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
lokalizacja jest na pewno prawidłowe. Biblioteki nie mają silnej nazwy, stąd publicKeyToken = "null". wszystkie moje wersje to 1.0.0.0. Kiedy patrzę na właściwości mojej odnośnika dll, kultura jest pusta. Czy moje też mogłoby być? Czy jest coś, co wydaje się, że robię źle?
Jaki błąd otrzymasz? – oleksii
pierwszej szansy wyjątek typu „System.IO.FileNotFoundException” w module BmsReplayAnalysis.dll pierwszej szansy wyjątek typu „System.TypeInitializationException” w module BmsReplayAnalysis.dll nie można załadować pliku lub taśmowej MessageInterface = 1.0, wersja .0.0, Culture = neurtral, PublicKeyToken = null 'lub jedna z jego zależności. System nie może znaleźć pliku określonego – Jason
Czy możesz dodać swoje wyjaśnienie do pytania? –