【问题标题】:Dotnet high memory usage on Mac osMac os 上的 Dotnet 高内存使用率
【发布时间】:2020-09-22 14:59:44
【问题描述】:

我已经使用 asdf-vim 安装了 .Net Core 3.1.300 并且关注 csharp tutorial。当我跑步时:

dotnet new console -n BranchesAndLoops -o .

确实会占用大量内存。这是 C# 世界的规范吗?还是将某些东西误配置为 dotnet 新手?

❯ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.300
 Commit:    b2475c1295

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.15
 OS Platform: Darwin
 RID:         osx.10.15-x64
 Base Path:   /Users/ogirginc/.asdf/installs/dotnet-core/3.1.300/sdk/3.1.300/

Host (useful for support):
  Version: 3.1.4
  Commit:  0c2e69caa6

.NET Core SDKs installed:
  3.1.300 [/Users/ogirginc/.asdf/installs/dotnet-core/3.1.300/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.4 [/Users/ogirginc/.asdf/installs/dotnet-core/3.1.300/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.4 [/Users/ogirginc/.asdf/installs/dotnet-core/3.1.300/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

【问题讨论】:

  • 在我的 Windows 10 机器上运行相同的命令只用了很短的时间,我什至无法进入任务管理器查看它占用了多少内存...... ????‍♂️

标签: c# .net-core macos-catalina asdf-vm


【解决方案1】:

尽管我已经用 asdf-vm 安装了 dotnet,但后来我下载了 Visual Studio for Mac 和 Visual Studio Code(安装了其他东西,我不知道它们是什么)来尝试它们而不是修补我的vimrc.

可能同时使用 asdf-vm 和 Visual Studio for Mac 导致一些内部问题,导致 dotnet 卡在挂起状态,内存泄漏逐渐增加。

卸载 VS for Mac 和 VS code 后,高内存问题不再出现。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-07-19
    • 2010-12-06
    • 2013-05-19
    • 2011-09-19
    • 2018-07-01
    • 1970-01-01
    • 2012-05-31
    • 1970-01-01
    相关资源
    最近更新 更多