.Net 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'.

.Net 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‘.

解决方法:

在项目文件project.json里添加:

"runtimes": {
    "win10-x64": {} }

.Net 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'.

时间: 2024-07-30 13:52:59

.Net 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'.的相关文章

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

如果你在更新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

Nuget自己打包引用的时候出现错误:Package is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package 1.0.1 supports: net (.NETFramework,Version=v0.0)

解决方法: project.json中将 "frameworks": { "netcoreapp1.0": { "imports": [ "dnxcore50", "portable-net45+win8" ]}  dnxcore50删除 "frameworks": {"netcoreapp1.0": { "imports": ["por

VisualStudioCode创建的asp.net core控制台程序部署到linux

1.asp.net core控制台程序 static void Main(string[] args) { int times=10; while(times>=0) { Console.WriteLine("Hello World!"); times--; Thread.Sleep(1000); } } 2.发布 发布前,修改test2.csproj文件(项目名称为test2) <Project Sdk="Microsoft.NET.Sdk">

【ASP.NET Core分布式项目实战】(五)Docker制作dotnet core控制台程序镜像

Docker制作dotnet core控制台程序镜像 基于dotnet SDK 新建控制台程序 mkdir /home/console cd /home/console dotnet new console dotnet restore 创建 Dockerfile 文件,参考https://github.com/dotnet/dotnet-docker/blob/master/samples/aspnetapp/Dockerfile vim /home/console/Dockerfile #

.net core控制台程序中使用原生依赖注入

原文:.net core控制台程序中使用原生依赖注入 如果要在程序中使用DbContext,则需要先在Nuget中安装Microsoft.EntityFrameworkCore.SqlServer using ConsoleApp1.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using System; using Console

编译器错误消息:必须添加对程序集“System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”的引用

出现这个错误的原因是Web.config配置文件的原因. 解决办法: 在web.config中的<system.web>节点下的<system.web>节点下的<assemblies>中添加: <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 编译器错误消息:必须添加对程序集&qu

部署Bookinfo示例程序详细过程和步骤(基于Kubernetes集群+Istio v1.0)

部署Bookinfo示例程序详细过程和步骤(基于Kubernetes集群+Istio v1.0) 部署Bookinfo示例程序 在下载的Istio安装包的samples目录中包含了示例应用程序. Bookinfo应用 部署一个样例应用,它由四个单独的微服务构成,用来演示多种 Istio 特性.这个应用模仿在线书店的一个分类,显示一本书的信息.页面上会显示一本书的描述,书籍的细节(ISBN.页数等),以及关于这本书的一些评论. Bookinfo 应用分为四个单独的微服务: productpage

CentOS里运行.net core控制台程序

说明:2带了4(vs2017仅支持2.1,命令中修改版本就好)1注册 Microsoft 密钥和源安装 .NET 之前,需要:注册 Microsoft 密钥.注册产品存储库.安装必需的依赖项.每台计算机只需要执行一次此操作.打开终端并运行以下命令.bash 复制sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm ------------------------------

使用 dotnet watch 开发 ASP.NET Core 应用程序

使用 dotnet watch 开发 ASP.NET Core 应用程序 原文:Developing ASP.NET Core applications using dotnet watch作者:Victor Hurdugaci翻译:谢炀(Kiler)校对:刘怡(AlexLEWIS).许登洋(Seay) 介绍 dotnet watch 是一个开发阶段在源文件发生变动的情况下使用 dotnet 命令的工具. 当代码发生变动的时候可以用来执行编译,运行测试,或者发布操作. 在本教程中,我们将使用一个