Skip to content

Commit

Permalink
Document that Solution variables are only available sometimes
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 and not if you build an individual project in the solution
  • Loading branch information
BryanCrotaz authored Oct 31, 2023
1 parent d54bc38 commit f0c11d8
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.

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

0 comments on commit f0c11d8

Please sign in to comment.