ASP.NET Core 1.1 Cannot Publish Application

I am trying to run a simple dotnet publish command dotnet publish that I can compile my web application on my Linux server. He tells me that my project.json missing.

Before you answer, there have been some recent changes below that you should consider. Correct me if I am wrong, but I do not need project.json , because my web application is a higher version that does not require this:

I am currently working on ASP.NET Core 1.1 and .NET Core 1.1. As I in November 2016, they discounted project.json in favor of project.csproj , so projects created in Visual Studio 2017 will no longer generate this file anymore.


ASP.NET Core 1.0 uses project.json
ASP.NET Core 1.1 uses project.csproj

How I created a web application project:

  • Visual Studio 2017 RC
  • ASP.NET Core 1.1 (web application)
  • .NET Core 1.1

I only showed how I created my project, because it shows people I do not need dotnet migrate in 1.1, since the project never started as project 1.0

Locally, my project works fine, it restores , it publishes it runs . It executes all the useful dotnet commands that should run perfectly.

More specific question :
On a linux server with the latest dotnet --version running dotnet publish , a project.json error message appears. Why does the latest version of .NET Core (1.1) require project.json when it is clearly depreciating in version 1.1 and should look for .csproj instead?

+6
source share
1 answer

While we are in this crossover, where project.json is being replaced by .csproj , there are two versions of the SDK. There is another version of the SDK based on project.json for v1.1, and you must install this on your Linux server.

This mess should go away very soon (with the release of VS2017 in about a week) when the tool goes into RTM. From now on, everything will be .csproj and project.json completely out of date.

+5
source

Source: https://habr.com/ru/post/1015305/