Git Product home page Git Product logo

Comments (1)

sayedihashimi avatar sayedihashimi commented on August 14, 2024

OK I've added a new function Get-MSBuildReservedProperties for this. When it is invoked it will write out the following msbuild file to a temp dir if it doesn't exist.

<Project ToolsVersion="4.0" DefaultTargets="PrintValues" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <Target Name="PrintValues">
    <Message Text="MSBuild:                        $(MSBuild)"/>
    <Message Text="MSBuildBinPath:                 $(MSBuildBinPath)"/>
    <Message Text="MSBuildExtensionsPath:          $(MSBuildExtensionsPath)"/>
    <Message Text="MSBuildExtensionsPath32:        $(MSBuildExtensionsPath32)"/>
    <Message Text="MSBuildExtensionsPath64:        $(MSBuildExtensionsPath64)"/>
    <Message Text="MSBuildLastTaskResult:          $(MSBuildLastTaskResult)"/>
    <Message Text="MSBuildNodeCount:               $(MSBuildNodeCount)"/>
    <Message Text="MSBuildOverrideTasksPath:       $(MSBuildOverrideTasksPath)"/>
    <Message Text="MSBuildProgramFiles32:          $(MSBuildProgramFiles32)"/>
    <Message Text="MSBuildProjectDefaultTargets:   $(MSBuildProjectDefaultTargets)"/>
    <Message Text="MSBuildProjectDirectory:        $(MSBuildProjectDirectory)"/>
    <Message Text="MSBuildProjectDirectoryNoRoot:  $(MSBuildProjectDirectoryNoRoot)"/>
    <Message Text="MSBuildProjectExtension:        $(MSBuildProjectExtension)"/>
    <Message Text="MSBuildProjectFile:             $(MSBuildProjectFile)"/>
    <Message Text="MSBuildProjectFullPath:         $(MSBuildProjectFullPath)"/>
    <Message Text="MSBuildProjectName:             $(MSBuildProjectName)"/>
    <Message Text="MSBuildStartupDirectory:        $(MSBuildStartupDirectory)"/>
    <Message Text="MSBuildThisFile:                $(MSBuildThisFile)"/>
    <Message Text="MSBuildThisFileDirectory:       $(MSBuildThisFileDirectory)"/>
    <Message Text="MSBuildThisFileDirectoryNoRoot: $(MSBuildThisFileDirectoryNoRoot)"/>
    <Message Text="MSBuildThisFileExtension:       $(MSBuildThisFileExtension)"/>
    <Message Text="MSBuildThisFileFullPath:        $(MSBuildThisFileFullPath)"/>
    <Message Text="MSBuildThisFileName:            $(MSBuildThisFileName)"/>
    <Message Text="MSBuildToolsPath:               $(MSBuildToolsPath)"/>
    <Message Text="MSBuildToolsVersion:            $(MSBuildToolsVersion)"/>
  </Target>

</Project>

Then it will call msbuild.exe on this file. The result is shown in the image below.
get-reservedprops

from psbuild.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.