V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
xinhaiw
V2EX  ›  .NET

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

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

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

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