title: Different PrepublishScript for different publish profiles
body: <p>I have an asp.net core web appication (Visual Studio 2017) and in the .csproj file there is a PrepublishScript Target that is being executed when (before) I publish the application to a location.</p>
  
  <p>I have two different publish profiles, each one publishing the application to a different location and with different settings.</p>
  
  <p>How can I have different PrepublishScript Targets for each publish profile (or at least have conditional execution in this target depending on the publish profile I am publishing)? I don't want to execute the same steps for all publish profiles.</p>
  
  <p>Is there a way to set a variable from each publish profile, that can be read from msbuild and execute tasks conditionally depending on that value?</p>