dotnet core 出现Can not find runtime target for framework '.NETCoreApp,Version=v1.6' 的解决办法...

本文介绍了解决在更新dotnetcore类库后遇到的运行时错误的方法。该错误通常发生在目标运行环境与.NET Core版本不兼容时,文中提供了在project.json文件中配置正确的运行环境版本来解决此问题。

如果你在更新dotnet core新的类库后运行程序提示如下的错误:

        Can not find runtime target for framework '.NETCoreAPP, Version=v1.0' compatible with one of the target runtimes: 'win10-x64, win81-x64, win8-x64, win7-x64'. Possible causes:
        The project has not been restored or restore failed -run 'dotnet restore'
        The project does not list one of 'win10-x64, win81-x64, win7-x64' in the 'runtimes'

 

解决方法:在项目的 project.json 文件添加以下的节点 重新编译即可:

"runtimes":{
"win10-x64":{}
}
或者 可以修改
Microsoft.NETCore.App节点的内容如下,Version的版本请对应你的dotnet core版本号
"Microsoft.NETCore.App":{
"type":"platform",

"version":"1.0.1"

}

 

转载于:https://www.cnblogs.com/kzwrcom/p/6003790.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值