@@ -258,41 +258,41 @@ try {
258
258
# Build the solution
259
259
Write-Host " 🦆 Building Rubberduck solution..."
260
260
261
- # Download VS 2017 Build Tools installer
262
- $vsInstallerUrl = " https://aka.ms/vs/15 /release/vs_buildtools.exe"
263
- $vsInstallerPath = Join-Path $env: TEMP " vs_buildtools .exe"
261
+ # Download VS 2019 Build Tools installer
262
+ $vsInstallerUrl = " https://aka.ms/vs/16 /release/vs_buildtools.exe"
263
+ $vsInstallerPath = Join-Path $env: TEMP " vs2019_buildtools .exe"
264
264
Invoke-WebRequest - Uri $vsInstallerUrl - OutFile $vsInstallerPath
265
265
266
- # Install VS 2017 Build Tools with necessary components
267
- Write-Host " Installing Visual Studio 2017 Build Tools..."
266
+ # Install VS 2019 Build Tools with necessary components
267
+ Write-Host " Installing Visual Studio 2019 Build Tools..."
268
268
269
269
# Using Start-Process with Wait for better process handling
270
270
$vsInstallerArgs = @ (
271
271
" --quiet" ,
272
272
" --wait" ,
273
273
" --norestart" ,
274
274
" --nocache" ,
275
- " --installPath" , " C:\BuildTools " ,
275
+ " --installPath" , " C:\BuildTools2019 " ,
276
276
" --add" , " Microsoft.VisualStudio.Workload.MSBuildTools" ,
277
- " --add" , " Microsoft.VisualStudio.Component.VC.Tools.x86.x64 " ,
277
+ " --add" , " Microsoft.VisualStudio.Workload.NetCoreBuildTools " ,
278
278
" --add" , " Microsoft.Net.Component.4.6.2.TargetingPack" ,
279
279
" --add" , " Microsoft.Net.Component.4.6.2.SDK" ,
280
280
" --add" , " Microsoft.VisualStudio.Component.NuGet.BuildTools"
281
281
)
282
282
283
283
$vsProcess = Start-Process - FilePath $vsInstallerPath - ArgumentList $vsInstallerArgs - PassThru - Wait - NoNewWindow
284
284
if ($vsProcess.ExitCode -ne 0 ) {
285
- Write-Warning " VS2017 Build Tools installer exited with code $ ( $vsProcess.ExitCode ) "
285
+ Write-Warning " VS2019 Build Tools installer exited with code $ ( $vsProcess.ExitCode ) "
286
286
}
287
287
288
288
# Set MSBuild path directly to installation location
289
- $msbuildPath = " C:\BuildTools \MSBuild\15.0 \Bin\MSBuild.exe"
289
+ $msbuildPath = " C:\BuildTools2019 \MSBuild\Current \Bin\MSBuild.exe"
290
290
291
291
# Verify installation
292
292
if (Test-Path $msbuildPath ) {
293
- Write-Host " ✅ Visual Studio 2017 Build Tools installed successfully at C:\BuildTools "
293
+ Write-Host " ✅ Visual Studio 2019 Build Tools installed successfully at C:\BuildTools2019 "
294
294
} else {
295
- throw " Visual Studio 2017 Build Tools installation failed. MSBuild not found at $msbuildPath "
295
+ throw " Visual Studio 2019 Build Tools installation failed. MSBuild not found at $msbuildPath "
296
296
}
297
297
298
298
# Add the MSBuild path to the top system PATH environment variable
@@ -311,7 +311,7 @@ try {
311
311
}
312
312
313
313
# Copy the binaries
314
- $binFolder = Join-Path (Get-Location ) " Rubberduck.Core \bin\Debug\net462"
314
+ $binFolder = Join-Path (Get-Location ) " Rubberduck.Main \bin\Debug\net462"
315
315
if (-not (Test-Path $binFolder )) {
316
316
throw " Build output folder not found: $binFolder "
317
317
}
0 commit comments