chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes
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
asked by MBeckius (5.4k points)

17 Answers

0 votes
Hi Jesse,

We’ve got a new patch regarding the Microsoft update. We hope it resolves the issues you’ve been experiencing.
Please note that this patch contains a fuller solution than what we sent out last week. Please make sure to test it with your code, even if the last patch resolved the issues.

You can download the patch here: https://www.typemock.com/files/TypemockI ... e7.2.1.msi

You will be updated as soon as the official version is released.
answered by alex (17k points)
0 votes
Hi Alex,

Thank you for your reply.

The 7.2.1 still resolves the issue with invalidProgramException. However i get an error when static code analysis is turned on in the testproject.

For example this ruleset: C:Program Files (x86)Microsoft Visual Studio 10.0Team ToolsStatic Analysis ToolsRule SetsBasicCorrectnessRules.ruleset
This gives a build error: "CA0053 : Unable to load rule assembly 'c:program filesmicrosoft visual studio 10.0 eam toolsstatic analysis toolsxcop ulesdataflowrules.dll': The assembly contains no FxCop rules"

I don't have this error with the previous 7.2 patch or when I turn off the Typemock add-in.

We can turn off code analysis for test projects as a workaround because it isn't as important as analysis on c# projects but i hope this is fixed in the official release.

Thanks in advance,

Jesse
answered by Jesse (260 points)
0 votes
Hi Jesse,

Thank you for the feedback.

We're aware of the static analysis issue and we're working on fixing it.
We'll keep you posted as we progress.
answered by alex (17k points)
0 votes
Has there ever been a fix done for version 6.0? Or do we have to pay to get all of our licenses maintenance to get this bug fixed?
answered by CalgaryChris (140 points)
0 votes
Hi Chris,

Only versions later than 7.2 work on machines with the MS update.
We'll contact you by email to discuss the version upgrade.
answered by alex (17k points)
0 votes
Hi Sid,

Currently the latest version is 7.4.2.0.

Let me know if it helps.
answered by alex (17k points)
0 votes
Hi Sid,

Have you managed to fixed the issues with 7.4.2?
7.4.3 is out already, I suggest you to install it.

Let me know if it helps.
answered by alex (17k points)
...