Windows 安装DotNet Core运行时库

1、安装Windows Management Framework 3.0或5.1

2、安装choco,下载地址https://chocolatey.org/install或通过PowerShell执行以下代码。

复制代码
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

2.1安装过程中,提示PowerSell使用"1"个参数调用"DownloadString"时发生异常:"操作超时"或"基础连接已经关闭: 发送时发生错误"时,需要确认PowerSell版本是否为3.0及以上;

2.2安装过程中,提示"请求被中止: 未能创建 SSL/TLS 安全通道。"需要执行以下代码。

复制代码
[System.Net.ServicePointManager]::SecurityProtocol=[System.Net.SecurityProtocolType]::Tls12
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

3、成功安装choco后,需要安装dotnetcore-windowshosting

复制代码
--安装
choco install dotnetcore-windowshosting --version=2.2.3
--卸载
choco uninstall dotnetcore-windowshosting --version=2.2.3
--强制重新安装
choco uninstall dotnetcore-windowshosting --version=2.2.3  --force
相关推荐
CSharp精选营12 小时前
.NET 8 与 .NET 9 支持终止倒计时:开发者需要了解什么
.net·lts·.net8·.net9·码农刚子·升级迁移·sts·支持终止
hez20103 天前
在 .NET 上构建超大托管数组
c#·.net·.net core·gc·clr
唐青枫9 天前
线程不是越多越快:C#.NET Thread 生命周期、同步与后台工作线程实战
c#·.net
唐青枫10 天前
别只会反射:C#.NET Emit 动态生成代码实战详解
c#·.net
Caco_D10 天前
一行代码抓遍全网 20 个热榜!Aneiang.Pa 4.0 发布 — 极简 .NET 爬虫库
爬虫·.net
咕白m62510 天前
.NET 环境下 Word 超链接批量提取方案
c#·.net
小码编匠11 天前
C# 工控上位机必备:数据转换工具类与十个核心模块
后端·c#·.net
唐青枫13 天前
别再乱用 StartNew:C#.NET TaskFactory 任务调度实战详解
c#·.net