mirror of
https://github.com/microsoft/setup-msbuild.git
synced 2024-11-22 11:31:07 +07:00
parent
f05df80b32
commit
bb70c6a023
@ -5,7 +5,7 @@ You know how handy that 'Visual Studio Developer Command Prompt' is on your loca
|
||||
|
||||
```
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.0.0
|
||||
uses: microsoft/setup-msbuild@v1.0.1
|
||||
```
|
||||
|
||||
## Specifying specific versions of Visual Studio
|
||||
@ -13,7 +13,7 @@ You may have a situation where your Actions runner has multiple versions of Visu
|
||||
|
||||
```
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.0.0
|
||||
uses: microsoft/setup-msbuild@v1.0.1
|
||||
with:
|
||||
vs-version: [16.4,16.5]
|
||||
```
|
||||
@ -23,7 +23,7 @@ This makes use of the vswhere tool which is a tool is delivered by Microsoft to
|
||||
|
||||
```
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.0.0
|
||||
uses: microsoft/setup-msbuild@v1.0.1
|
||||
with:
|
||||
vswhere-path: 'C:\path\to\your\tools\'
|
||||
```
|
||||
|
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -979,7 +979,7 @@ const VS_VERSION = core.getInput('vs-version') || 'latest';
|
||||
const VSWHERE_PATH = core.getInput('vswhere-path') ||
|
||||
path.join(process.env['ProgramFiles(x86)'], 'Microsoft Visual Studio\\Installer');
|
||||
// if a specific version of VS is requested
|
||||
let VSWHERE_EXEC = '';
|
||||
let VSWHERE_EXEC = '-products * -requires Microsoft.Component.MSBuild ';
|
||||
if (VS_VERSION === 'latest') {
|
||||
VSWHERE_EXEC += '-latest ';
|
||||
}
|
||||
@ -987,7 +987,7 @@ else {
|
||||
VSWHERE_EXEC += `-version ${VS_VERSION} `;
|
||||
}
|
||||
VSWHERE_EXEC +=
|
||||
'-requires Microsoft.Component.MSBuild -find MSBuild\\**\\Bin\\MSBuild.exe';
|
||||
'-find MSBuild\\**\\Bin\\MSBuild.exe';
|
||||
core.debug(`Execution arguments: ${VSWHERE_EXEC}`);
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "setup-msbuild",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "setup-msbuild",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"private": true,
|
||||
"description": "Helps set up specific MSBuild tool into PATH for later usage.",
|
||||
"main": "lib/main.js",
|
||||
|
@ -14,14 +14,13 @@ const VSWHERE_PATH =
|
||||
)
|
||||
|
||||
// if a specific version of VS is requested
|
||||
let VSWHERE_EXEC = ''
|
||||
let VSWHERE_EXEC = '-products * -requires Microsoft.Component.MSBuild '
|
||||
if (VS_VERSION === 'latest') {
|
||||
VSWHERE_EXEC += '-latest '
|
||||
} else {
|
||||
VSWHERE_EXEC += `-version ${VS_VERSION} `
|
||||
}
|
||||
VSWHERE_EXEC +=
|
||||
'-requires Microsoft.Component.MSBuild -find MSBuild\\**\\Bin\\MSBuild.exe'
|
||||
VSWHERE_EXEC += '-find MSBuild\\**\\Bin\\MSBuild.exe'
|
||||
|
||||
core.debug(`Execution arguments: ${VSWHERE_EXEC}`)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user