2010-07-28 11 views
6

में काम नहीं कर रहा है परीक्षण प्रोजेक्ट के app.config में बाध्यकारी रीडायरेक्ट लागू करते समय। क्रम रीडायरेक्ट आदेश का पालन करने के लिए मना कर दिया औरबाध्यकारी रीडायरेक्ट परीक्षण प्रोजेक्ट

<runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
    <dependentAssembly> 
     <assemblyIdentity name="Msdcc.Common" publicKeyToken="9d9c15280f7f1425"/> 
     <bindingRedirect oldVersion="0.0.0.0-2.4.0.0" newVersion="2.4.0.0"/> 
    </dependentAssembly> 
    </assemblyBinding> 
</runtime> 

अच्छी तरह से मैं के बारे में डिफ़ॉल्ट नाम स्थान (एक बहुत बुद्धिमान व्यक्ति से) समस्याएं पैदा कर तो मैं कहा, "xmlns =" ​​सुना था विधानसभा के पुराने संस्करण के लिए खोज रहती है urn: schemas-microsoft-com: asm.v1 " परीक्षण केस चलाने की कोशिश की गई अभी भी कोई नहीं है। खोला गया फ़्यूज़न लॉग व्यूअर ने समस्या की जांच की और आश्चर्य की आश्चर्य है कि पुराने डेल की तलाश तक यह है। वास्तव में सहायक संदेश नीचे दिए गए नीचे http://msdn.microsoft.com/en-us/magazine/dd727509.aspx

*** Assembly Binder Log Entry (28/07/2010 @ 18:59:36) *** 

The operation failed. 
Bind result: hr = 0x80131040. No description available. 

Assembly manager loaded from: C:\WINNT\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll 
Running under executable C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe 
--- A detailed error log follows. 

=== Pre-bind state information === 
LOG: User = BELGACOM\id820374 
LOG: DisplayName = Msdcc.Common, Version=2.2.0.0, Culture=neutral, PublicKeyToken=9d9c15280f7f1425 
(Fully-specified) 
LOG: Appbase = file:///c:/data/source/explorev1/explore.root/explore/euc.explore.domainobjectstest/bin/debug 
LOG: Initial PrivatePath = NULL 
LOG: Dynamic Base = NULL 
LOG: Cache Base = NULL 
LOG: AppName = NULL 
Calling assembly : (Unknown). 
=== 
LOG: This is an inspection only bind. 
LOG: Using application configuration file: c:\data\source\explorev1\explore.root\explore\euc.explore.domainobjectstest\bin\debug\euc.explore.domainobjectstest.dll.config 
LOG: Using machine configuration file from C:\WINNT\Microsoft.NET\Framework\v2.0.50727\config\machine.config. 
LOG: GAC Lookup was unsuccessful. 
LOG: Attempting download of new URL file:///c:/data/source/explorev1/explore.root/explore/euc.explore.domainobjectstest/bin/debug/Msdcc.Common.DLL. 
LOG: Assembly download was successful. Attempting setup of file: c:\data\source\explorev1\explore.root\explore\euc.explore.domainobjectstest\bin\debug\Msdcc.Common.dll 
LOG: Entering run-from-source setup phase. 
LOG: Assembly Name is: Msdcc.Common, Version=2.4.0.0, Culture=neutral, PublicKeyToken=9d9c15280f7f1425 
WRN: Comparing the assembly name resulted in the mismatch: Minor Version 
ERR: The assembly reference did not match the assembly definition found. 
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated. 
का उपयोग करके नीचे दिया गया था

मेरे हालांकि प्रक्रिया

यह मिल गया मुझे सोच क्यों करता है, तो लिंक मेरी कॉन्फ़िग फ़ाइल में मौजूद है यह अभी भी विधानसभा पुनर्निर्देशन नहीं करता है।

तो नौसिखिया कि मैं अभी फैसला कर रहा हूं कि मैं वही करूँगा जो बूढ़े आदमी ने मुझे करने के लिए कहा था और कॉन्फ़िगरेशन तत्व से नेमस्पेस घोषणा को हटा दिया था और यह प्रतिष्ठा काम करता था। xmlns = "http://schemas.microsoft.com/.NetConfiguration/v2.0"

मेरेप्रश्न यह बहुत लम्बी कहानी के बाद ही साथ गड़बड़ करने के लिए माना जाता है मैं क्या नाम स्थान घोषणाओं को समझने से है Intellisense क्यों असेंबली बाध्यकारी के साथ चारों ओर घूम रहा है ???

+0

आप क्या वी.एस. प्रयोग करते हैं? –

+0

क्षमा करें लुकास वास्तव में देर से उत्तर के लिए बनाम बनाम 2008 एसपी 1 है। –

+0

क्या आपको इस मुद्दे के लिए कोई समाधान मिला ...? – Syska

उत्तर

3

डिज़ाइन द्वारा प्रतिबिंब लोड संदर्भ में एक असेंबली लोड करना प्रकाशक नीति और बाध्यकारी पुनर्निर्देशन नीति को अनदेखा करता है। Junfeng Zhang examines why this is in his excellent blog.

ऐसा ही एक सवाल यहाँ कहा जाता है: Is it possible to use Assembly.ReflectionOnlyLoad together with publisher policies/assembly versioning?

संबंधित मुद्दे