Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function Get-Help() {
Write-Host " [Default: Minimal]"
Write-Host " -vs Open the solution with Visual Studio using the locally acquired SDK."
Write-Host " Path or any project or solution name is accepted."
Write-Host " (Example: -vs Microsoft.CSharp or -vs CoreCLR.slnx)"
Write-Host " (Example: -vs Microsoft.CSharp or -vs CoreCLR.sln)"
Copy link

Copilot AI May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the help message example is consistent with the updated solution file generation logic across the script.

Copilot uses AI. Check for mistakes.
Write-Host ""

Write-Host "Actions (defaults to -restore -build):"
Expand Down Expand Up @@ -175,10 +175,11 @@ if ($vs) {
$configToOpen = $runtimeConfiguration
}

if ($vs -ieq "coreclr.slnx") {
# If someone passes in coreclr.slnx (case-insensitive),
# Auto-generated solution file that still uses the sln format
if ($vs -ieq "coreclr.sln") {
# If someone passes in coreclr.sln (case-insensitive),
# launch the generated CMake solution.
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "artifacts\obj\coreclr" | Join-Path -ChildPath "windows.$archToOpen.$((Get-Culture).TextInfo.ToTitleCase($configToOpen))" | Join-Path -ChildPath "ide" | Join-Path -ChildPath "CoreCLR.slnx"
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "artifacts\obj\coreclr" | Join-Path -ChildPath "windows.$archToOpen.$((Get-Culture).TextInfo.ToTitleCase($configToOpen))" | Join-Path -ChildPath "ide" | Join-Path -ChildPath "CoreCLR.sln"
if (-Not (Test-Path $vs)) {
Invoke-Expression "& `"$repoRoot/eng/common/msbuild.ps1`" $repoRoot/src/coreclr/runtime.proj /clp:nosummary /restore /p:Ninja=false /p:Configuration=$configToOpen /p:TargetArchitecture=$archToOpen /p:ConfigureOnly=true /p:ClrFullNativeBuild=true"
if ($lastExitCode -ne 0) {
Expand All @@ -190,8 +191,9 @@ if ($vs) {
}
}
}
elseif ($vs -ieq "corehost.slnx") {
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "artifacts\obj\" | Join-Path -ChildPath "win-$archToOpen.$((Get-Culture).TextInfo.ToTitleCase($configToOpen))" | Join-Path -ChildPath "corehost" | Join-Path -ChildPath "ide" | Join-Path -ChildPath "corehost.slnx"
# Auto-generated solution file that still uses the sln format
elseif ($vs -ieq "corehost.sln") {
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "artifacts\obj\" | Join-Path -ChildPath "win-$archToOpen.$((Get-Culture).TextInfo.ToTitleCase($configToOpen))" | Join-Path -ChildPath "corehost" | Join-Path -ChildPath "ide" | Join-Path -ChildPath "corehost.sln"
if (-Not (Test-Path $vs)) {
Invoke-Expression "& `"$repoRoot/eng/common/msbuild.ps1`" $repoRoot/src/native/corehost/corehost.proj /clp:nosummary /restore /p:Ninja=false /p:Configuration=$configToOpen /p:TargetArchitecture=$archToOpen /p:ConfigureOnly=true"
if ($lastExitCode -ne 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Fuzzing/DotnetFuzzing/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ private static void WorkaroundOneFuzzTaskNotAcceptingMultipleJobs(IFuzzer[] fuzz
string yamlPath = Environment.CurrentDirectory;
while (!File.Exists(Path.Combine(yamlPath, "DotnetFuzzing.slnx")))
{
yamlPath = Path.GetDirectoryName(yamlPath) ?? throw new Exception("Couldn't find DotnetFuzzing.sln");
yamlPath = Path.GetDirectoryName(yamlPath) ?? throw new Exception("Couldn't find DotnetFuzzing.slnx");
}

yamlPath = Path.Combine(yamlPath, "../../../eng/pipelines/libraries/fuzzing/deploy-to-onefuzz.yml");
Expand Down
Loading