मैं सीधे डीएलएस से लिंक करना चाहता हूं जो संकलन/रनटाइम पर उपयोग किए जाते हैं। मेरा प्रोग्राम लेआउट यह है: कंसोल एक्स ने एक Winform डीएल लॉन्च किया। वह डीएल प्रदर्शन करने के लिए डीएलएस का एक समूह का उपयोग करता है। Appconfig Winform डीएल की परियोजना में स्थित है। कुछ पढ़ने के आधार पर, Winform dll गलत app.config की तलाश में है? मैं असेंबली का उपयोग कर अपने डीएल निष्पादित करने का इरादा रख रहा हूं। लोडफ्रॉम();app.config dependentAssembly काम नहीं कर रहे
मैं एक app.config फ़ाइल बनाया है और अनुभाग
<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>
स्थान निश्चित रूप से सही है अंदर निम्नलिखित लाइनों गयी। डीएलएस का दृढ़ता से नाम नहीं दिया जाता है, इसलिए publicKeyToken = "null"। मेरे सभी संस्करण 1.0.0.0 हैं। जब मैं अपने संदर्भित डीएल के गुणों को देखता हूं, तो संस्कृति खाली होती है। क्या मेरा भी होना चाहिए? क्या ऐसा कुछ भी है जो ऐसा प्रतीत होता है कि मैं गलत कर रहा हूं?
आपने क्या त्रुटि मिलता है? – oleksii
प्रकार 'System.IO.FileNotFoundException' का एक पहला मौका अपवाद BmsReplayAnalysis.dll में हुई प्रकार 'System.TypeInitializationException' का एक पहला मौका अपवाद BmsReplayAnalysis.dll में हुई लोड नहीं कर सका फ़ाइल या विधानसभा 'MessageInterface, संस्करण = 1.0 .0.0, संस्कृति = तटस्थ, PublicKeyToken = शून्य 'या इसकी निर्भरताओं में से एक। सिस्टम – Jason
निर्दिष्ट फ़ाइल नहीं ढूंढ सकता है क्या आप प्रश्न में अपनी स्पष्टीकरण जोड़ सकते हैं? –