Hello,
We are using Typemock 6.0.6 with VS 2008 and .Net 3.5.1. Today a bunch of windows updates where pushed out and our build server started failing tests. Here is a simple program to reproduce the issue:
using IronPython.Hosting;
using NUnit.Framework;
namespace ClassLibrary1
{
[TestFixture]
public class Tests
{
[Test]
public void Expression()
{
var e = new PythonEngine();
var res = e.Evaluate("2+2");
Assert.AreEqual(4, res);
}
}
}
We are using IronPython 1.1.2. Note: We are not even using Typemock in the sample test, but the presence of Typemock in the references is enough to cause this error:
Test 'ClassLibrary1.Tests.Expression' failed: System.TypeInitializationException : The type initializer for 'IronPython.Runtime.Operations.Ops' threw an exception.
----> System.InvalidProgramException : Common Language Runtime detected an invalid program.
at IronPython.Runtime.Operations.Ops.MakeList()
at IronPython.Runtime.SystemState.Initialize()
at IronPython.Runtime.SystemState..ctor(EngineOptions options)
at IronPython.Hosting.PythonEngine.Initialize(EngineOptions engineOptions)
at IronPython.Hosting.PythonEngine..ctor()
Tests.cs(12,0): at ClassLibrary1.Tests.Expression()
--InvalidProgramException
at IronPython.Runtime.Types.OpsReflectedType..ctor(String name, Type baseType, Type opsType, Type extensibleType)
at IronPython.Runtime.Types.OpsReflectedType..ctor(String name, Type baseType, Type opsType, Type extensibleType, CallTarget2 optimizedCtor)
at IronPython.Runtime.Operations.StringOps.MakeDynamicType()
at IronPython.Runtime.Operations.Ops.MakeDynamicTypesTable()
at IronPython.Runtime.Operations.Ops..cctor()
Remove the Typemock reference and the test will run fine. I did try upgrading Typemock with the latest version (7.1.7), but I still get the same result.
Any help is much appreciated.
Matt B