Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)

like image 509
bevacqua Avatar asked Jun 21 '11 00:06

bevacqua


People also ask

How do I add post build event in Visual Studio to copy DLL?

To switch this on in visual studio, go to Tools/Options then scroll down the tree view to the section called Projects and Solutions, expand that and click on Build and Run, at the right their is a drop down that specify the build output verbosity, setting that to diagnostic, will show you what other macro values you ...

What is post build event command line?

Pre/Post build events are useful when we wish to perform some operations before/after a project is built. These operations are nothing but the Shell commands being used from the command line. Think of a scenario where we build our library project and its . dll is saved into the Project/bin/Release directory.


1 Answers

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

 <PropertyGroup>
    <PostBuildEvent>copy "$(TargetPath)" "$(SolutionDir)..\Shared.Lib\$(TargetFileName)"</PostBuildEvent>
  </PropertyGroup>
like image 99
joncham Avatar answered Oct 12 '22 13:10

joncham