[.NET Core 24]把project.json迁移到.csproj
链接:https://blog.jetbrains.com/dotnet/2017/04/04/rider-eap-update-csproj-based-net-core-support-migrate/
how to migrate from the (deprecated) project.json
format to the new .csproj
format.
First, Microsoft greatly simplified the .csproj
format. In minimal format, this is what it looks like:
首先,微软大大简化.csproj格式。最小的格式,如下:
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup>
<TargetFramework>netstandard1.4</TargetFramework>
</PropertyGroup> </Project>
Second, the good things of project.json
were ported over to the new .csproj
format:
其次,project.json 的优点都移植到了新的csproj格式:
支持通配符(如果一个文件被添加到项目文件,没有更多的合并冲突)。
命令行工具如dotnet.exe可以跟他们一起工作。
Multi-targeting很简单:只需指定目标框架(target frameworks),就可以了。
包引用和项目引用很容易添加。
从项目中构建包也更容易(see full reference)。
迁移:
Let’s look at how we can move from project.json
(and the old .xproj
) to the new and shiny. Before starting, make sure that the required toolsets are installed. On Windows, you currently need a Visual Studio 2017 install (we’re working on that). On Mac OS / Linux, the Mono tooling is required.
$ dotnet --info
.NET Command Line Tools (1.0.0-preview2-003121) Product Information:
Version: 1.0.0-preview2-003121
Commit SHA-1 hash: 1e9d529bc5 Runtime Environment:
OS Name: Mac OS X
OS Version: 10.10
OS Platform: Darwin
RID: osx.10.10-x64
执行命令出现错误
$ dotnet migrate
No executable found matching command "dotnet-migrate"
Note: If you get an error “No executable found matching command dotnet-migrate”, edit the solution’s global.json
file and change the SDK version to 1.1.0. The dotnet migrate
command requires .NET Core CLI RC3 or higher.
qiongyanzhudeMacBook-Pro:BeibeiBasic qiongyanzhu$ dotnet migrate Project BeibeiWeb.FlowUITest migration succeeded (/Users/qiongyanzhu/RiderProjects/BeibeiBasic/BeibeiWeb.FlowUITest). Project BeibeiWeb.FlowUI migration succeeded (/Users/qiongyanzhu/RiderProjects/BeibeiBasic/BeibeiWeb.FlowUI). Project BeibeiCore.Services migration succeeded (/Users/qiongyanzhu/RiderProjects/BeibeiBasic/BeibeiCore.Services). Project BeibeiCore.Utility migration succeeded (/Users/qiongyanzhu/RiderProjects/BeibeiBasic/BeibeiCore.Utility). Project BeibeiCore.EF.Test migration succeeded (/Users/qiongyanzhu/RiderProjects/BeibeiBasic/BeibeiCore.EF.Test). Project BeibeiCore.EF migration succeeded (/Users/qiongyanzhu/RiderProjects/BeibeiBasic/BeibeiCore.EF). Project BeibeiCore.Domain.P2P migration succeeded (/Users/qiongyanzhu/RiderProjects/BeibeiBasic/BeibeiCore.Domain.P2P). Project BeibeiCore.Component.IData migration succeeded (/Users/qiongyanzhu/RiderProjects/BeibeiBasic/BeibeiCore.Component.IData). Project BeibeiCore.ADO.Flow migration succeeded (/Users/qiongyanzhu/RiderProjects/BeibeiBasic/BeibeiCore.ADO.Flow). Project BeibeiBasic.Web migration succeeded (/Users/qiongyanzhu/RiderProjects/BeibeiBasic/BeibeiBasic.Web). Project BeibeiBasic.Services migration succeeded (/Users/qiongyanzhu/RiderProjects/BeibeiBasic/BeibeiBasic.Services). Project BeibeiBasic.Models migration succeeded (/Users/qiongyanzhu/RiderProjects/BeibeiBasic/BeibeiBasic.Models).
Summary
Total Projects: 12
Succeeded Projects: 12
Failed Projects: 0 The project migration has finished. Please visit https://aka.ms/coremigration to report any issues you've encountered or ask for help.
Files backed up to /Users/qiongyanzhu/RiderProjects/BeibeiBasic/backup/
qiongyanzhudeMacBook-Pro:BeibeiBasic qiongyanzhu$
Once finished, existing project.json
and .xproj
will be converted to .csproj
. Depending on the project type, Rider will automatically reload the solution after migration completes (worst case, you may have to close and re-open Rider).
Further details on migrating projects from project.json
to .csproj
can be found on Microsoft’s documentation site:
[.NET Core 24]把project.json迁移到.csproj的更多相关文章
- .NET Core项目从xproj+project.json向csproj迁移简介
3月7日,微软发布了Visual Studio 2017 RTM,与之一起发布的还有.NET Core Runtime 1.1.0以及.NET Core SDK 1.0.0,尽管这些并不是最新版,但也 ...
- .NET Core 构建配置文件从 project.json 到 .csproj
从 .NET Core SDK 1.0 Preview 3 build 004056 开始,.NET Core 弃用 project.json,回归 .csproj,主要原因是为了兼容 MSBuild ...
- [.NET Core 32]升级vs code之后,vs code无法调试net core web项目
错误提示&处理方法 参考链接:https://github.com/OmniSharp/omnisharp-vscode/issues/1742 错误:The .NET Core debugg ...
- Ubuntu-Docker[1]安装Docker,通过Docker部署net core代码,需要结合[.NET Core 18]发布、ASP.NET Core Docker部署
1)通过系统自带包安装 通过自带包安装,可能Docker版本较旧 $ sudo apt-get update Reading package lists... Done $ sudo apt-get ...
- .NET Core系列 : 2 、project.json 这葫芦里卖的什么药
.NET Core系列 : 1..NET Core 环境搭建和命令行CLI入门 介绍了.NET Core环境,本文介绍.NET Core中最重要的一个配置文件project.json的相关内容.我们可 ...
- [asp.net core]project.json(1)
摘要 前面介绍了使用vs2015新建asp.net core web的内容,这篇文章学习下project.json文件的内容. project.json 原文:https://docs.microso ...
- .NET Core 工具从 project.json 移动到基于 MSBuild 的项目后的使用
.NET Core 从preview 4 开始弃用project.json 可以从这下载最新版本: https://github.com/dotnet/cli 使用VS2017 RC新建.net co ...
- ASP.NET Core project.json imports 是什么意思?
示例代码: "frameworks": { "netcoreapp1.0.0": { "imports" : "portable- ...
- ASP.NET Core中的project.json何去何从?
Shawn Wildermuth (https://wildermuth.com/2016/05/12/The-Future-of-project-json-in-ASP-NET-Core) If y ...
随机推荐
- 00096_Properties类
1.Properties类介绍 (1)Properties 类表示了一个持久的属性集.Properties 可保存在流中或从流中加载.属性列表中每个键及其对应值都是一个字符串: (2)特点 Hasht ...
- ArcGIS教程:地理处理服务演示样例(河流网络)(三)
设置输出符号系统 步骤: 展开 StoweStreamNet.tbx 并双击创建河流网络模型. 接受默认的 45 公顷并单击确定以运行模型. StreamNet 图层将加入至 ArcMap. 右键单击 ...
- 全然用linux工作,放弃windows
按: 虽然我们已经不习惯看长篇大论, 但我还是要说, 这是一篇值得你从头读到尾的长篇文章. 2005年9月22日,清华在读博士生王垠在水木社区BLOG上发表了<清华梦的粉碎--写给清华大学的退学 ...
- 哈夫曼树的介绍 ---java实现
一. 什么是哈夫曼树 是一种带权路径长度最短的二叉树,也称最优二叉树 带权路径长度:WPL=(W1*L1+W2*L2+W3*L3+...+ Wn*Ln) N个权值Wi(i=1,2,...n)构 ...
- 使用 LaTeX 绘制 PGM(Probabilistic Graphical Models)中的贝叶斯网络(bayesian networks)
Software for drawing bayesian networks (graphical models) 这里需要调用 latex 中的绘图库:TikZ and PGF. 注意,下述 tex ...
- μC/OS中的任务就绪表
为了便于对就绪表的查找,μC/OSII又定义了一个数据类型为INT8U的变量OSRdyGrp, 并使该变量的每一位都对应OSRdyTbl[ ]的一个任务组(即数组的一个元素),如果某任务组中 有任务就 ...
- Eclipse手动配置svn
1.在Eclipse根目录下建一个任意文件夹(如plugin),在该文件夹下建一个以该插件名命名的文件夹(如SVN).2.将下载下的插件文件解压,plugins和features文件夹复制到该文件夹下 ...
- MWPhotoBrowser 属性详解 和代理解释
--------0.MWPhoto简单属性解释---------------- MWPhoto *photo = [MWPhoto photoWithURL:[NSURL URLWithString: ...
- WPF 支持分组互斥的 RadioButton 式单选菜单
扩展 MenuItem 为同组互斥的 RadioMenuItem,并且将对勾符号修改为圆点. http://stackoverflow.com/a/35692688/5972372 这个问题下还有其他 ...
- java——数组
数组是多个同样数据类型数组组合,当中数据类型是不论什么数据类型. 数组变量是引用类型变量,数组能够作为对象,数组中的每个元素相当于对象的成员变量,所以数组元素能够默认初始化.(博客java--变量分类 ...