2013-02-21 31 views
5

मैं 5.0.5.0त्रुटि

को 4.0.0.0 से मेरे एंटरप्राइज़ लाइब्रेरी upgarde की कोशिश की है मुझे पता था कि सुरक्षित रास्ता नहीं था NuGet का उपयोग कर।

मैं इसे इस्तेमाल किया है, लेकिन इस त्रुटि मिलती है:

An error occurred creating the configuration section handler for cachingConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.505.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Configuration Error 




Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.  




Parser Error Message: An error occurred creating the configuration section handler for cachingConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.505.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) 




Source Error:  








Line 8:      <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 
Line 9:      <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.505.0, Culture=neutral, PublicKeyToken=null" /> 
Line 10:     <section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.505.0, Culture=neutral, PublicKeyToken=null" /> 
Line 11:     <section name="instrumentationConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.Configuration.InstrumentationConfigurationSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.505.0, Culture=neutral, PublicKeyToken=null" /> 
Line 12:     <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> 




Source File: D:\MaM\Server\ClientServices\Dev\ClientService 1.5\Conduit.Mam.ClientService.Service\web.config    Line: 10  




Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.505.0, Culture=neutral, PublicKeyToken=null' could not be loaded. 








=== Pre-bind state information === 
LOG: User = CONDUIT-IL\elad.bendavid 
LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.505.0, Culture=neutral, PublicKeyToken=null 
 (Fully-specified) 
LOG: Appbase = file:///D:/MaM/Server/ClientServices/Dev/ClientService 1.5/Conduit.Mam.ClientService.Service/ 
LOG: Initial PrivatePath = D:\MaM\Server\ClientServices\Dev\ClientService 1.5\Conduit.Mam.ClientService.Service\bin 
Calling assembly : (Unknown). 
=== 
LOG: This bind starts in default load context. 
LOG: Using application configuration file: D:\MaM\Server\ClientServices\Dev\ClientService 1.5\Conduit.Mam.ClientService.Service\web.config 
LOG: Using host configuration file:  
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. 
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). 
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/fb9f9038/ea6afb52/Microsoft.Practices.EnterpriseLibrary.Caching.DLL. 
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/fb9f9038/ea6afb52/Microsoft.Practices.EnterpriseLibrary.Caching/Microsoft.Practices.EnterpriseLibrary.Caching.DLL. 
LOG: Attempting download of new URL file:///D:/MaM/Server/ClientServices/Dev/ClientService 1.5/Conduit.Mam.ClientService.Service/bin/Microsoft.Practices.EnterpriseLibrary.Caching.DLL. 
WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN 
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated. 

मेरी web.config:

मैं NuGet के साथ देखने के लिए कोशिश की है, क्या dll क्या dll के साथ निर्भर है।

मैं सत्यापित और सही संस्करणों के साथ DLLs के सभी refrenced कर रहे हैं (NuGet द्वारा स्थापित)

मैं DependenciesWallker कोशिश की, लेकिन नहीं समझ सकता है क्या याद आ रही है।

+0

क्या आपने fuslogvw.exe द्वारा उत्पन्न लॉग को देखा है? यह आपको सटीक असेंबली के आसपास अधिक जानकारी प्रदान करेगा जो लोड करने में विफल रहा है। (http://msdn.microsoft.com/en-us/library/e74a18c4(v=VS.100).aspx) – Jomit

+0

DLL के PublicKeyToken और आपके web.config में उल्लेखित एक को भी दो बार जांचें। (माइक्रोसॉफ्ट.प्रैक्टिस.इंटरपीर लाइब्रेरी.कैचिंग, वर्जन = 5.0.505.0, संस्कृति = तटस्थ, पब्लिककेट टोकन = 31bf3856ad364e35) – Jomit

+0

@ जॉमिट अगर मैं अपने web.config में सभी PublicKeyToken = null डालता हूं, तो क्या यह काम करना चाहिए? –

उत्तर

4

आपको असेंबली के साथ हस्ताक्षरित वास्तविक सार्वजनिक कुंजी का उपयोग करने की आवश्यकता है। बस न्यूल डालने से आपको एक मेल नहीं मिलेगा और लोड करने में विफलता होगी।

+0

धन्यवाद आपको एक हजार बार! – Pascamel

0

कृपया परियोजना में फिर से ADO.NET इकाई मॉडल फ़ाइल जोड़ें। मौजूदा एक को हटाएं नहीं। आप प्रोजेक्ट में सिर्फ एक और .edmx फ़ाइल बनाते हैं। यह प्रोजेक्ट में नई 5.0 संस्करण डीएलएल फाइलों का संदर्भ देगा और कोड को कॉन्फ़िगरेशन फ़ाइल में भी जोड़ देगा। फ़ाइल जोड़ने के बाद आप प्रोजेक्ट से फ़ाइल को हटा सकते हैं। यह केवल परियोजना में नव निर्मित संदर्भ जोड़ने के लिए है। इसे आज़माएं यह काम करेगा ....

1

मुझे इस अपवाद का भी सामना करना पड़ा। Web.config में configSections अनुभाग को बाहर करता है 4.0 फ्रेमवर्क का संदर्भ दे रहा था। इस खंड को बदलने के लिए इसे मेरे लिए हल किया गया:

<configuration> 
    <configSections> 
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />