EF / Odata Nuget升级后,Azure辅助角色将被抛出

时间:2014-03-29 20:11:40

标签: entity-framework azure clr nuget reflection.emit

拥有一个包含Web和辅助角色的Azure项目。 最近升级了所有nuget包(EF从6.0到6.1除外)。 网络角色似乎很好 工人角色无法做多少。继续从框架代码中获得各种异常:

类型' System.ArgumentException'的例外情况发生在mscorlib.dll中,并且未在托管/本地边界之前处理

其他信息:程序集中的重复类型名称。

未处理的类型' System.Reflection.TargetInvocationException'发生在EntityFramework.SqlServer.dll

类型&#39; System.Reflection.TargetInvocationException&#39;的第一次机会异常。发生在mscorlib.dll中 Microsoft.WindowsAzure.ServiceRuntime详细:502:类型&#39; System.Reflection.TargetInvocationException&#39;的第一次机会异常。发生在EntityFramework.dll中 角色实例状态检查成功:准备就绪 类型&#39; System.Reflection.TargetInvocationException&#39;的第一次机会异常。发生在EntityFramework.SqlServer.dll中 Microsoft.WindowsAzure.ServiceRuntime严重:1:未处理的异常: System.Reflection.TargetInvocationException:调用目标抛出了异常。 ---&GT; System.ArgumentException:程序集中的重复类型名称。    在System.Reflection.Emit.ModuleBuilder.CheckTypeNameConflict(String strTypeName,Type enclosingType)    在System.Reflection.Emit.AssemblyBuilderData.CheckTypeNameConflict(String strTypeName,TypeBuilder enclosingType)    在System.Reflection.Emit.TypeBuilder.Init(String fullname,TypeAttributes attr,Type parent,Type [] interfaces,ModuleBuilder module,PackingSize iPackingSize,Int32 iTypeSize,TypeBuilder enclosingType)    在System.Reflection.Emit.ModuleBuilder.DefineType(String name,TypeAttributes attr,Type parent,Type [] interfaces)    在System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.get_TypeBuilder()    在System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.CreateType(ModuleBuilder moduleBuilder)    在System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.BuildType(ModuleBuilder moduleBuilder,ClrEntityType ospace EntityType,MetadataWorkspace workspace)    at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.TryCreateProxyType(EntityType ospace EntityType,MetadataWorkspace workspace)    在System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.GetProxyType(ClrEntityType ospace EntityType,MetadataWorkspace工作区)    在System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(EntityColumnMap columnMap,TranslatorArg arg)    at System.Data.Entity.Core.Query.InternalTrees.EntityColumnMap.Accept [TResultType,TArgType](ColumnMapVisitorWithResults 2 visitor, TArgType arg) at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap columnMap, TranslatorArg arg, ColumnMap discriminatorColumnMap, Object discriminatorValue) at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap columnMap, TranslatorArg arg) at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(SimpleCollectionColumnMap columnMap, TranslatorArg arg) at System.Data.Entity.Core.Query.InternalTrees.SimpleCollectionColumnMap.Accept[TResultType,TArgType](ColumnMapVisitorWithResults 2 visitor,TArgType arg)    at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap [T](ColumnMap columnMap,MetadataWorkspace workspace,SpanIndex spanIndex,MergeOption mergeOption,Boolean streaming,Boolean valueLayer)    ---内部异常堆栈跟踪结束---    at System.RuntimeMethodHandle.InvokeMethod(Object target,Object [] arguments,Signature sig,Boolean constructor)    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,Object [] parameters,Object [] arguments)    在System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object []参数,CultureInfo文化)    在System.Reflection.MethodBase.Invoke(Object obj,Object []参数)    at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap(Translator translator,Type elementType,ColumnMap columnMap,MetadataWorkspace workspace,SpanIndex spanIndex,MergeOption mergeOption,Boolean streaming,Boolean valueLayer)    在System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.Prepare(ObjectContext context,DbQueryCommandTree tree,Type elementType,MergeOption mergeOption,Boolean streaming,Span span,IEnumerable 1 compiledQueryParameters, AliasGenerator aliasGenerator) at System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable 1 forMergeOption)    at System.Data.Entity.Core.Objects.ObjectQuery 1.<>c__DisplayClass7.<GetResults>b__6() at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func 1 func,IDbExecutionStrategy executionStrategy,Boolean startLocalTransaction,Boolean releaseConnectionOnSuccess)    在System.Data.Entity.Core.Objects.ObjectQuery 1.<>c__DisplayClass7.<GetResults>b__5() at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func 1操作)    在System.Data.Entity.Core.Objects.ObjectQuery 1.GetResults(Nullable 1 forMergeOption)    在System.Data.Entity.Core.Objects.ObjectQuery 1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0() at System.Data.Entity.Internal.LazyEnumerator 1.MoveNext()    在System.Linq.Enumerable.Count [TSource](IEnumerable 1 source) at Microsoft.Retail.Cloud.MediaProcessing.ProcessNewItems() in c:\TFS\Trunk\Cloud\Cloud.Processing\Services\MediaProcessing.cs:line 39 at Microsoft.Retail.Cloud.Process.AssetGatherer.Run() in c:\TFS\Trunk\Cloud\Cloud.Processing\AssetGatherer.cs:line 46 at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal() at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRole() at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<StartRole>b__2() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() A first chance exception of type 'System.ArgumentException' occurred in System.dll System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>RdRuntime</AppDomain><Exception><ExceptionType>System.Reflection.TargetInvocationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Exception has been thrown by the target of an invocation.</Message><StackTrace> at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap(Translator translator, Type elementType, ColumnMap columnMap, MetadataWorkspace workspace, SpanIndex spanIndex, MergeOption mergeOption, Boolean streaming, Boolean valueLayer) at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.Prepare(ObjectContext context, DbQueryCommandTree tree, Type elementType, MergeOption mergeOption, Boolean streaming, Span span, IEnumerable 1 compiledQueryParameters,AliasGenerator aliasGenerator)    在System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable 1 forMergeOption) at System.Data.Entity.Core.Objects.ObjectQuery 1.&amp; lt;&amp; gt; c_ DisplayClass7。&amp; lt; GetResults&amp; gt; b _6()    在System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction [T](Func 1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) at System.Data.Entity.Core.Objects.ObjectQuery 1.&amp; lt;&amp; gt; c_ DisplayClass7。&amp; lt; GetResults&amp; gt; b < / em>的_5()    at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute [TResult](Func 1 operation) at System.Data.Entity.Core.Objects.ObjectQuery 1.GetResults(Nullable 1 forMergeOption) at System.Data.Entity.Core.Objects.ObjectQuery 1.&amp; lt; System.Collections.Generic.IEnumerable&amp; lt; T&amp; GT; .GetEnumerator&安培; GT; B_ 0()    在System.Data.Entity.Internal.LazyEnumerator 1.MoveNext() at System.Linq.Enumerable.Count[TSource](IEnumerable 1来源)    在c:\ TFS \ Trunk \ Cloud \ Cloud.Processing \ Services \ MediaProcessing.cs中的Microsoft.Retail.Cloud.MediaProcessing.ProcessNewItems():第39行    at c:\ TFS \ Trunk \ Cloud \ Cloud.Processing \ AssetGatherer.cs中的Microsoft.Retail.Cloud.Process.AssetGatherer.Run():第46行    在Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal()    在Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRole()    在Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge。&amp; lt; StartRole&amp; gt; b _2()    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext,ContextCallback callback,Object state,Boolean preserveSyncCtx)    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback callback,Object state,Boolean preserveSyncCtx)    在System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback回调,对象状态)    at System.Threading.ThreadHelper.ThreadStart()System.Reflection.TargetInvocationException:调用目标抛出了异常。 ---&安培; GT; System.ArgumentException:程序集中的重复类型名称。    在System.Reflection.Emit.ModuleBuilder.CheckTypeNameConflict(String strTypeName,Type enclosingType)    在System.Reflection.Emit.AssemblyBuilderData.CheckTypeNameConflict(String strTypeName,TypeBuilder enclosingType)    在System.Reflection.Emit.TypeBuilder.Init(String fullname,TypeAttributes attr,Type parent,Type [] interfaces,ModuleBuilder module,PackingSize iPackingSize,Int32 iTypeSize,TypeBuilder enclosingType)    在System.Reflection.Emit.ModuleBuilder.DefineType(String name,TypeAttributes attr,Type parent,Type [] interfaces)    在System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.get_TypeBuilder()    在System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.CreateType(ModuleBuilder moduleBuilder)    在System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.BuildType(ModuleBuilder moduleBuilder,ClrEntityType ospace EntityType,MetadataWorkspace workspace)    at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.TryCreateProxyType(EntityType ospace EntityType,MetadataWorkspace workspace)    在System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.GetProxyType(ClrEntityType ospace EntityType,MetadataWorkspace工作区)    在System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(EntityColumnMap columnMap,TranslatorArg arg)    at System.Data.Entity.Core.Query.InternalTrees.EntityColumnMap.Accept [TResultType,TArgType](ColumnMapVisitorWithResults 2 visitor, TArgType arg) at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap columnMap, TranslatorArg arg, ColumnMap discriminatorColumnMap, Object discriminatorValue) at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap columnMap, TranslatorArg arg) at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(SimpleCollectionColumnMap columnMap, TranslatorArg arg) at System.Data.Entity.Core.Query.InternalTrees.SimpleCollectionColumnMap.Accept[TResultType,TArgType](ColumnMapVisitorWithResults 2 visitor,TArgType arg)    at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap [T](ColumnMap columnMap,MetadataWorkspace workspace,SpanIndex spanIndex,MergeOption mergeOption,Boolean streaming,Boolean valueLayer)    ---内部异常堆栈跟踪结束---    at System.RuntimeMethodHandle.InvokeMethod(Object target,Object [] arguments,Signature sig,Boolean constructor)    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,Object [] parameters,Object [] arguments)    在System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object []参数,CultureInfo文化)    在System.Reflection.MethodBase.Invoke(Object obj,Object []参数)    at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap(Translator translator,Type elementType,ColumnMap columnMap,MetadataWorkspace workspace,SpanIndex spanIndex,MergeOption mergeOption,Boolean streaming,Boolean valueLayer)    在System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.Prepare(ObjectContext context,DbQueryCommandTree tree,Type elementType,MergeOption mergeOption,Boolean streaming,Span span,IEnumerable 1 compiledQueryParameters, AliasGenerator aliasGenerator) at System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable 1 forMergeOption)    at System.Data.Entity.Core.Objects.ObjectQuery 1.&amp;lt;&amp;gt;c__DisplayClass7.&amp;lt;GetResults&amp;gt;b__6() at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func 1 func,IDbExecutionStrategy executionStrategy,Boolean startLocalTransaction,Boolean releaseConnectionOnSuccess)    在System.Data.Entity.Core.Objects.ObjectQuery 1.&amp;lt;&amp;gt;c__DisplayClass7.&amp;lt;GetResults&amp;gt;b__5() at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func 1操作)    在System.Data.Entity.Core.Objects.ObjectQuery 1.GetResults(Nullable 1 forMergeOption)    在System.Data.Entity.Core.Objects.ObjectQuery 1.&amp;lt;System.Collections.Generic.IEnumerable&amp;lt;T&amp;gt;.GetEnumerator&amp;gt;b__0() at System.Data.Entity.Internal.LazyEnumerator 1.MoveNext()    在System.Linq.Enumerable.Count [TSource](IEnumerable 1 source) at Microsoft.Retail.Cloud.MediaProcessing.ProcessNewItems() in c:\TFS\Trunk\Cloud\Cloud.Processing\Services\MediaProcessing.cs:line 39 at Microsoft.Retail.Cloud.Process.AssetGatherer.Run() in c:\TFS\Trunk\Cloud\Cloud.Processing\AssetGatherer.cs:line 46 at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal() at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRole() at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.&amp;lt;StartRole&amp;gt;b__2() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()</ExceptionString><InnerException><ExceptionType>System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Duplicate type name within an assembly.</Message><StackTrace> at System.Reflection.Emit.ModuleBuilder.CheckTypeNameConflict(String strTypeName, Type enclosingType) at System.Reflection.Emit.AssemblyBuilderData.CheckTypeNameConflict(String strTypeName, TypeBuilder enclosingType) at System.Reflection.Emit.TypeBuilder.Init(String fullname, TypeAttributes attr, Type parent, Type[] interfaces, ModuleBuilder module, PackingSize iPackingSize, Int32 iTypeSize, TypeBuilder enclosingType) at System.Reflection.Emit.ModuleBuilder.DefineType(String name, TypeAttributes attr, Type parent, Type[] interfaces) at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.get_TypeBuilder() at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.CreateType(ModuleBuilder moduleBuilder) at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.BuildType(ModuleBuilder moduleBuilder, ClrEntityType ospaceEntityType, MetadataWorkspace workspace) at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.TryCreateProxyType(EntityType ospaceEntityType, MetadataWorkspace workspace) at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.GetProxyType(ClrEntityType ospaceEntityType, MetadataWorkspace workspace) at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(EntityColumnMap columnMap, TranslatorArg arg) at System.Data.Entity.Core.Query.InternalTrees.EntityColumnMap.Accept[TResultType,TArgType](ColumnMapVisitorWithResults 2 visitor,TArgType arg)    在System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap columnMap,TranslatorArg arg,ColumnMap discriminatorColumnMap,Object discriminatorValue)    在System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap columnMap,TranslatorArg arg)    在System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(SimpleCollectionColumnMap columnMap,TranslatorArg arg)    at System.Data.Entity.Core.Query.InternalTrees.SimpleCollectionColumnMap.Accept [TResultType,TArgType](ColumnMapVisitorWithResults 2 visitor, TArgType arg) at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap[T](ColumnMap columnMap, MetadataWorkspace workspace, SpanIndex spanIndex, MergeOption mergeOption, Boolean streaming, Boolean valueLayer)</StackTrace><ExceptionString>System.ArgumentException: Duplicate type name within an assembly. at System.Reflection.Emit.ModuleBuilder.CheckTypeNameConflict(String strTypeName, Type enclosingType) at System.Reflection.Emit.AssemblyBuilderData.CheckTypeNameConflict(String strTypeName, TypeBuilder enclosingType) at System.Reflection.Emit.TypeBuilder.Init(String fullname, TypeAttributes attr, Type parent, Type[] interfaces, ModuleBuilder module, PackingSize iPackingSize, Int32 iTypeSize, TypeBuilder enclosingType) at System.Reflection.Emit.ModuleBuilder.DefineType(String name, TypeAttributes attr, Type parent, Type[] interfaces) at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.get_TypeBuilder() at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.CreateType(ModuleBuilder moduleBuilder) at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.BuildType(ModuleBuilder moduleBuilder, ClrEntityType ospaceEntityType, MetadataWorkspace workspace) at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.TryCreateProxyType(EntityType ospaceEntityType, MetadataWorkspace workspace) at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.GetProxyType(ClrEntityType ospaceEntityType, MetadataWorkspace workspace) at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(EntityColumnMap columnMap, TranslatorArg arg) at System.Data.Entity.Core.Query.InternalTrees.EntityColumnMap.Accept[TResultType,TArgType](ColumnMapVisitorWithResults 2 visitor,TArgType arg)    在System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap columnMap,TranslatorArg arg,ColumnMap discriminatorColumnMap,Object discriminatorValue)    在System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap columnMap,TranslatorArg arg)    在System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(SimpleCollectionColumnMap columnMap,TranslatorArg arg)    在System.Data.Entity.Core.Query.InternalTrees.SimpleCollectionColumnMap.Accept [TResultType,TArgType](ColumnMapVisitorWithResults`2 visitor,TArgType arg)    at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap [T](ColumnMap columnMap,MetadataWorkspace workspace,SpanIndex spanIndex,MergeOption mergeOption,Boolean streaming,Boolean valueLayer)

0 个答案:

没有答案