내 ASP.NET MVC 4 앱이 IIS 및 IEExpress 환경에서 완벽하게 실행되고 있습니다. 불행히도 EntityFramework의 여러 버전에 문제가있는 것으로 보입니다. EF 4.1.0.0에 대한 모든 참조는 double 및 tripple로 확인됩니다. 모두 지금 EF 4.3.0.0에 대해 서명하지 않습니다. 시스템이 4.1.0.0에 대한 참조를 갖고 있으며 찾으려하는 것 같습니다. 성공하지 못했습니다.Azure가 EntityFramework에 대한 참조를 찾을 수 없습니다.
관련된 모든 외부 libs와 "= 지역 등본"
Microsoft.WindowsAzure.ServiceRuntime Critical: 201 : Role entrypoint could not be created:
System.TypeLoadException: Unable to load the role entry point due to the following exceptions:
-- System.IO.FileLoadException: Die Datei oder Assembly "EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)
Dateiname: "EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
=== Zustandsinformationen vor Bindung ===
LOG: Benutzer = COREI7\markus
LOG: DisplayName = EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
(Fully-specified)
LOG: Appbase = file:///D:/Dev/TFS/BettrFit/BettrFit.Azure/csx/Debug/roles/BettrFit/approot/bin
LOG: Ursprünglicher PrivatePath = D:\Dev\TFS\BettrFit\BettrFit.Azure\csx\Debug\roles\BettrFit\approot\bin
Aufruf von Assembly : System.Web.Http.Data.EntityFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: Diese Bindung startet im default-Load-Kontext.
LOG: Es wurde keine Anwendungskonfigurationsdatei gefunden.
LOG: Die Hostkonfigurationsdatei wird verwendet:
LOG: Die Computerkonfigurationsdatei von C:\Windows\Microsoft.NET\Framework64\v4.0.30319 \config\machine.config wird verwendet.
LOG: Verweis nach der Richtlinie: EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
LOG: Download von neuem URL file:///D:/Dev/TFS/BettrFit/BettrFit.Azure/csx/Debug/roles/BettrFit/approot/bin/EntityFramework.DLL.
WRN: Der Vergleich des Assemblynamens führte zum Konflikt: Nebenversion.
ERR: Das Setup der Assembly konnte nicht abgeschlossen werden (hr = 0x80131040). Die Suche wurde beendet.
---> System.Reflection.ReflectionTypeLoadException: Mindestens ein Typ in der Assembly kann nicht geladen werden. Rufen Sie die LoaderExceptions-Eigenschaft ab, wenn Sie weitere Informationen benötigen.
bei System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
bei System.Reflection.RuntimeModule.GetTypes()
bei System.Reflection.Assembly.GetTypes()
bei Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetRoleEntryPoint(Assembly entryPointAssembly)
--- Ende der internen Ausnahmestapelüberwachung ---
bei Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetRoleEntryPoint(Assembly entryPointAssembly)
bei Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.CreateRoleEntryPoint(RoleType roleTypeEnum)
bei Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum)
Das Programm "[2372] WaIISHost.exe: Verwaltet (v4.0.30319)" wurde mit Code -1 (0xffffffff) beendet.
너희들이이 문제를 해결하는 방법에 대한 몇 가지 힌트를 줄 수있는 희망으로 표시됩니다.
Assembly a = System.Reflection.Assembly.Load("System.Web.Http.Data.EntityFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
foreach (AssemblyName i in a.GetReferencedAssemblies())
{
Trace.TraceInformation("Ref Assemblies:" + i.Name+" "+i.Version);
}
그것의 기본으로 EntityFramework 4.1.0.0에 따라 보여줍니다 :
은 내가 Data.EntityFramework 어셈블리를 조사 하였다. 어떻게 변경할 수 있습니까? Web.Config가로드 할 때 사용되지 않는 것 같습니다. 여기에서 이미 리 바인딩을 시도했습니다.
로컬 어셈블리 캐시에 설치되어 있고 Azure에 누락 된 간접 참조도 확인 했습니까? http://stackoverflow.com/a/10142356/468244 + 의견을 확인하십시오. –
나는 GACViewer로 확인했다 - 지금까지 운이 없다. System.Web.Http.Entityframework가 문제의 원인이 될 수 있습니다. 하지만 lib가 참조하는 버전을 확인하는 방법을 알지 못합니다. 로그에 Calling Assembly라는 이름이 지정됩니다. 패키지와 함께 배포되는 "새로운"버전을 사용하도록 어떻게 구성 할 수 있습니까? – Obiwan007