News for hackers. Stuff that matters.
Re:Bflat: C# as you know it but with Go-like tooling by pjc50 on Friday June 25, 2021 @06:00PM (#27636788)
C# native interop is very, very nice.

However, the build/package system for this is still a complete mess if you want to target more than one architecture; I've spent much of the week looking at the question of how to make cross-platform assembly A depend on platform-specific assembly B, where B is one of B-win or B-mac, and it seems to require carefully hand building B into a nuget package.

I'm coming to appreciate msbuild, though. Or maybe that's Stockholm syndrome.

Re:Bflat: C# as you know it but with Go-like tooling by guhidalg on Friday June 25, 2021 @06:37PM (#27637107)
I second MSBuild as one of the best build systems I’ve had to work with. It absolutely has a learning curve but once you “get” how projects are evaluated and executed then you can start writing your own targets to do whatever you want.
Re:Bflat: C# as you know it but with Go-like tooling by R0b0t1 on Friday June 25, 2021 @08:07PM (#27637766)
MSBuild is very poorly documented. MSBuild is really not that good compared to what you get in FOSS land. I favor CMake over it, and personally I very much dislike CMake. The main thing in favor of CMake is you get cross platform.
Re:Bflat: C# as you know it but with Go-like tooling by pjc50 on Friday June 25, 2021 @11:20PM (#27638766)
The "core" of msbuild - targers, items, properties - is well documented. The actual work in normal cases is done by the vast hinterland of pre defined targets, and it's those that are badly documented. I've wasted several days reverse engineering 'ProjectReference' and only just found its detailed documentation. Fortunately you can read the source; unfortunately when you have to.

I think making it open source has come with a cultural change that's still propagating. It means not just defining the "Microsoft way" to do things but coping with myriad use cases turning up in the issue tracker.

Re:Bflat: C# as you know it but with Go-like tooling by eyegor on Saturday June 26, 2021 @01:58AM (#27639515)
If you think the "core" is well documented, link me the documentation which lays out all the built in targets involved in a standard c# project. Or even just a doc which describes the differences between PreBuildEvent, BeforeBuild, BeforeCompile, etc. As far as I can tell, this only exists as occasional comments in the .targets file. Msbuild documentation is horrible, without exception. When they occasionally document something it tends to miss half the optional flags and they never link the source code so it's up to you to find and correct it.
Re:Bflat: C# as you know it but with Go-like tooling by R0b0t1 on Saturday June 26, 2021 @04:13PM (#27645403)
This is exactly what I"m talking about, usually I have to have Visual Studio generate a project file and see what it did.

Using XML as a general purpose programming language is also very ick.

Re:Bflat: C# as you know it but with Go-like tooling by mjul on Saturday June 26, 2021 @03:56AM (#27640027)
You can write your build scripts in F# with the excellent Fake library or Cake for a similar C# DSL.

It gives you the same IDE experience for your build scripts and your code including REPL for experiments and a debugger when needed.

since it is .NET Core they are as cross platform as your other code.

Re:Bflat: C# as you know it but with Go-like tooling by Akronymus on Saturday June 26, 2021 @04:40AM (#27640234)
I personally really like FAKE for anything .net builds.
Re:Bflat: C# as you know it but with Go-like tooling by pjmlp on Saturday June 26, 2021 @02:40AM (#27639697)
> C# native interop is very, very nice.

Actually it was already there in J++, and now we have Oracle trying to add back what Sun killed in 2000, with keeping 26 years of history running, it is ironic how some things turn around.

Re:Bflat: C# as you know it but with Go-like tooling by CobsterLock on Saturday June 26, 2021 @01:52AM (#27639487)
the new slim SDK style csproj and the dotnet command replacement (maybe wrapper) for msbuild are great addition to come with .NET Core a while back. I think MSBuild and nuget are great compared to my experiences with linux rpm libwhatever or npm. I have worked on some moderately sized code bases (10s not 100s of projects in a solutions) and compile times stayed fairly reasonable.

I think the big downside is that the industry still thinks of .NET as stuck in .NET 2.0 or something, from my casual browsing that .NET is a skill not C#. Regardless, I'm getting kind of excited for .NET 6 on official release, and doing the migration of all our apps off framework to the latest and getting some getting the new lang version.

Re:Bflat: C# as you know it but with Go-like tooling by pjmlp on Saturday June 26, 2021 @02:44AM (#27639713)
I would also be excited, unfortunely in what concerns Web development we never do everything from scratch, rather build on top of Sitecore, SharePoint, Dynamics, while destop stuff always ends up having some 3rd party commercial components like Telerik, ComponentOne, Office or VS Plugins,...
Re:Bflat: C# as you know it but with Go-like tooling by eitland on Saturday June 26, 2021 @04:33AM (#27640196)
I don't know if by we you mean us C# users or the people you work with.

If it is the former I can say that I never ever built on top of Sitecore or SharePoint. Recently only Asp.NET Core or whatever it is called now.

Re:Bflat: C# as you know it but with Go-like tooling by pjmlp on Saturday June 26, 2021 @04:49AM (#27640284)
Naturally us, the clients I work with.