VS Post Build Event, copy one level above solution folder?

bevacqua picture bevacqua · Jun 21, 2011 · Viewed 16.9k times · Source

I currently have

  <PropertyGroup>
    <PostBuildEvent>copy "$(TargetPath)" "$(SolutionDir)Shared.Lib\$(TargetFileName)"</PostBuildEvent>
  </PropertyGroup>

I want to do something like this, but one level above $(SolutionDir)

Answer

joncham picture joncham · Jun 21, 2011

You can use ..\ to move up a directory.

 <PropertyGroup>
    <PostBuildEvent>copy "$(TargetPath)" "$(SolutionDir)..\Shared.Lib\$(TargetFileName)"</PostBuildEvent>
  </PropertyGroup>