您现在的位置是:主页 > news > 漯河市住房和城乡建设委员会网站/各种手艺培训班

漯河市住房和城乡建设委员会网站/各种手艺培训班

admin2025/6/1 8:09:47news

简介漯河市住房和城乡建设委员会网站,各种手艺培训班,温江建设局备案网站,和动物做的网站吗1.OverView 一般程式只會查找與主程式同目錄的DLL檔案 解決方案主要可以參考這篇:http://support.microsoft.com/kb/837908 2.實作app.config方式 這種方式我們需要DLL的「publicKeyToken」和「version」屬性 此時可以運作一下製作好的程式,當找不到DLL的…

漯河市住房和城乡建设委员会网站,各种手艺培训班,温江建设局备案网站,和动物做的网站吗1.OverView 一般程式只會查找與主程式同目錄的DLL檔案 解決方案主要可以參考這篇:http://support.microsoft.com/kb/837908 2.實作app.config方式 這種方式我們需要DLL的「publicKeyToken」和「version」屬性 此時可以運作一下製作好的程式,當找不到DLL的…

1.OverView

一般程式只會查找與主程式同目錄的DLL檔案

解決方案主要可以參考這篇:http://support.microsoft.com/kb/837908

 

2.實作app.config方式

這種方式我們需要DLL的「publicKeyToken」和「version」屬性

此時可以運作一下製作好的程式,當找不到DLL的時候會報以下錯誤:

從這當中可以找到這兩個屬性

接著在app.config加入以下code就可以了!(<runtime/>裡面的Code)

<?xml version="1.0"?>
<configuration><startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup><runtime><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="DocumentFormat.OpenXml"  culture="neutral" publicKeyToken="31bf3856ad364e35"/><codeBase version="2.0.5022.0" href="FILE://C:/LotLibrary/DocumentFormat.OpenXml.dll"/></dependentAssembly></assemblyBinding></runtime>
</configuration>

PS.調用的DLL原檔如下

转载于:https://www.cnblogs.com/Ren-Chen/p/3457269.html