Last active
June 21, 2024 06:47
-
-
Save feO2x/2c81a218b1e841371adb69fb4836a865 to your computer and use it in GitHub Desktop.
Cleanly integrate .props file from parent directory in MSBuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<PropertyGroup> | |
<ParentPropsFile>$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))</ParentPropsFile> | |
</PropertyGroup> | |
<Import Project="$(ParentPropsFile)" /> | |
<!-- Other property and item groups in thie file --> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gist shows how to cleanly integrate a Directory.Build.props file from the parent directory into the current one (especially without Rider placing squiggly lines all over the place).