I have to extend an in-house build system to compile C# files targeting .Net Core 3.
As of now, the system is capable of processing source sets, references, and lib directories, where it generates the following command:
"C:\Program Files\dotnet\dotnet.exe" exec "C:/Program Files/dotnet/sdk/3.1.300/Roslyn/bincore/csc.dll" -nologo -target:library "-lib:C:/Program Files/dotnet/shared/Microsoft.NETCore.App/3.1.4" -r:netstandard.dll C:/Users/kirsch/Documents/Repositories/ComplexProject/lib/csharp/native/VeryComplexLogic.cs -out:C:/Users/kirsch/Documents/Repositories/ComplexProject/default/ComplexProject.net.626a237a/ComplexProject.net.dll
Sadly, this fails with the following error:
error CS0518: Predefined type 'System.Object' is not defined or imported
I tried to search for a solution. The proposed solutions either suggested something, that was not related (like deleting some generated directory), or suggested to add references. Pursuing the latter, I added the following references:
- netstandard.dll
- mscorlib.dll
- System.dll
- System.Core.dll
Referencing these did, however, not solve the problem.
To conclude my question: Which reference am I missing?
If it's not a reference, what else am I missing then?