Directory.Build.props (5 lines of code) (raw):

<Project> <PropertyGroup> <BaseIntermediateOutputPath>$(MSBuildProjectDirectory)\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> </PropertyGroup> </Project>