I would like to set the $(OutDir) for certain projects in a Directory.Build.props. All projects have the common feature that they become executables (e.g. Microsoft.NET.Sdk.Worker, Microsoft.NET.Sdk.Web or ConsoleApplication with Microsoft.NET.Sdk and OutputType ‘Exe’).
How can I distinguish these project types from others (Library, UnitTest, etc.) in a condition?
I’ve already tried $(OutputType), but this is not set in Directory.Build.props. In Directory.Build.targets, the $(OutputType) is set, but it’s to late to set $(OutDir).
I’ve also found $(UsingMicrosoftNETSdkWeb), but there is no $(UsingMicrosoftNETSdkWorker) and the ConsoleApplication has the same SDK as the library (Microsoft.NET.Sdk).