dotMemory from visual studio unittest uses old format? (Use dotMemory 2017.3)

Hi there, I have a unittest to which I've added this attribute:

`[DotMemoryUnit(Directory = "c:\\Temp\\dotMemoryUnit", SavingStrategy = SavingStrategy.OnCheckFail)]`

And after running it, and a test failing, it does create output in that directory, in the form of a "2022-05-17T15-58-05.654.dmw" file.

However when I try to open it with dotMemory I'm getting this error message:

Unable to import the workspace: Incompatible dotMemory version. To import the workspace, use dotMemory 2017.3

I have dotMemory 2022.1.1 installed. I installed it from the jetbrains toolbox. I've tried uninstalling it and installing it from JetBrains.dotMemory.2022.1.1.web.exe, hoping that might give a different output, but I'm getting the same exception.

 

I don't really know why it's using an old format like that. Is it possible to create memory output from visual studio that just uses the latest version of dotMemory?

0
3 comments

Hi,

The latest version of dotMemory Unit is quite old and it writes data in the old format. dotMemory breaks forward compatibility quite often because we implement a lot of new features and memory snapshots are not subject to long-term storage. We've introduced a convenient way to open old workspaces. dotMemory automatically finds compatible version and prompts you to use it instead of manually searching for a suitable version.

0

Alright, so is there any better way to memory test unit-tests and not use 2017.3? Because I'm assuming there have been improvements to the testing tools since 2017.

I've tried just running the tests and then attaching dotmemory to the resharper test running, but that didn't give me very clear results

0

dotMemory Unit 3.2 is the latest version. Unfortunately we don't have resources to release new dotMemory Unit version for now and it’s not included in our immediate planning. Also we do not see a lot of demand for new features, but we still maintain this library and will implement a new version if necessary.

Currently, We can't release new dotMemory Unit version based on current dotMemory data format because significant changes was made and a huge resources are required to do that.

Nevertheless, you can use dotMemory Unit features in your tests. dotMemory Unit was designed to use in unit tests to perform memory assertions. This is a free framework and doesn't require to buy a license, the main idea that you should be able to use it without dotMemory. If assert isn't failed, you actually don't need to open workspace in dotMemory. The only case when you need dotMemory is when assert is failed an it's not obvious which recent code changes caused memory leak.

Could you please describe how you use dotMemory Unit in detail and why it is not suitable for you to open snapshots in the old version?

0

Please sign in to leave a comment.