mirror of
https://github.com/microsoft/setup-msbuild.git
synced 2026-10-05 16:44:15 +07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ac47c7e8a |
No files matched your search
@@ -22,7 +22,7 @@ jobs:
|
||||
- windows-2025-vs2026
|
||||
runs-on: ${{ matrix.runner }}
|
||||
steps:
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup MSBuild (vswhere-path)
|
||||
id: setup_msbuild_explicit
|
||||
|
||||
Vendored
+1
-18
@@ -114,30 +114,13 @@ function run() {
|
||||
core.setFailed('Unable to find MSBuild.');
|
||||
return;
|
||||
}
|
||||
core.info(`Found MSBuild tool path: ${foundToolPath}`);
|
||||
core.info(`Using MSBuild architecture: ${MSBUILD_ARCH}`);
|
||||
// try to get the MSBuild version for diagnostic purposes; a failure here shouldn't fail the action
|
||||
try {
|
||||
let msbuildVersion = '';
|
||||
const versionOptions = {};
|
||||
versionOptions.listeners = {
|
||||
stdout: (data) => {
|
||||
msbuildVersion += data.toString();
|
||||
}
|
||||
};
|
||||
yield exec.exec(`"${foundToolPath}" -version -nologo`, [], versionOptions);
|
||||
core.info(`Found MSBuild version: ${msbuildVersion.trim()}`);
|
||||
}
|
||||
catch (error) {
|
||||
core.debug(`Unable to determine MSBuild version: ${error.message}`);
|
||||
}
|
||||
// extract the folder location for the tool
|
||||
const toolFolderPath = path.dirname(foundToolPath);
|
||||
// set the outputs for the action to the folder path of msbuild
|
||||
core.setOutput('msbuildPath', toolFolderPath);
|
||||
// add tool path to PATH
|
||||
core.addPath(toolFolderPath);
|
||||
core.info(`Tool path added to PATH: ${toolFolderPath}`);
|
||||
core.debug(`Tool path added to PATH: ${toolFolderPath}`);
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(error.message);
|
||||
|
||||
+1
-19
@@ -118,24 +118,6 @@ async function run(): Promise<void> {
|
||||
return
|
||||
}
|
||||
|
||||
core.info(`Found MSBuild tool path: ${foundToolPath}`)
|
||||
core.info(`Using MSBuild architecture: ${MSBUILD_ARCH}`)
|
||||
|
||||
// try to get the MSBuild version for diagnostic purposes; a failure here shouldn't fail the action
|
||||
try {
|
||||
let msbuildVersion = ''
|
||||
const versionOptions: ExecOptions = {}
|
||||
versionOptions.listeners = {
|
||||
stdout: (data: Buffer) => {
|
||||
msbuildVersion += data.toString()
|
||||
}
|
||||
}
|
||||
await exec.exec(`"${foundToolPath}" -version -nologo`, [], versionOptions)
|
||||
core.info(`Found MSBuild version: ${msbuildVersion.trim()}`)
|
||||
} catch (error) {
|
||||
core.debug(`Unable to determine MSBuild version: ${error.message}`)
|
||||
}
|
||||
|
||||
// extract the folder location for the tool
|
||||
const toolFolderPath = path.dirname(foundToolPath)
|
||||
|
||||
@@ -144,7 +126,7 @@ async function run(): Promise<void> {
|
||||
|
||||
// add tool path to PATH
|
||||
core.addPath(toolFolderPath)
|
||||
core.info(`Tool path added to PATH: ${toolFolderPath}`)
|
||||
core.debug(`Tool path added to PATH: ${toolFolderPath}`)
|
||||
} catch (error) {
|
||||
core.setFailed(error.message)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user