首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >您尝试打开的工作空间与当前dotMemory版本不兼容

您尝试打开的工作空间与当前dotMemory版本不兼容
EN

Stack Overflow用户
提问于 2021-03-06 15:51:27
回答 1查看 52关注 0票数 0

我已经使用.Net 5目标框架和一个测试类创建了一个新的XUnit测试项目

代码语言:javascript
复制
public class SomeTests
{
    private readonly ITestOutputHelper output;

    public SomeTests(ITestOutputHelper output)
    {
        this.output = output;
        DotMemoryUnitTestOutput.SetOutputMethod(output.WriteLine);
    }

    [Fact]
    [DotMemoryUnit(CollectAllocations = true)]
    public void SomeTest()
    {
        var beforeTestMethodPoint = dotMemory.Check();
        var allocatedArray = new string[10];
        dotMemory.Check(afterTestMethodPoint => Assert.True(afterTestMethodPoint.GetTrafficFrom(beforeTestMethodPoint).AllocatedMemory.SizeInBytes == 0));
    }
}

安装的NuGet包为JetBrains.DotMemoryUnit 3.1.20200127.214830

在运行测试(在dotMemory单元下运行)之后,将创建以下输出

代码语言:javascript
复制
Xunit.Sdk.TrueException
Assert.True() Failure
Expected: True
Actual:   False
   at TestsDotMemory.SomeTests.<>c__DisplayClass2_0.<SomeTest>b__0(Memory afterTestMethodPoint) in SomeTests.cs:line 25
   at JetBrains.dotMemoryUnit.dotMemory.Check(Action`1 check)
   at TestsDotMemory.SomeTests.SomeTest() in SomeTests.cs:line 25


[dotMemory Unit]: The workspace is saved to "file:///C:/Users/username/AppData/Local/Temp/dotMemoryUnitWorkspace/Run-2021-03-06T10-15-06.288/SomeTest.2021-03-06T10-15-11.629.dmw". (File size: 9 MB)

当我点击带有.dmw文件的链接时,将打开dotmemory应用程序

当前应用程序版本和许可证信息

代码语言:javascript
复制
JetBrains dotMemory 2020.3.3 Build 203.0.20210217.101844 built on 2021-02-17
dotMemory 2020.3.20210217.101844
dotMemory 2020.3.3 free trial period is running. 2 days left.

和对话框窗口出现

代码语言:javascript
复制
The workspace you are trying to open is incompatible with the current dotMemory version. Do you want to open the workspace in a compatible portable dotMemory version?

如果选择是,则会打开dotMemory 2019.1.3,并显示有关许可信息已结束的对话框(我的许可仅适用于2020.3)

那么为什么.dmw文件不支持dotMemory 2020.3.3呢?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-03-06 20:40:45

为了给用户提供新的功能,.dmw文件格式经常被改变。不幸的是,dotMemory单位生产了一个旧格式的工作区,因为新版本已经有几年没有发布了。据我所知,您没有dotMemory 2020.3的许可证,您使用的是试用期。而dotMemory 2019.1.3的试用期在您的机器上已经结束。任何版本的dotMemory的付费许可肯定涵盖了所有以前的版本。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66503519

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档