C# preprocessor directive symbols from the dotnet build command line via DefineConstants

added by DotNetKicks
9/1/2020 5:03:40 PM

258 Views

Invoking the C# compiler directly allows one to pass in symbols for the preprocessor via a command option (-define or -d). But it's not at all obvious how to do this with the dotnet build command. There is no 'define' flag, so how do you do it?


0 comments