MacOS M1日志上的dotnet测试'无效平台类型:anycpu'

发布于 2025-02-10 01:31:35 字数 502 浏览 1 评论 0原文

这是我的单元测试之一的示例CSPROJ文件:

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>

    <IsPackable>false</IsPackable>

    <Platforms>AnyCPU;x64</Platforms>
  </PropertyGroup>

当我在MacOS上使用Apple Silicon在MacOS上运行dotnet test时,我在控制台上找到了这一点:

Invalid platform type: anycpu. Valid platform types are X86, X64, ARM, ARM64, S390x.

我如何正确修复它以在我的上运行机器以及其他使用Windows和Linux的团队成员?

Here's a sample csproj file for one of my unit tests:

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>

    <IsPackable>false</IsPackable>

    <Platforms>AnyCPU;x64</Platforms>
  </PropertyGroup>

When I run dotnet test on my solution on MacOS with Apple silicon, I find this on the console:

Invalid platform type: anycpu. Valid platform types are X86, X64, ARM, ARM64, S390x.

How can I properly fix it to run on my machine as well as the other team members who are using Windows and Linux?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文