Convert the solution file to the new SLNX format (#19328)

This commit is contained in:
Dustin L. Howett
2025-09-09 15:01:03 -05:00
committed by GitHub
parent 4a34a76504
commit d6714f3ca9
12 changed files with 1096 additions and 2392 deletions

View File

@@ -1585,6 +1585,7 @@ SLGP
SLIST SLIST
slmult slmult
sln sln
slnx
slpit slpit
SManifest SManifest
SMARTQUOTE SMARTQUOTE

File diff suppressed because it is too large Load Diff

1070
OpenConsole.slnx Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -375,7 +375,7 @@ winget configure .config\configuration.winget
## Building the Code ## Building the Code
OpenConsole.sln may be built from within Visual Studio or from the command-line OpenConsole.slnx may be built from within Visual Studio or from the command-line
using a set of convenience scripts & tools in the **/tools** directory: using a set of convenience scripts & tools in the **/tools** directory:
### Building in PowerShell ### Building in PowerShell

View File

@@ -75,9 +75,9 @@ jobs:
- template: .\steps-restore-nuget.yml - template: .\steps-restore-nuget.yml
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution OpenConsole.sln for WPF Control (Pack) displayName: Build solution OpenConsole.slnx for WPF Control (Pack)
inputs: inputs:
solution: 'OpenConsole.sln' solution: 'OpenConsole.slnx'
msbuildArgs: >- msbuildArgs: >-
/p:WindowsTerminalReleaseBuild=true;Version=$(XES_PACKAGEVERSIONNUMBER) /p:WindowsTerminalReleaseBuild=true;Version=$(XES_PACKAGEVERSIONNUMBER)
/p:NoBuild=true /p:NoBuild=true

View File

@@ -170,9 +170,9 @@ jobs:
- ${{ parameters.beforeBuildSteps }} - ${{ parameters.beforeBuildSteps }}
- task: VSBuild@1 - task: VSBuild@1
displayName: Build OpenConsole.sln displayName: Build OpenConsole.slnx
inputs: inputs:
solution: 'OpenConsole.sln' solution: 'OpenConsole.slnx'
msbuildArgs: >- msbuildArgs: >-
/p:WindowsTerminalOfficialBuild=true;WindowsTerminalBranding=${{ parameters.branding }};PGOBuildMode=${{ parameters.pgoBuildMode }} /p:WindowsTerminalOfficialBuild=true;WindowsTerminalBranding=${{ parameters.branding }};PGOBuildMode=${{ parameters.pgoBuildMode }}
${{ parameters.additionalBuildOptions }} ${{ parameters.additionalBuildOptions }}

View File

@@ -19,14 +19,16 @@ steps:
restoreSolution: build/packages.config restoreSolution: build/packages.config
restoreDirectory: '$(Build.SourcesDirectory)\packages' restoreDirectory: '$(Build.SourcesDirectory)\packages'
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 - task: VSBuild@1
displayName: Restore NuGet packages for solution displayName: Restore NuGet packages for solution
inputs: inputs:
command: restore solution: 'OpenConsole.slnx'
feedsToUse: config msbuildArgs: /t:Restore
configPath: NuGet.config platform: $(BuildPlatform)
restoreSolution: OpenConsole.sln configuration: $(BuildConfiguration)
restoreDirectory: '$(Build.SourcesDirectory)\packages' msbuildArchitecture: x64
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: Restore NuGet packages for global nuget displayName: Restore NuGet packages for global nuget

View File

@@ -7,7 +7,7 @@ This repository uses [git submodules](https://git-scm.com/book/en/v2/Git-Tools-S
git submodule update --init --recursive git submodule update --init --recursive
``` ```
OpenConsole.sln may be built from within Visual Studio or from the command-line using a set of convenience scripts & tools in the **/tools** directory: OpenConsole.slnx may be built from within Visual Studio or from the command-line using a set of convenience scripts & tools in the **/tools** directory:
When using Visual Studio, be sure to set up the path for code formatting. To download the required clang-format.exe file, follow one of the building instructions below and run: When using Visual Studio, be sure to set up the path for code formatting. To download the required clang-format.exe file, follow one of the building instructions below and run:
```powershell ```powershell
@@ -103,7 +103,7 @@ If you want to use .nupkg files instead of the downloaded Nuget package, you can
The Terminal is bundled as an `.msix`, which is produced by the `CascadiaPackage.wapproj` project. To build that project from the commandline, you can run the following (from a window you've already run `tools\razzle.cmd` in): The Terminal is bundled as an `.msix`, which is produced by the `CascadiaPackage.wapproj` project. To build that project from the commandline, you can run the following (from a window you've already run `tools\razzle.cmd` in):
```cmd ```cmd
"%msbuild%" "%OPENCON%\OpenConsole.sln" /p:Configuration=%_LAST_BUILD_CONF% /p:Platform=%ARCH% /p:AppxSymbolPackageEnabled=false /t:Terminal\CascadiaPackage /m "%msbuild%" "%OPENCON%\OpenConsole.slnx" /p:Configuration=%_LAST_BUILD_CONF% /p:Platform=%ARCH% /p:AppxSymbolPackageEnabled=false /t:Terminal\CascadiaPackage /m
``` ```
This takes quite some time, and only generates an `msix`. It does not install the msix. To deploy the package: This takes quite some time, and only generates an `msix`. It does not install the msix. To deploy the package:

View File

@@ -264,13 +264,13 @@ function Invoke-OpenConsoleTests()
#.SYNOPSIS #.SYNOPSIS
# Builds OpenConsole.sln using msbuild. Any arguments get passed on to msbuild. # Builds OpenConsole.slnx using msbuild. Any arguments get passed on to msbuild.
function Invoke-OpenConsoleBuild() function Invoke-OpenConsoleBuild()
{ {
$root = Find-OpenConsoleRoot $root = Find-OpenConsoleRoot
& "$root\dep\nuget\nuget.exe" restore "$root\OpenConsole.sln" & "$root\dep\nuget\nuget.exe" restore "$root\OpenConsole.slnx"
& "$root\dep\nuget\nuget.exe" restore "$root\dep\nuget\packages.config" & "$root\dep\nuget\nuget.exe" restore "$root\dep\nuget\packages.config"
msbuild.exe "$root\OpenConsole.sln" @args msbuild.exe "$root\OpenConsole.slnx" @args
} }
#.SYNOPSIS #.SYNOPSIS

View File

@@ -73,11 +73,11 @@ if "%_SKIP_NUGET_RESTORE%" == "1" (
echo Skipped nuget restore echo Skipped nuget restore
) else ( ) else (
echo Performing nuget restore... echo Performing nuget restore...
nuget.exe restore %OPENCON%\OpenConsole.sln nuget.exe restore %OPENCON%\OpenConsole.slnx
) )
@rem /p:GenerateAppxPackageOnBuild=false will prevent us from building the whole .msix package when building the wapproj project. @rem /p:GenerateAppxPackageOnBuild=false will prevent us from building the whole .msix package when building the wapproj project.
set _BUILD_CMDLINE="%MSBUILD%" %OPENCON%\OpenConsole.sln /t:"%_MSBUILD_TARGET%" /m /p:Configuration=%_LAST_BUILD_CONF% /p:GenerateAppxPackageOnBuild=false /p:Platform=%ARCH% %_APPX_ARGS% set _BUILD_CMDLINE="%MSBUILD%" %OPENCON%\OpenConsole.slnx /t:"%_MSBUILD_TARGET%" /m /p:Configuration=%_LAST_BUILD_CONF% /p:GenerateAppxPackageOnBuild=false /p:Platform=%ARCH% %_APPX_ARGS%
echo %_BUILD_CMDLINE% echo %_BUILD_CMDLINE%
echo Starting build... echo Starting build...
@@ -135,7 +135,7 @@ setlocal enabledelayedexpansion
rem TODO:GH#2172 Find a way to only rebuild the metaproj if the sln changed rem TODO:GH#2172 Find a way to only rebuild the metaproj if the sln changed
rem First generate the metaproj file rem First generate the metaproj file
set MSBuildEmitSolution=1 set MSBuildEmitSolution=1
"%msbuild%" %OPENCON%\OpenConsole.sln /t:ValidateSolutionConfiguration /m > NUL "%msbuild%" %OPENCON%\OpenConsole.slnx /t:ValidateSolutionConfiguration /m > NUL
set MSBuildEmitSolution= set MSBuildEmitSolution=
rem Use bx.ps1 to figure out which target we're looking at rem Use bx.ps1 to figure out which target we're looking at

View File

@@ -11,11 +11,11 @@ $projectPath = $projects.FullName
# Parse the solution's metaproj file. # Parse the solution's metaproj file.
[xml]$Metaproj = Get-Content "$env:OPENCON\OpenConsole.sln.metaproj" [xml]$Metaproj = Get-Content "$env:OPENCON\OpenConsole.slnx.metaproj"
$targets = $Metaproj.Project.Target $targets = $Metaproj.Project.Target
# Most projects are in OpenConsole.sln.metaproj as "<project>.*proj.metaproj". # Most projects are in OpenConsole.slnx.metaproj as "<project>.*proj.metaproj".
# We'll filter to search for these first and foremost. # We'll filter to search for these first and foremost.
$msBuildCondition = "'%(ProjectReference.Identity)' == '$projectPath.metaproj'" $msBuildCondition = "'%(ProjectReference.Identity)' == '$projectPath.metaproj'"
@@ -25,7 +25,7 @@ $msBuildCondition = "'%(ProjectReference.Identity)' == '$projectPath.metaproj'"
$matchingTargets = $targets | Where-Object { $_.MSBuild.Condition -eq $msBuildCondition } $matchingTargets = $targets | Where-Object { $_.MSBuild.Condition -eq $msBuildCondition }
# If we didn't find a target, it's possible that the project didn't have a # If we didn't find a target, it's possible that the project didn't have a
# .metaproj in OpenConsole.sln.metaproj. Try filtering again, but leave off the # .metaproj in OpenConsole.slnx.metaproj. Try filtering again, but leave off the
# .metaproj extension. # .metaproj extension.
if ($matchingTargets.length -eq 0) if ($matchingTargets.length -eq 0)
{ {

View File

@@ -21,7 +21,7 @@ rem Add nuget to PATH
set PATH=%OPENCON%\dep\nuget;%PATH% set PATH=%OPENCON%\dep\nuget;%PATH%
rem Run nuget restore so you can use vswhere rem Run nuget restore so you can use vswhere
nuget restore %OPENCON%\OpenConsole.sln -Verbosity quiet nuget restore %OPENCON%\OpenConsole.slnx -Verbosity quiet
nuget restore %OPENCON%\dep\nuget\packages.config -Verbosity quiet nuget restore %OPENCON%\dep\nuget\packages.config -Verbosity quiet
:FIND_MSBUILD :FIND_MSBUILD