-
-
Notifications
You must be signed in to change notification settings - Fork 640
Description
What's your question?
I’m working on a game engine that includes both C++ and C# projects managed with Premake. On Linux, I use gmake instead of vs2022. C++ projects build fine with gmake and GCC, but I cannot get C# projects to build.
Premake generates Makefiles that reference the csc compiler directly. On my Ubuntu WSL setup, I’m not sure if this is expected behavior, or whether the recommended approach nowadays is to use dotnet build instead of invoking Roslyn (csc) directly.
If csc is the correct tool, am I missing something in my setup? I have dotnet available in my environment path, but csc is only accessible via:
dotnet $DOTNET_ROOT/sdk/9.0.305/Roslyn/bincore/csc.dll
Creating a bash alias for csc doesn’t seem to work with the generated Makefiles.
Anything else we should know?
- Is there a supported way to build .NET projects with Premake +
gmake? - Or is the typical workflow to split managed/native projects, using
vs2022for managed andgmakefor native builds? - Error I get when trying to build:
make[1]: csc: Not a directory
- Code snippet from the makefile:
ifeq ($(config),debug)
CSC = csc
RESGEN = resgen
// ...
$(TARGET): $(SOURCES) $(EMBEDFILES) $(DEPENDS) $(RESPONSE) | $(TARGETDIR)
$(PRELINKCMDS)
$(SILENT) $(CSC) /nologo /out:$@ $(FLAGS) $(REFERENCES) @$(RESPONSE) $(patsubst %,/resource:%,$(EMBEDFILES))
$(POSTBUILDCMDS)Any solutions, tips, or recommended practices would be very helpful.