Draco-lang / Language-suggestions

Collecting ideas for a new .NET language that could replace C#
75 stars 5 forks source link

Project Structure #82

Open Binto86 opened 2 years ago

Binto86 commented 2 years ago

This issue should lay out how Fresh projects will be structured. This issue is related to module system issue (#58)

Application Entry Point

For projects that compile to .exe, the entry point of the aplication would be in file called main.fr, which will be in the same folder as project file and this file will contain main method, which would be the entry point.

Module Root Folder

The location of module root folder will be specified in project file, by defalut it would be the same folder as project file.

Bin and Obj folder

Bin and Obj folder will be under output folder, which will be under the folder containig the project file.

jl0pd commented 2 years ago

Bin and Obj folder will be under output folder, which will be under the folder containig the project file.

By default all dotnet projects have output stored in bin/obj near project file. If someone wants to change this behavior, it can be configured inside project file. It's quite common to have Directory.Build.props in root of solution with something like

  <PropertyGroup>
    <BaseOutputPath>$(MSBuildThisFileDirectory)artifacts/bin/$(MSBuildProjectName)</BaseOutputPath>
    <BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)artifacts/obj/$(MSBuildProjectName)</BaseIntermediateOutputPath>
  </PropertyGroup>

I don't think this behavior should be overridden by language