bflattened / bflat

C# as you know it but with Go-inspired tooling (small, selfcontained, and native executables)
GNU Affero General Public License v3.0
3.63k stars 104 forks source link

we need some sort of project and solution structure #74

Closed Shadowblitz16 closed 1 year ago

Shadowblitz16 commented 1 year ago

We need some sort of project and solution structure whether that be csproj files and sln files or just json or toml. Part of what makes C# so great is it's build system, it's easy. Calling bflat compiler or making sh/bat script really isn't going to do it.

MichalStrehovsky commented 1 year ago

bflat is just a compiler, not a build system.

sh/bat scripts is the low tech approach. You can use Makefiles if you want something more higher tech. You can even drive it from MSBuild if you want - bflat itself is built with MSBuild+bflat combination:

https://github.com/bflattened/bflat/blob/200c770c4ad1bfc0030728190848632e1156cac6/src/bflat/bflat.csproj#L200-L216

It collects all the Compile items (those are the source C# files), then collects all the RuntimeCopyLocalItems (those are typically NuGets) and runs bflat (here it uses RunCommand because this is the project that builds the first bflat hosted on top of dotnet first, and then rebuilds it ).

Defining the build system is out of scope of a compiler.