I'm trying to run a simple dotnet publish
command so I can compile my web application on my linux server. It tells me that my project.json
is missing.
Before you answer, there have been some recent changes below you should consider. Correct me if I'm wrong but I don't need project.json
because my web application is a higher version that doesn't require it:
I'm currently running on ASP.NET Core 1.1 and .NET Core 1.1. As I am aware in November 2016 they depreciated
project.json
in favor ofproject.csproj
so projects created in Visual Studio 2017 will no longer generate this file any longer.
ASP.NET Core 1.0 usesproject.json
ASP.NET Core 1.1 usesproject.csproj
How I created my web application project:
I only displayed how I created my project because it shows people I don't need to
dotnet migrate
into 1.1 since the project never begun as a 1.0 project
Locally my project runs fine, it restores
, it publishes
it runs
. It does all the fun things dotnet
commands should do perfectly fine.
The more specific question:
On a linux server with the latest dotnet --version
running dotnet publish
gives me the error saying project.json
is required. Why does the latest version of .NET Core (1.1) require project.json
when clearly its depreciated in version 1.1 and should be looking for .csproj
instead?
While we're in this crossover period where project.json
is being replaced by .csproj
, there are two versions of the SDK. There is still a version of the SDK based around project.json
for v1.1, and you must have that installed on your linux server.
This mess should be going away very soon (with the release of VS2017 in roughly a week's time) when the tooling goes to RTM. From that point onwards everything will be .csproj
based and project.json
is fully deprecated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With