Skip to content

Commit f6d73c0

Browse files
committed
Fixes for Metalama.Vsx.
1 parent 26ffd15 commit f6d73c0

File tree

7 files changed

+48
-11
lines changed

7 files changed

+48
-11
lines changed

Build.ps1

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ if ( $VsDebug )
1919
{
2020
$vsmonport = 4024
2121
Write-Host "Starting Visual Studio Remote Debugger, listening at port $vsmonport." -ForegroundColor Cyan
22-
Start-Process -FilePath "C:\msvsmon\msvsmon.exe" `
22+
$vsmonProcess = Start-Process -FilePath "C:\msvsmon\msvsmon.exe" `
2323
-ArgumentList "/noauth","/anyuser","/silent","/port:$vsmonport","/timeout:2147483647" `
24-
-NoNewWindow
24+
-NoNewWindow -PassThru
2525
}
2626

2727
# Change the prompt and window title in Docker.
@@ -36,5 +36,26 @@ if ( $env:RUNNING_IN_DOCKER )
3636

3737
if ( -not $Interactive -or $BuildArgs )
3838
{
39-
& dotnet run --project "$PSScriptRoot\$EngPath\src\Build$ProductName.csproj" -- $BuildArgs
39+
# Change the working directory so we can use a global.json that is specific to eng.
40+
$previousLocation = Get-Location
41+
42+
Set-Location $PSScriptRoot\$EngPath\src
43+
44+
try
45+
{
46+
47+
# Run the project.
48+
& dotnet run --project "$PSScriptRoot\$EngPath\src\Build$ProductName.csproj" -- $BuildArgs
49+
50+
if ($VsDebug)
51+
{
52+
Write-Host ""
53+
Write-Host "Killing vsmon.exe."
54+
$vsmonProcess.Kill()
55+
}
56+
}
57+
finally
58+
{
59+
Set-Location $previousLocation
60+
}
4061
}

src/PostSharp.Engineering.BuildTools/Dependencies/Definitions/MetalamaDependencies.V2025_1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public MetalamaDependencyDefinition(
109109
new MetalamaDependencyDefinition(
110110
"Metalama.Vsx",
111111
VcsProvider.AzureDevOps,
112-
null );
112+
null ) { PackagePatterns = ["Metalama.Repacked"] };
113113

114114
public static DependencyDefinition MetalamaSamples { get; } =
115115
new MetalamaDependencyDefinition(

src/PostSharp.Engineering.BuildTools/Dependencies/Definitions/MetalamaDependencies.V2025_2.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public MetalamaDependencyDefinition(
108108
new MetalamaDependencyDefinition(
109109
"Metalama.Vsx",
110110
VcsProvider.AzureDevOps,
111-
null );
111+
null ) { PackagePatterns = ["Metalama.Repacked"] };
112112

113113
public static DependencyDefinition MetalamaSamples { get; } =
114114
new MetalamaDependencyDefinition(

src/PostSharp.Engineering.BuildTools/Dependencies/Definitions/MetalamaDependencies.V2026_0.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public MetalamaDependencyDefinition(
110110
new MetalamaDependencyDefinition(
111111
"Metalama.Vsx",
112112
VcsProvider.AzureDevOps,
113-
null );
113+
null ) { PackagePatterns = ["Metalama.Repacked"] };
114114

115115
public static DependencyDefinition MetalamaSamples { get; } =
116116
new MetalamaDependencyDefinition(

src/PostSharp.Engineering.BuildTools/Dependencies/Definitions/PostSharpDependencies.V2025_1.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public PostSharpDependencyDefinition()
4040
false )
4141
{
4242
this.EngineeringDirectory = @"Build\Distribution\eng";
43+
this.PackagePatterns = ["PostSharp", "PostSharp.*"];
4344
}
4445
}
4546

src/PostSharp.Engineering.BuildTools/Dependencies/Definitions/PostSharpDependencies.V2026_0.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public PostSharpDependencyDefinition()
4040
false )
4141
{
4242
this.EngineeringDirectory = @"Build\Distribution\eng";
43+
this.PackagePatterns = ["PostSharp", "PostSharp.*"];
4344
}
4445
}
4546

src/PostSharp.Engineering.BuildTools/Resources/Build.ps1

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,26 @@ if ( $env:RUNNING_IN_DOCKER )
3636

3737
if ( -not $Interactive -or $BuildArgs )
3838
{
39-
& dotnet run --project "$PSScriptRoot\$EngPath\src\Build$ProductName.csproj" -- $BuildArgs
39+
# Change the working directory so we can use a global.json that is specific to eng.
40+
$previousLocation = Get-Location
4041

41-
if ( $VsDebug )
42+
Set-Location $PSScriptRoot\$EngPath\src
43+
44+
try
45+
{
46+
47+
# Run the project.
48+
& dotnet run --project "$PSScriptRoot\$EngPath\src\Build$ProductName.csproj" -- $BuildArgs
49+
50+
if ($VsDebug)
51+
{
52+
Write-Host ""
53+
Write-Host "Killing vsmon.exe."
54+
$vsmonProcess.Kill()
55+
}
56+
}
57+
finally
4258
{
43-
Write-Host ""
44-
Write-Host "Killing vsmon.exe."
45-
$vsmonProcess.Kill()
59+
Set-Location $previousLocation
4660
}
4761
}

0 commit comments

Comments
 (0)