Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here are 3 Targets that are helpful.</p> <p>WhereAmI is the one I use when trying to figure out my current directory of course. The others are informative as well. (Some beyond the scope of the question).</p> <pre><code>&lt;Target Name="WhereAmI"&gt; &lt;Message Text=" Here I Am " /&gt; &lt;Exec Command="dir ." /&gt; &lt;Message Text=" " /&gt; &lt;/Target&gt; &lt;Target Name="ShowReservedProperties" AfterTargets="BeforeBuild"&gt; &lt;Message Text=" MSBuildProjectDirectory = $(MSBuildProjectDirectory)" Importance="high" /&gt; &lt;Message Text=" MSBuildProjectFile = $(MSBuildProjectFile)" Importance="high" /&gt; &lt;Message Text=" MSBuildProjectExtension = $(MSBuildProjectExtension)" Importance="high" /&gt; &lt;Message Text=" MSBuildProjectFullPath = $(MSBuildProjectFullPath)" Importance="high" /&gt; &lt;Message Text=" MSBuildProjectName = $(MSBuildProjectName)" Importance="high" /&gt; &lt;Message Text=" MSBuildBinPath = $(MSBuildBinPath)" Importance="high" /&gt; &lt;Message Text=" MSBuildProjectDefaultTargets = $(MSBuildProjectDefaultTargets)" Importance="high" /&gt; &lt;Message Text=" MSBuildExtensionsPath = $(MSBuildExtensionsPath)" Importance="high" /&gt; &lt;Message Text=" MSBuildStartupDirectory = $(MSBuildStartupDirectory)" Importance="high"/&gt; &lt;/Target&gt; &lt;Target Name="ShowOtherProperties"&gt; &lt;Message Text=" " /&gt; &lt;Message Text=" " /&gt; &lt;Message Text=" Environment (SET) Variables* " /&gt; &lt;Message Text=" --------------------------- " /&gt; &lt;Message Text=" COMPUTERNAME = *$(COMPUTERNAME)* " /&gt; &lt;Message Text=" USERDNSDOMAIN = *$(USERDNSDOMAIN)* " /&gt; &lt;Message Text=" USERDOMAIN = *$(USERDOMAIN)* " /&gt; &lt;Message Text=" USERNAME = *$(USERNAME)* " /&gt; &lt;/Target&gt; </code></pre> <p>If you're using an "external msbuild file" and need to pass a filename or path to it (because external msbuild files do not like relative files if they are not in the same directory as the calling .msbuild file)....here is a convenient (3.5 and up I believe) Task.</p> <pre><code> &lt;ConvertToAbsolutePath Paths="..\"&gt; &lt;!-- Some relative path here --&gt; &lt;Output TaskParameter="AbsolutePaths" PropertyName="MyAbsolutionPathProperty"/&gt; &lt;/ConvertToAbsolutePath&gt; &lt;Message Text="'MyAbsolutionPathProperty' = '$(MyAbsolutionPathProperty)'" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload