MSBuild clean directory string
问题 I have a property in MSBuild to represent the directory above the MSBuildProjectDirectory: <PropertyGroup> <BuildDir>$(MSBuildProjectDirectory)\..</PRSBuildDir> </PropertyGroup> I need to then use this property, but I need the directory string cleaned so that it doesn't include the .. . In other words I need the .. evaluated, so that if the current project file is in C:\Test\Tom\MyDir , then I need a property containing the string C:\Test\Tom . The reason I'm asking is because I'm trying to