Is project.json deprecated?
Asked Answered
E

1

20

Is project.json going away and web.config coming back in ASP.NET Core 1.0?

In the roadmap document, the update in '16 Q4 or '17 Q1, they mention "replacing .xproj/project.json with .csproj/MSBuild".

Does that mark the end of project.json?

Equanimous answered 23/7, 2016 at 0:28 Comment(0)
C
30

Update: As of Visual Studio 2017 and the latest dotnet CLI, project.json is officially dead. Visual Studio will migrate projects automatically, and there is a comparison chart here: https://learn.microsoft.com/en-us/dotnet/articles/core/tools/project-json-to-csproj

project.json is indeed going away. As part of a future update to the .NET Core tooling, .xproj/project.json will be merged back into .csproj. However, the team has stated:

The new MSBuild will not have a complete list of every file, so that should reduce the size of the build file. It will still be XML, but the team is committed to making that experience better for all .NET projects. This will be an enhanced MSBuild that has all of the best parts of project.json

So, project.json will be deprecated, but some of the innovations such as auto-discovery of source files will stick around. They've also committed to improving the MSBuild experience given that many people voiced their opinion about this change.

web.config is a different thing entirely. It's used when hosting ASP.NET Core projects on IIS, but otherwise is not required.

Clippard answered 23/7, 2016 at 0:42 Comment(10)
What a shame that they're going back to XMLEquanimous
@Equanimous Yeah, I liked project.json too. I'm hopeful that they'll deliver on their promise to keep most of the best parts around.Clippard
Choice between JSON and XML is largely a matter of (bad) taste. XML is verbose and JSON lacks comments; pick your poison. Another reference for the project.json deprecation is blogs.msdn.microsoft.com/dotnet/2016/05/23/…Ionize
@NateBarbettini will it be deprecated for all kind of projects? eg. NetStandard projects or only .NET Core? Nuget 3.x supports project.json, will they stop supporting it? Are there any chances that project.json will just replace packages.config? I can't find any resource.Jeanelle
@Jeanelle According to the .NET team, project.json will be completely deprecated for all project types. blogs.msdn.microsoft.com/dotnet/2016/05/23/…Clippard
I'm getting an error from CocosCreator saying the project.json is invalid, is this why? And if so, how I can I fix that?Correctitude
@Correctitude That's different enough that you should ask a separate question.Clippard
@Equanimous Why? XML is far more powerful than JSON and can contain comments, making it much more readable (if you don't put a load of complex unnecessary stuff in there of course). The desire to switch to JSON seems to be nothing more than a fad with no real rationale behind it.Cusped
@Cusped Why do you think XML is far more powerful than JSON? What can you do with it that you can’t do with JSON? My primary reason for not liking it is its verbosity.Equanimous
It's not that verbose. The only slightly verbose thing about it is the surrounding tags. It's more powerful, I'd say, primarily because of attributes. Yeah you can do the equivalent with JSON (for example JDT instead of XDT, although JDT transforms aren't as powerful) but it doesn't look so good. You can represent data as 1s and 0s if you want. I think XML gives a good balance of expressiveness and readability. I grant you that MS have made some REALLY ugly XML in the past like those horrible complex WCF configurations, but that's not an inherent problem with XML.Cusped

© 2022 - 2024 — McMap. All rights reserved.