8000 Adding runner image doc note [skip ci] · microsoft/setup-msbuild@3404ff3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3404ff3

Browse files
committed
Adding runner image doc note [skip ci]
1 parent 1ff5705 commit 3404ff3

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# microsoft/setup-msbuild
2+
23
This action will help discover where the `MSBuild` tool is and automatically add it to the `PATH` environment variables for you so future steps in your Actions workflow can just initiate `msbuild` commands without knowing the full path.
34

45
> Please note this tool does NOT add other Visual Studio tools (like VSTest, cl, cmake, or others) to `PATH`
@@ -13,10 +14,16 @@ This action will help discover where the `MSBuild` tool is and automatically add
1314
run: msbuild src\YourProjectFile.csproj -t:rebuild -verbosity:diag -property:Configuration=Release
1415
```
1516
17+
## Runners and included software
18+
19+
This action is intended to be used within the GitHub Actions workflows using the model of 'runners' either hosted (provided by GitHub) or self-hosted (provided by you). The version and parameters you specify below are going to be scoped to what software actually exists on the runner image being used. For example, hosted runner images from GitHub typically do NOT have pre-release versions of Visual Studio on them so using `vs-prerelease` parameter noted below may not have intended effect when using hosted runners. The software included for GitHub-hosted runner iamges can always be found here: <https://github.com/actions/runner-images> which also includes information on when/how software on hosted images gets updated.
20+
1621
## Optional Parameters
22+
1723
There are a few additional parameters that can be set if you need them. These are optional and should only be set if you know that you need them or what you are doing.
1824

1925
### Specifying specific versions of Visual Studio (optional)
26+
2027
You may have a situation where your Actions runner has multiple versions of Visual Studio and you need to find a specific version of the tool. Simply add the `vs-version` input to specify the range of versions to find. If looking for a specific version, specify the minimum and maximum versions as shown in the example below, which will look for just 16.4.
2128

2229
```yml
@@ -29,6 +36,7 @@ You may have a situation where your Actions runner has multiple versions of Visu
2936
The syntax is the same used for Visual Studio extensions, where square brackets like "[" mean inclusive, and parenthesis like "(" mean exclusive. A comma is always required, but eliding the minimum version looks for all older versions and eliding the maximum version looks for all newer versions. See the [vswhere wiki](https://github.com/microsoft/vswhere/wiki) for more details.
3037

3138
### Use pre-release versions of Visual Studio (optional)
39+
3240
If you need your Actions runner to target a pre-release version of Visual Studio, simply add the `vs-prerelease` input. This is necessary if you want to run an action on a virtual environment that contains a pre-release version of Visual Studio or self-hosted images that you may have that also have pre-release versions of Visual Studio installed.
3341

3442
```yml
@@ -39,6 +47,7 @@ If you need your Actions runner to target a pre-release version of Visual Studio
3947
```
4048

4149
### Specifying MSBuild architecture (optional)
50+
4251
By default the action will use the x86 architecture for MSBuild, but it is possible to target the x64 versions instead. Simply add the `msbuild-architecture` input. Valid input values are `x86` (default), `x64`, and `arm64`. Note that the success of these will rely on the runner OS.
4352

4453
```yml
@@ -49,6 +58,7 @@ By default the action will use the x86 architecture for MSBuild, but it is possi
4958
```
5059

5160
## How does this work?
61+
5262
This makes use of the vswhere tool which is a tool delivered by Microsoft to help in identifying Visual Studio installs and various components. This tool is installed on the hosted Windows runners for GitHub Actions. If you are using a self-hosted runner, you either need to make sure vswhere.exe is in your agent's PATH or specify a full path to the location using:
5363

5464
```yml
@@ -59,9 +69,11 @@ This makes use of the vswhere tool which is a tool delivered by Microsoft to hel
5969
```
6070

6171
## Notes on arguments
72+
6273
While the Action enables you to specify a `vswhere` path as well as a `vs-version`, these are more advanced options and when using GitHub-hosted runners you should not need these and is recommended you don't specify them as they are optional. Using these require you to fully understand the runner environment, updates to the tools on the runner, and can cause failures if you are out of sync. For GitHub-hosted runners, omitting these arguments is the preferred usage.
6374

6475
## Building this repo
76+
6577
As with most GitHub Actions, this requires NodeJS development tools. After installing NodeJS, you can build this by executing:
6678

6779
```bash
@@ -73,13 +85,14 @@ npm run pack
7385
which will modify/create the /dist folder with the final index.js output
7486

7587
# Credits
88+
7689
Thank you to [Warren Buckley](https://github.com/warrenbuckley) for being a core contributor to this Action for the benefit of all developers!
7790

7891
# Contributing
7992

8093
This project welcomes contributions and suggestions. Most contributions require you to agree to a
8194
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
82-
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
95+
the rights to use your contribution. For details, visit <https://cla.opensource.microsoft.com>.
8396

8497
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
8598
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions

0 commit comments

Comments
 (0)
0