Use custom paramter passed in "dotnet build" command

babak fakhriloo 41 Reputation points
2021-07-16T15:25:42.16+00:00

I am trying to find a custom parameter when running "dotnet build" as below :

dotnet build -- -customParam Value

However I do not know how can I access the "customParam" inside a csproject of the solution ?

Like :

<Target Condition="'CustomParam==Value'" >

<Target />
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
326 questions
0 comments No comments
{count} votes