I the classroom hit and miss students getting this error when clicking on workbench with latest ver
An unexpected error has occurred: The type initializer for 'Ansys.Core.Expressions.ExpressionEvaluator' threw an exception.
System.MissingMethodException: Method not found: 'System.Collections.Generic.IEnumerable`1<!!0> Microsoft.Scripting.Utils.ReflectionUtils.GetCustomAttributes(System.Reflection.Assembly, Boolean)'.
at IronPython.Runtime.Binding.PythonBinder.DomainManager_AssemblyLoaded(Object sender, AssemblyLoadedEventArgs e)
at IronPython.Runtime.Binding.PythonBinder..ctor(PythonContext pythonContext, CodeContext context)
at IronPython.Runtime.PythonContext..ctor(ScriptDomainManager manager, IDictionary`2 options)
--- System.Reflection.TargetInvocationException: Failed to load language 'IronPython 2.7.4': Method not found: 'System.Collections.Generic.IEnumerable`1<!!0> Microsoft.Scripting.Utils.ReflectionUtils.GetCustomAttributes(System.Reflection.Assembly, Boolean)'.
at Microsoft.Scripting.Runtime.LanguageConfiguration.LoadLanguageContext(ScriptDomainManager domainManager, Boolean& alreadyLoaded)
at Microsoft.Scripting.Runtime.DlrConfiguration.LoadLanguageContext(ScriptDomainManager manager, LanguageConfiguration config)
at Microsoft.Scripting.Runtime.DlrConfiguration.TryLoadLanguage(ScriptDomainManager manager, AssemblyQualifiedTypeName providerName, LanguageContext& language)
at Microsoft.Scripting.Runtime.ScriptDomainManager.GetLanguageByTypeName(String providerAssemblyQualifiedTypeName)
at Microsoft.Scripting.Hosting.ScriptRuntime.GetEngineByTypeName(String assemblyQualifiedTypeName)
at Ansys.Core.Expressions.ExpressionEvaluator.CreateScriptEngine()
--- System.TypeInitializationException: The type initializer for 'Ansys.Core.Expressions.ExpressionEvaluator' threw an exception.
at Ansys.Core.Expressions.ExpressionEvaluator..ctor()
at Ansys.Core.Expressions.ExpressionManager..ctor()
at Ansys.ParameterManager.Data.ParameterEvaluator..ctor(ParameterContainer container)
at Ansys.ParameterManager.Data.ParameterContainer..ctor()
at Ansys.ParameterManager.Commands.CreateStaticParameterContainerCommand.Execute(IFullContext context)
at Ansys.Core.Commands.Concurrency.CommandWorkUnit.executeInContext(CommandContext subContext, IExecutionEngineCallback tracer)
at Ansys.Core.Commands.Concurrency.BaseWorkUnit.doExecute(IExecutionEngineCallback executionEngine, CommandContext subContext)
at Ansys.Core.Commands.Concurrency.BaseWorkUnit.Execute(IExecutionEngineCallback executionEngine, Boolean dontCatchExceptions)
--- Ansys.Core.Commands.CommandFailedException: The type initializer for 'Ansys.Core.Expressions.ExpressionEvaluator' threw an exception.
CommandName: Parameters.CreateStaticParameterContainer()
at Ansys.Core.Commands.CommandAsyncResult.RethrowFailureException(Exception e)
at Ansys.Core.Commands.CommandAsyncResult.Wait(Int32 milliSecondsTimeout, Boolean exitContext)
at Ansys.Core.DataModel.ProjectSystem.Project.InvokeProjectInitializationCommands(IProtectedContext commandContext)
at Ansys.Core.DataModel.ProjectSystem.ResetCommand.Execute(IFullContext context)
at Ansys.Core.Commands.Concurrency.CommandWorkUnit.executeInContext(CommandContext subContext, IExecutionEngineCallback tracer)
at Ansys.Core.Commands.Concurrency.BaseWorkUnit.doExecute(IExecutionEngineCallback executionEngine, CommandContext subContext)
at Ansys.Core.Commands.Concurrency.BaseWorkUnit.Execute(IExecutionEngineCallback executionEngine, Boolean dontCatchExceptions)
--- Ansys.Core.Commands.CommandFailedException: The type initializer for 'Ansys.Core.Expressions.ExpressionEvaluator' threw an exception.
CommandName: Reset()
at Ansys.Core.Commands.CommandAsyncResult.RethrowFailureException(Exception e)
at Ansys.Core.Commands.CommandAsyncResult.Wait(Int32 milliSecondsTimeout, Boolean exitContext)
at Ansys.Core.DataModel.ProjectSystem.ResetCommand.InvokeAndWait(IProtectedContext context)
at Ans.Program.Runtime.Initialize(RuntimeSettings settings)
Answers
-
@David Mota - this forum is more for scripting and developer tools questions so general support questions are unlikely to get answered here. You can post this into the general support forum, or contact tech support for faster resolution.
0