TangMonk
V2EX  ›  问与答

.Net Core 3.0 跨平台编译好像很慢

  •  
  •   TangMonk · Sep 30, 2019 · 4291 views
    This topic created in 2609 days ago, the information mentioned may be changed or developed.

    我在 macOS 上编译到 Ubuntu:

    dotnet build --configuration Release --runtime ubuntu.18.04-x64
    

    就是一句简单的 hello world 的 console, 半天没有编译完

    Supplement 1  ·  Sep 30, 2019
    build 要下载 nuget 依赖
    Supplement 2  ·  Sep 30, 2019
    api.nuget.org 这个经常会超时
    Supplement 3  ·  Sep 30, 2019
    换成 cnblog 的源就行 https://nuget.cnblogs.com/v3/index.json
    15 replies  •  2019-10-20 22:41:21 +08:00
    zachlhb
    zachlhb
    Sep 30, 2019 via Android
    1
    对 net 早就无爱了
    keenkiller
    keenkiller
    Sep 30, 2019
    2
    交叉编译还是 go 快啊 2333
    TangMonk
    TangMonk
    OP
    Sep 30, 2019❤️1
    3
    @zachlhb c#用着舒服
    chinvo
    chinvo
    Sep 30, 2019
    4
    还没试过这么搞,都是直接 dotnet publish -c Release 然后放到目标服务器上跑……

    好像也没啥毛病?
    xupefei
    xupefei
    Sep 30, 2019
    5
    > dotnet new console

    > dotnet build --configuration Release --runtime ubuntu.18.04-x64

    Microsoft (R) Build Engine version 16.3.0+0f4c62fea for .NET Core
    Copyright (C) Microsoft Corporation. All rights reserved.

    Restore completed in 2.66 sec for /Users/pengxu/text/text.csproj.
    text -> /Users/pengxu/text/bin/Release/netcoreapp3.0/ubuntu.18.04-x64/text.dll

    Build succeeded.
    0 Warning(s)
    0 Error(s)

    Time Elapsed 00:00:05.32


    我试了试,五秒钟搞定。楼主网有问题?
    TangMonk
    TangMonk
    OP
    Sep 30, 2019 via iPhone
    6
    @xupefei build 还要网?
    netnr
    netnr
    Sep 30, 2019
    7
    TangMonk
    TangMonk
    OP
    Sep 30, 2019
    8
    @netnr #7 懂了
    agdhole
    agdhole
    Oct 1, 2019 via Android
    9
    微软最近被国内的某些 DNS 搞了,尝试换到 Google,cf DNS 试试,我前些天用 114DNS 下微软所有的东西都只有十多 kb,换了就好了
    TangMonk
    TangMonk
    OP
    Oct 1, 2019
    10
    @agdhole 好的
    zachlhb
    zachlhb
    Oct 1, 2019 via Android
    11
    @TangMonk 我觉得是 virtual studio 舒服,而不是 C#舒服,要说语言,其实都差不多
    TangMonk
    TangMonk
    OP
    Oct 3, 2019
    12
    @zachlhb #11

    visual studio 是很舒服, 但是 c#的语法糖也很不错
    okampfer
    okampfer
    Oct 19, 2019
    13
    @TangMonk 腾讯云也有 nuget 镜像: https://mirrors.cloud.tencent.com/nuget

    话说你在成都而且在做自由职业啊?真巧,我也是,关注你 github 了,如果可以想加个微信聊聊。
    TangMonk
    TangMonk
    OP
    Oct 19, 2019
    14
    @okampfer #13 你也是成都做自由职业的? 微信:d3l0d3QwMQ==
    okampfer
    okampfer
    Oct 20, 2019
    15
    @TangMonk 奇怪了,应该是 base64 encode 吧?怎么微信里搜不到呢?我的微信:QXRocnVuQmx1ZQ==
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1937 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 08:05 · PVG 16:05 · LAX 00:05 · JFK 03:05
    ♥ Do have faith in what you're doing.