News for hackers. Stuff that matters.
Re:C# 11 Preview Updates – Raw string literals, UTF-8 and more by christophilus on Sunday May 22, 2022 @08:13AM (#31467278)
For me, another gripe is: “Why do I have to manage a csproj file?”
Re:C# 11 Preview Updates – Raw string literals, UTF-8 and more by codeflo on Sunday May 22, 2022 @08:17AM (#31467321)
That’s one of the things that tangibly improved IMO: they removed the file list, so except still being ugly XML, the csproj is now very comparable to package.json or Cargo.toml.
Re:C# 11 Preview Updates – Raw string literals, UTF-8 and more by philliphaydon on Sunday May 22, 2022 @08:53AM (#31467605)
A lot… A LOT better than package.json…

And can be edited without unloading the project first.

Re:C# 11 Preview Updates – Raw string literals, UTF-8 and more by codeflo on Sunday May 22, 2022 @10:14AM (#31468379)
Better in what sense? Syntax aside, I don’t see a substantial difference in terms of file content. I do see a substantial difference in terms of tool capabilities (like .NET/NuGet’s inability to resolve conflicting diamond dependencies).
Re:C# 11 Preview Updates – Raw string literals, UTF-8 and more by GiorgioG on Sunday May 22, 2022 @10:58AM (#31468891)
As much as I'm not a fan of the XML based project files, the csproj format is much more flexible/capable than package.json files. For example, you may want to have different versions of a package reference based on some condition. Would it be better w/JSON than XML? I think it's a toss-up.
Re:C# 11 Preview Updates – Raw string literals, UTF-8 and more by codeflo on Sunday May 22, 2022 @12:12PM (#31469694)
That’s a good point. Rust’s cargo files have that feature as well. And I agree that surface syntax isn’t the main issue.
Re:C# 11 Preview Updates – Raw string literals, UTF-8 and more by fomine3 on Monday May 23, 2022 @01:43AM (#31475666)
Lack of comment is a serious flaw for package.json syntax.
Re:C# 11 Preview Updates – Raw string literals, UTF-8 and more by jayd16 on Sunday May 22, 2022 @09:38AM (#31468066)
Csproj is one of the better build config setups, I'd say. In practice, the IDE handles it all if you want. What would you prefer instead?
Re:C# 11 Preview Updates – Raw string literals, UTF-8 and more by aayjaychan on Sunday May 22, 2022 @11:44AM (#31469378)
csproj is fine these days. sln on the other hand...