xinhaiw
V2EX  ›  .NET

有没有在 mac 上跑.net 6 rc 的

  •  
  •   xinhaiw · Oct 15, 2021 · 4023 views
    This topic created in 1851 days ago, the information mentioned may be changed or developed.

    跑不起来啊,都是报错,用的 vs for mac 创建的项目

    18 replies  •  2021-11-03 21:28:06 +08:00
    janxin
    janxin
    Oct 15, 2021
    1
    等 MAUI 出了再用
    reallittoma
    reallittoma
    Oct 15, 2021
    2
    在 Windows 上创建 MAUI 项目也是跑不起来
    Sirius1
    Sirius1
    Oct 15, 2021
    3
    具体是什么错误,我 m1 版本的 macbook 之前用 preview 版本可以跑起来。要装对应的 SDK,项目指定 net 6
    xinhaiw
    xinhaiw
    OP
    Oct 15, 2021
    4
    @Sirius1 /Users/xinhai/Projects/nettest/nettest/obj/Debug/net6.0/nettest.GlobalUsings.g.cs(1,1): Error CS0116: A namespace cannot directly contain members such as fields or methods (CS0116) (nettest)
    kiracyan
    kiracyan
    Oct 15, 2021
    5
    @xinhaiw 这是编译报错吧?
    Removable
    Removable
    Oct 15, 2021
    6
    楼主用的啥版本的 vs for mac?
    xinhaiw
    xinhaiw
    OP
    Oct 15, 2021
    7
    @kiracyan 就是 build 过不去啊 各种报错
    xinhaiw
    xinhaiw
    OP
    Oct 15, 2021
    8
    @Removable Visual Studio 2019 for Mac
    xinhaiw
    xinhaiw
    OP
    Oct 15, 2021
    9
    要试试 Visual Studio 2022 for Mac Preview ?
    Removable
    Removable
    Oct 15, 2021
    10
    @xinhaiw #9 对,要 2022 哦
    xinhaiw
    xinhaiw
    OP
    Oct 15, 2021
    11
    @Removable 正在下载中
    0o0o0o0
    0o0o0o0
    Oct 15, 2021
    12
    vs2019 for mac 最终版只支持.net6 preview4
    agagega
    agagega
    Oct 15, 2021
    13
    vs2019 for mac 应该不会原生支持 M1 了,看微软的意思得 2022. 不过 vscode 也能写
    xinhaiw
    xinhaiw
    OP
    Oct 15, 2021
    14
    跑起来了发现没有 startup 清爽了,也没有 useRouting 了,默认了吗?
    hez2010
    hez2010
    Oct 15, 2021 via Android
    15
    把 csproj 里面的 EnableImplicitUsings 改成 false 试试
    dorothyREN
    dorothyREN
    Oct 16, 2021
    16
    @agagega #13 rider 不香吗
    beyondex
    beyondex
    Oct 17, 2021
    17
    Rider 试试?
    yangzzzzzz
    yangzzzzzz
    Nov 3, 2021
    18
    rider 已经是原生运行的了 可以写.net3 到 5 ,.net6 rc 我装了一次报了一堆错误没折腾。等正式版吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1211 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 17:31 · PVG 01:31 · LAX 09:31 · JFK 12:31
    ♥ Do have faith in what you're doing.