详细链接:https://www.cnblogs.com/Can-daydayup/p/10193568.html#_label1_0 如果上述方法无效很可能是vs2017不支持.netcore3.1版本问题,(vs2017最多支持到.netcore2.2)建议使用vs2019.