Completed
Last Updated: 16 May 2024 09:15 by ADMIN
Ivo
Created on: 17 Oct 2022 12:22
Type: Bug Report
4
Using declaration causes InvalidProgramException

if you use the C# using declaration and have JustMock advanced (elevated) mode enabled, the runtime will throw an InvalidProgramException.

Find below the sample code that demonstrates the issue:

public class TestClass : IDisposable
{
    public void Dispose()
    {
    }
}

[TestClass]
public class Fixture
{
    public interface ITest { }

    [TestMethod]
    public async Task Test()
    {
        ITest mock = Mock.Create<ITest>();
        using TestClass test = new();
    }
}

4 comments
ADMIN
Ivo
Posted on: 15 May 2024 15:32

The issue is fixed in Q2 2024 (2024.2.514.325)

 

Regards,
Ivo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

David
Posted on: 26 Feb 2024 23:58
Yes no worries on the patience :)  Need that when programming ehh?  Really good that it is a top priority too.  Thanks for your update on the planned fixes.
ADMIN
Ivo
Posted on: 22 Feb 2024 08:27

Hello David,

It is one of our top priorities for the next release (scheduled for mid-May, but we will do our best to deliver it earlier), so I would like to ask you for a bit of patience.

Regards,
Ivo
Progress Telerik

A brand new JustMock course was just added to the Virtual Classroom - the free self-paced technical training portal that gets you up to speed with Telerik and Kendo UI products! Check it out at https://learn.telerik.com.
David
Posted on: 22 Feb 2024 00:06

Can we please get this fixed?  Our whole team has to turn OFF the "Automatic Mock Repository Cleanup Enabled" flag EVERY time we restart Visual Studio 2022.  If we don't we run into this error. 

ALSO the "Automatic Mock Repository Cleanup Enabled" flag doesn't stay set to false - keeps reverting back to TRUE.