InvalidOperationException: 不能在同一 AppDomain 中创建多个 System.Windows.Application 实例。 StackTrace: 在 System.Windows.Application..ctor() 在 __ScriptExecution.__h09i80wb.<>c.<Exec>b__0_0() 在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 在 System.Threading.ThreadHelper.ThreadStart()
InvalidOperationException: 不能在同一 AppDomain 中创建多个 System.Windows.Application 实例。 StackTrace: 在 System.Windows.Application..ctor() 在 DynamicClass.ScriptEntry.<>c__DisplayClass2.<Exec>b__0() 在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 在 System.Threading.ThreadHelper.ThreadStart()