Skip to content

Commit

Permalink
Document that Solution variables are only available sometimes (#242)
Browse files Browse the repository at this point in the history
You can only use Solution variables if you pass a .sln file to msbuild.
  • Loading branch information
BryanCrotaz authored Nov 1, 2023
1 parent 3d9f1b7 commit afd3b55
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Docusaurus/docs/tools/msbuild.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ The WiX MSBuild targets create a number of preprocessor variables for each refer
| _ProjectName_.TargetName | $(MyProject.TargetName) | MyProject |
| _ProjectName_.TargetPath | $(MyProject.TargetPath) | C:\source\repos\ConsoleApp42\bin\Release\MyProject.exe |
| _ProjectName_.Culture.TargetPath | $(MyProject.en-US.TargetPath) | C:\source\repos\ConsoleApp42\bin\Release\en-US\MyProject.msi |

The above variables are always available. The below variables are only available if you pass a `.sln` file to msbuild, but not if you build an individual project in the solution.

| Variable | Example | Example value |
| -------- | ------- | ------------- |
| SolutionDir | $(SolutionDir) | C:\source\repos\MySolution\ |
| SolutionExt | $(SolutionExt) | .sln |
| SolutionFileName | $(SolutionFileName) | MySolution.sln |
Expand Down

0 comments on commit afd3b55

Please sign in to comment.