Skip to content

Commit bb48410

Browse files
Convert sln to slnx (#115818)
* convert sln to slnx * Update slngen.proj * Update dotnet-tools.json * Update slnx files based on slngen.proj --------- Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
1 parent f10d4c3 commit bb48410

File tree

481 files changed

+23728
-68269
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

481 files changed

+23728
-68269
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
]
2222
},
2323
"microsoft.visualstudio.slngen.tool": {
24-
"version": "11.1.0",
24+
"version": "12.0.15",
2525
"commands": [
2626
"slngen"
2727
]

docs/workflow/building/coreclr/nativeaot.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,22 @@ The compiler also has a mode where each managed assembly can be compiled into a
5656

5757
## Visual Studio Solutions
5858

59-
The repository has a number of Visual Studio Solutions files (`*.sln`) that are useful for editing parts of the repository. Build the repo from command line first before building using the solution files. Remember to select the appropriate configuration that you built. By default, `build.cmd` builds Debug x64 and so `Debug` and `x64` must be selected in the solution build configuration drop downs.
59+
The repository has a number of Visual Studio Solutions files (`*.slnx`) that are useful for editing parts of the repository. Build the repo from command line first before building using the solution files. Remember to select the appropriate configuration that you built. By default, `build.cmd` builds Debug x64 and so `Debug` and `x64` must be selected in the solution build configuration drop downs.
6060

6161
Solutions related to this:
6262

63-
* `src\coreclr\nativeaot\nativeaot.sln`. This solution is for the runtime libraries.
64-
* `src\coreclr\tools\aot\ilc.sln`. This solution is for the compiler.
63+
* `src\coreclr\nativeaot\nativeaot.slnx`. This solution is for the runtime libraries.
64+
* `src\coreclr\tools\aot\ilc.slnx`. This solution is for the compiler.
6565

6666
Typical workflow for working on the compiler:
6767

68-
* Open `ilc.sln` in Visual Studio
68+
* Open `ilc.slnx` in Visual Studio
6969
* Set "ILCompiler" project in solution explorer as your startup project
7070
* Set Working directory in the project Debug options to your test project directory, e.g. `C:\test`
7171
* Set Application arguments in the project Debug options to the response file that was generated by regular native aot publishing of your test project, e.g. `@obj\Release\net8.0\win-x64\native\HelloWorld.ilc.rsp`
7272
* Build & run using **F5**
7373

74-
NOTE: this requires that you globally install the same .NET SDK version as the one that is used to build the repo. You can avoid this requirement by launching Visual Studio through the build.cmd script at the root of the repo. `build.cmd -vs src\coreclr\tools\aot\ilc.sln` opens the ILC solution, `build.cmd -vs nativeaot` opens the native AOT solution.
74+
NOTE: this requires that you globally install the same .NET SDK version as the one that is used to build the repo. You can avoid this requirement by launching Visual Studio through the build.cmd script at the root of the repo. `build.cmd -vs src\coreclr\tools\aot\ilc.slnx` opens the ILC solution, `build.cmd -vs nativeaot` opens the native AOT solution.
7575

7676
## Convenience Visual Studio "repro" project
7777

@@ -80,7 +80,7 @@ Typical native AOT runtime developer scenario workflow is to native AOT compile
8080
The workflow looks like this:
8181

8282
* Build the repo using the Building instructions above
83-
* Open the ilc.sln solution described above. This solution contains the compiler, but also an unrelated project named "repro". This repro project is a small Hello World. You can place any piece of C# you would like to compile in it. Building the project will compile the source code into IL, but also generate a response file that is suitable to pass to the AOT compiler.
83+
* Open the ilc.slnx solution described above. This solution contains the compiler, but also an unrelated project named "repro". This repro project is a small Hello World. You can place any piece of C# you would like to compile in it. Building the project will compile the source code into IL, but also generate a response file that is suitable to pass to the AOT compiler.
8484
* Make sure you set the solution configuration in VS to the configuration you just built (e.g. x64 Debug).
8585
* In the ILCompiler project properties, on the Debug tab, set the "Application arguments" to `@$(ArtifactsBinDir)repro\$(TargetArchitecture)\$(Configuration)\compile-with-Release-libs.rsp`. The `@` at the front of the argument indicates that this is the path to the response file generated when "repro" was built. Adjust the "compile-with-Release-libs" part to "compile-with-Debug-libs" depending on how you built the libraries (the `-lc` argument to `build.cmd`). Visual Studio will expand the path to something like `@C:\runtime\artifacts\bin\repro\x64\Debug\compile-with-Release-libs.rsp`.
8686
* Build & run ILCompiler using **F5**. This will compile the repro project into an `.obj` file. You can debug the compiler and set breakpoints in it at this point.

docs/workflow/building/libraries/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ git pull upstream main & git push origin main
1212
build.cmd clr+libs -rc Release
1313
:: Performing the above is usually only needed once in a day, or when you pull down significant new changes.
1414
15-
:: If you use Visual Studio, you might open System.Collections.Concurrent.sln here.
15+
:: If you use Visual Studio, you might open System.Collections.Concurrent.slnx here.
1616
build.cmd -vs System.Collections.Concurrent
1717
1818
:: Switch to working on a given library (System.Collections.Concurrent in this case)
@@ -147,7 +147,7 @@ Similar to building the entire repo with `build.cmd` or `build.sh` in the root y
147147
- Build all projects for a given library (e.g.: System.Collections) including running the tests
148148

149149
```bash
150-
./build.sh -projects src/libraries/*/System.Collections.sln
150+
./build.sh -projects src/libraries/*/System.Collections.slnx
151151
```
152152

153153
- Build just the tests for a library project
@@ -157,7 +157,7 @@ Similar to building the entire repo with `build.cmd` or `build.sh` in the root y
157157

158158
- All the options listed above like framework and configuration are also supported (note they must be after the directory)
159159
```bash
160-
./build.sh -projects src/libraries/*/System.Collections.sln -f net472 -c Release
160+
./build.sh -projects src/libraries/*/System.Collections.slnx -f net472 -c Release
161161
```
162162

163163
As `dotnet build` works on both Unix and Windows and calls the restore target implicitly, we will use it throughout this guide.

docs/workflow/building/libraries/webassembly-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Individual projects and libraries can be build by specifying the build configura
8080
- Build all projects for a given library (e.g.: System.Net.Http) including the tests
8181

8282
```bash
83-
./build.sh -os browser -c Release --projects <full-repository-path>/src/libraries/System.Net.Http/System.Net.Http.sln
83+
./build.sh -os browser -c Release --projects <full-repository-path>/src/libraries/System.Net.Http/System.Net.Http.slnx
8484
```
8585

8686
- Build only the source project of a given library (e.g.: System.Net.Http)

docs/workflow/debugging/coreclr/debugging-runtime.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ If for some reason `System.Private.CoreLib.dll` is missing, you can rebuild it w
4343
Visual Studio's capabilities as a full IDE provide a lot of help making the runtime debugging more amiable.
4444

4545
0. Run `.\build.cmd clr.nativeprereqs -a <architecture> -c <configuration>`. This will build some of the tools requiremented for the native build. This step only needs to be run once as long you don't clean the `artifacts` directory.
46-
1. Open the CoreCLR solution _(coreclr.sln)_ in Visual Studio.
46+
1. Open the CoreCLR solution _(coreclr.slnx)_ in Visual Studio.
4747
* _Method 1_: Use the build scripts to open the solution:
48-
1. Run `.\build.cmd -vs coreclr.sln -a <architecture> -c <configuration>`. This will create and launch the CoreCLR solution in VS for the specified architecture and configuration. By default, this will be `x64 Debug`.
48+
1. Run `.\build.cmd -vs coreclr.slnx -a <architecture> -c <configuration>`. This will create and launch the CoreCLR solution in VS for the specified architecture and configuration. By default, this will be `x64 Debug`.
4949
* _Method 2_: Manually build and open the solution:
5050
1. Perform a build of the repo with the `-msbuild` flag.
51-
2. Open solution `path\to\runtime\artifacts\obj\coreclr\windows.<architecture>.<configuration>\ide\CoreCLR.sln` in Visual Studio. As in the previous method, the architecture and configuration by default are `x64` and `Debug`, unless explicitly stated otherwise.
51+
2. Open solution `path\to\runtime\artifacts\obj\coreclr\windows.<architecture>.<configuration>\ide\CoreCLR.slnx` in Visual Studio. As in the previous method, the architecture and configuration by default are `x64` and `Debug`, unless explicitly stated otherwise.
5252
2. Right-click the **INSTALL** project and choose `Set as StartUp Project`.
5353
3. Bring up the properties page for the **INSTALL** project.
5454
4. Select _Configuration Properties -> Debugging_ from the left side tree control.
@@ -114,7 +114,7 @@ Visual Studio can also be used to debug builds built externally from CLI scripts
114114
5. To set breakpoints, runtime source files can to be added by right clicking the solution in the Solution Explorer and selecting Add -> Existing Item.
115115
6. Set breakpoints and run the application with `F5` to start debugging.
116116

117-
Note, the `.sln` file can be saved and stores paths to `corerun.exe`, included files, and debug settings. It can be reused as long as the paths do not change.
117+
Note, the `.slnx` file can be saved and stores paths to `corerun.exe`, included files, and debug settings. It can be reused as long as the paths do not change.
118118

119119
### Using Visual Studio Code
120120

docs/workflow/editing-and-debugging.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@ more on Markdown in general.
1515

1616
# Visual Studio Solutions
1717

18-
The repository has a number of Visual Studio Solutions files (`*.sln`) that are useful for editing parts of the repository. In particular
18+
The repository has a number of Visual Studio Solutions files (`*.slnx`) that are useful for editing parts of the repository. In particular
1919

20-
* `src\coreclr\System.Private.CoreLib\System.Private.CoreLib.sln` - This solution is for all managed (C#) code that is defined
20+
* `src\coreclr\System.Private.CoreLib\System.Private.CoreLib.slnx` - This solution is for all managed (C#) code that is defined
2121
in the runtime itself. This is all class library support of one form or another.
22-
* `artifacts\obj\coreclr\windows.<Arch>.<BuildType>\ide\CoreCLR.sln` - this solution contains most native (C++) projects
22+
* `artifacts\obj\coreclr\windows.<Arch>.<BuildType>\ide\CoreCLR.slnx` - this solution contains most native (C++) projects
2323
associated with the repository, including
2424
* `coreclr` - This is the main runtime DLL (the GC, class loader, interop are all here)
2525
* `corjit` - This is the Just In Time (JIT) compiler that compiles .NET Intermediate language to native code.
2626
* `corerun` - This is the simple host program that can run a .NET application
2727
* `crossgen` - This is the host program that runs the JIT compiler and produces .NET Native images (`*.ni.dll`)
2828
for C# code.
29-
* This project can be automatically generated and opened in Visual Studio by running `./build.cmd -vs CoreCLR.sln -a <Arch> -c <BuildType>` from the root of the repository.
30-
* `artifacts\obj\win-<Arch>.<BuildType>\corehost\ide\corehost.sln` - this solution contains the native (C++) projects for the [host components](../design/features/host-components.md)
31-
* This project can be automatically generated and opened in Visual Studio by running `./build.cmd -vs corehost.sln -a <Arch> -c <BuildType>` from the root of the repository.
29+
* This project can be automatically generated and opened in Visual Studio by running `./build.cmd -vs CoreCLR.slnx -a <Arch> -c <BuildType>` from the root of the repository.
30+
* `artifacts\obj\win-<Arch>.<BuildType>\corehost\ide\corehost.slnx` - this solution contains the native (C++) projects for the [host components](../design/features/host-components.md)
31+
* This project can be automatically generated and opened in Visual Studio by running `./build.cmd -vs corehost.slnx -a <Arch> -c <BuildType>` from the root of the repository.
3232

3333
Thus opening one of these solution files (double clicking on them in Explorer) is typically all you need
3434
to do most editing.
3535

3636
Notice that the CoreCLR and corehost solutions are under the `artifacts` directory. This is because they are created as part of the build.
37-
Thus you can only launch these solutions after you have built at least once with the `-msbuild` flag or run the `./build.cmd -vs CoreCLR.sln` or `./build.cmd -vs corehost.sln` command line with the specified architecture and configuration.
37+
Thus you can only launch these solutions after you have built at least once with the `-msbuild` flag or run the `./build.cmd -vs CoreCLR.slnx` or `./build.cmd -vs corehost.slnx` command line with the specified architecture and configuration.
3838

3939
* See [Debugging CoreCLR](debugging/coreclr/debugging-runtime.md)
4040

docs/workflow/requirements/windows-requirements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Alternatively, if you would rather avoid modifying your machine state, you can u
8484
.\build.cmd -vs System.Text.RegularExpressions
8585
```
8686

87-
This will set the `DOTNET_ROOT` and `PATH` environment variables to point to the locally acquired SDK under the `.dotnet` directory found at the root of the repo for the duration of this terminal session. Then, it will launch the Visual Studio instance that is registered for the `.sln` extension, and open the solution you passed as argument to the command-line.
87+
This will set the `DOTNET_ROOT` and `PATH` environment variables to point to the locally acquired SDK under the `.dotnet` directory found at the root of the repo for the duration of this terminal session. Then, it will launch the Visual Studio instance that is registered for the `.slnx` extension, and open the solution you passed as argument to the command-line.
8888

8989
## Installing dependencies with winget
9090

docs/workflow/testing/host/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ The `category!=failing` is to respect the [filtering traits](../libraries/filter
7878
7979
### Visual Studio
8080
81-
The [Microsoft.DotNet.CoreSetup.sln](/src/installer/Microsoft.DotNet.CoreSetup.sln) can be used to run and debug host tests through Visual Studio. When using the solution, the product should have already been [built](#building-tests) and the [test context](#test-context) set up.
81+
The [Microsoft.DotNet.CoreSetup.slnx](/src/installer/Microsoft.DotNet.CoreSetup.slnx) can be used to run and debug host tests through Visual Studio. When using the solution, the product should have already been [built](#building-tests) and the [test context](#test-context) set up.
8282
8383
If you built the runtime or libraries with a different configuration from the host, you have to specify this when starting visual studio:
8484

eng/build.ps1

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function Get-Help() {
5959
Write-Host " [Default: Minimal]"
6060
Write-Host " -vs Open the solution with Visual Studio using the locally acquired SDK."
6161
Write-Host " Path or any project or solution name is accepted."
62-
Write-Host " (Example: -vs Microsoft.CSharp or -vs CoreCLR.sln)"
62+
Write-Host " (Example: -vs Microsoft.CSharp or -vs CoreCLR.slnx)"
6363
Write-Host ""
6464

6565
Write-Host "Actions (defaults to -restore -build):"
@@ -175,10 +175,10 @@ if ($vs) {
175175
$configToOpen = $runtimeConfiguration
176176
}
177177

178-
if ($vs -ieq "coreclr.sln") {
179-
# If someone passes in coreclr.sln (case-insensitive),
178+
if ($vs -ieq "coreclr.slnx") {
179+
# If someone passes in coreclr.slnx (case-insensitive),
180180
# launch the generated CMake solution.
181-
$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"
181+
$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"
182182
if (-Not (Test-Path $vs)) {
183183
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"
184184
if ($lastExitCode -ne 0) {
@@ -190,8 +190,8 @@ if ($vs) {
190190
}
191191
}
192192
}
193-
elseif ($vs -ieq "corehost.sln") {
194-
$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"
193+
elseif ($vs -ieq "corehost.slnx") {
194+
$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"
195195
if (-Not (Test-Path $vs)) {
196196
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"
197197
if ($lastExitCode -ne 0) {
@@ -208,24 +208,24 @@ if ($vs) {
208208

209209
if ($runtimeFlavor -eq "Mono") {
210210
# Search for the solution in mono
211-
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "src\mono" | Join-Path -ChildPath $vs | Join-Path -ChildPath "$vs.sln"
211+
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "src\mono" | Join-Path -ChildPath $vs | Join-Path -ChildPath "$vs.slnx"
212212
} else {
213213
# Search for the solution in coreclr
214-
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "src\coreclr" | Join-Path -ChildPath $vs | Join-Path -ChildPath "$vs.sln"
214+
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "src\coreclr" | Join-Path -ChildPath $vs | Join-Path -ChildPath "$vs.slnx"
215215
}
216216

217217
if (-Not (Test-Path $vs)) {
218218
$vs = $solution
219219

220220
# Search for the solution in libraries
221-
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "src\libraries" | Join-Path -ChildPath $vs | Join-Path -ChildPath "$vs.sln"
221+
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "src\libraries" | Join-Path -ChildPath $vs | Join-Path -ChildPath "$vs.slnx"
222222

223223
if (-Not (Test-Path $vs)) {
224224
$vs = $solution
225225

226226
# Search for the solution in installer
227-
if (-Not ($vs.endswith(".sln"))) {
228-
$vs = "$vs.sln"
227+
if (-Not ($vs.endswith(".slnx"))) {
228+
$vs = "$vs.slnx"
229229
}
230230

231231
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "src\installer" | Join-Path -ChildPath $vs

eng/common/build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function Print-Usage() {
6464
Write-Host ""
6565

6666
Write-Host "Advanced settings:"
67-
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
67+
Write-Host " -projects <value> Semi-colon delimited list of slnx/proj's to build. Globbing is supported (*.slnx)"
6868
Write-Host " -ci Set when running on CI server"
6969
Write-Host " -excludeCIBinarylog Don't output binary log (short: -nobl)"
7070
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"

0 commit comments

Comments
 (0)