Skip to content

Add support for c sharp (dotnet core, etc) #1539

@1bardesign

Description

@1bardesign

Problem Description

C# .cs files (for dotnet core or other C# tooling) are reported as unrecognised:

[max@hostname example]$ xmake
error: unknown source file: dotnet-project/Program.cs

Solution

.cs files should be recognised as C# and built with whatever installed tooling. dotnet core is likely to be lowest friction for xmake as it can be run directly from the commandline.

Alternative

Currently I build the dotnet project separately and have a script to put all the build artefacts in the right spot. This sucks compared to just running xmake.

Additional context

I'm not totally sure how add_deps etc should be handled. Ideally native dependencies from the same project would be put somewhere that the C# project can find it with [DllImport ("libname")], and similar - this works remarkably well with c/cpp currently :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions