Skip to content

Commit 35e75f7

Browse files
authored
chore: migrate solution format from sln to slnx (#2909)
1 parent 8fbe3a9 commit 35e75f7

File tree

9 files changed

+46
-219
lines changed

9 files changed

+46
-219
lines changed

BenchmarkDotNet.sln

Lines changed: 0 additions & 211 deletions
This file was deleted.

BenchmarkDotNet.slnx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<Solution>
2+
<Folder Name="/samples/">
3+
<Project Path="samples/BenchmarkDotNet.Samples.FSharp/BenchmarkDotNet.Samples.FSharp.fsproj" />
4+
<Project Path="samples/BenchmarkDotNet.Samples/BenchmarkDotNet.Samples.csproj" DefaultStartup="true" />
5+
</Folder>
6+
<Folder Name="/src/">
7+
<Project Path="src/BenchmarkDotNet.Analyzers/BenchmarkDotNet.Analyzers.csproj" />
8+
<Project Path="src/BenchmarkDotNet.Annotations/BenchmarkDotNet.Annotations.csproj" />
9+
<Project Path="src/BenchmarkDotNet.Diagnostics.dotMemory/BenchmarkDotNet.Diagnostics.dotMemory.csproj" />
10+
<Project Path="src/BenchmarkDotNet.Diagnostics.dotTrace/BenchmarkDotNet.Diagnostics.dotTrace.csproj" />
11+
<Project Path="src/BenchmarkDotNet.Diagnostics.Windows/BenchmarkDotNet.Diagnostics.Windows.csproj" />
12+
<Project Path="src/BenchmarkDotNet.Disassembler/BenchmarkDotNet.Disassembler.csproj" />
13+
<Project Path="src/BenchmarkDotNet.Exporters.Plotting/BenchmarkDotNet.Exporters.Plotting.csproj" />
14+
<Project Path="src/BenchmarkDotNet.TestAdapter/BenchmarkDotNet.TestAdapter.csproj" />
15+
<Project Path="src/BenchmarkDotNet.Weaver/BenchmarkDotNet.Weaver.csproj" />
16+
<Project Path="src/BenchmarkDotNet/BenchmarkDotNet.csproj" />
17+
</Folder>
18+
<Folder Name="/templates/">
19+
<Project Path="templates/BenchmarkDotNet.Templates.csproj" />
20+
</Folder>
21+
<Folder Name="/tests/">
22+
<Project Path="tests/BenchmarkDotNet.Analyzers.Tests/BenchmarkDotNet.Analyzers.Tests.csproj" />
23+
<Project Path="tests/BenchmarkDotNet.Exporters.Plotting.Tests/BenchmarkDotNet.Exporters.Plotting.Tests.csproj" />
24+
<Project Path="tests/BenchmarkDotNet.IntegrationTests.ConfigPerAssembly/BenchmarkDotNet.IntegrationTests.ConfigPerAssembly.csproj" />
25+
<Project Path="tests/BenchmarkDotNet.IntegrationTests.CustomPaths/BenchmarkDotNet.IntegrationTests.CustomPaths.csproj" />
26+
<Project Path="tests/BenchmarkDotNet.IntegrationTests.DisabledOptimizations/BenchmarkDotNet.IntegrationTests.DisabledOptimizations.csproj" />
27+
<Project Path="tests/BenchmarkDotNet.IntegrationTests.EnabledOptimizations/BenchmarkDotNet.IntegrationTests.EnabledOptimizations.csproj" />
28+
<Project Path="tests/BenchmarkDotNet.IntegrationTests.FSharp/BenchmarkDotNet.IntegrationTests.FSharp.fsproj" />
29+
<Project Path="tests/BenchmarkDotNet.IntegrationTests.ManualRunning.MultipleFrameworks/BenchmarkDotNet.IntegrationTests.ManualRunning.MultipleFrameworks.csproj" />
30+
<Project Path="tests/BenchmarkDotNet.IntegrationTests.ManualRunning/BenchmarkDotNet.IntegrationTests.ManualRunning.csproj" />
31+
<Project Path="tests/BenchmarkDotNet.IntegrationTests.Static/BenchmarkDotNet.IntegrationTests.Static.csproj" />
32+
<Project Path="tests/BenchmarkDotNet.IntegrationTests.VisualBasic/BenchmarkDotNet.IntegrationTests.VisualBasic.vbproj" />
33+
<Project Path="tests/BenchmarkDotNet.IntegrationTests/BenchmarkDotNet.IntegrationTests.csproj" />
34+
<Project Path="tests/BenchmarkDotNet.Tests/BenchmarkDotNet.Tests.csproj" />
35+
</Folder>
36+
</Solution>
37+

build/BenchmarkDotNet.Build/BuildContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public BuildContext(ICakeContext context)
6464
var toolFilePath = RootDirectory.Combine(".dotnet").CombineWithFilePath(toolFileName);
6565
context.Tools.RegisterFile(toolFilePath);
6666

67-
SolutionFile = RootDirectory.CombineWithFilePath("BenchmarkDotNet.sln");
67+
SolutionFile = RootDirectory.CombineWithFilePath("BenchmarkDotNet.slnx");
6868
AnalyzersProjectFile = RootDirectory.Combine("src").Combine("BenchmarkDotNet.Analyzers").CombineWithFilePath("BenchmarkDotNet.Analyzers.csproj");
6969

7070
TemplatesTestsProjectFile = RootDirectory.Combine("templates")

build/BenchmarkDotNet.Build/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public HelpInfo GetHelp()
5858
}
5959

6060
[TaskName(Name)]
61-
[TaskDescription("Build BenchmarkDotNet.sln solution")]
61+
[TaskDescription("Build BenchmarkDotNet.slnx solution")]
6262
[IsDependentOn(typeof(RestoreTask))]
6363
public class BuildTask : FrostingTask<BuildContext>, IHelpProvider
6464
{

build/cSpell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"Pseudocode",
3131
"runtimes",
3232
"Serilog",
33+
"slnx",
3334
"vsprofiler",
3435
"vstest",
3536
"Tailcall",

docs/articles/contributing/building.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ There are two recommended options to build BenchmarkDotNet from source:
66

77
- [Visual Studio](https://www.visualstudio.com/downloads/) (Community, Professional, Enterprise) with .NET 4.6.2 SDK and F# support.
88

9-
- [.NET 7 SDK](https://dotnet.microsoft.com/download).
9+
- [.NET 10 SDK](https://dotnet.microsoft.com/download).
1010

11-
Once all the necessary tools are in place, building is trivial. Simply open solution file **BenchmarkDotNet.sln** that lives at the base of the repository and run Build action.
11+
Once all the necessary tools are in place, building is trivial. Simply open solution file **BenchmarkDotNet.slnx** that lives at the base of the repository and run Build action.
1212

1313
## Command-line
1414

docs/articles/contributing/running-tests.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
To run all tests just run the following command in the repo root:
44

55
```cmd
6-
dotnet test -c Release BenchmarkDotNet.sln
6+
dotnet test -c Release BenchmarkDotNet.slnx
77
```
88

9-
Most of the tests projects target `net461` and `net5.0`. If the change that you want to test is not specific to any particular runtime, you can run the tests for one of them.
9+
Most of the tests projects target `net462` and `net8.0`. If the change that you want to test is not specific to any particular runtime, you can run the tests for one of them.
1010

1111
```cmd
12-
dotnet test -c Release -f net5.0 BenchmarkDotNet.sln
12+
dotnet test -c Release -f net8.0 BenchmarkDotNet.slnx
1313
```
1414

1515
You should be able to run all of tests from your IDE as well.

src/BenchmarkDotNet/Toolchains/CsProj/CsProjGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ protected virtual FileInfo GetProjectFilePath(Type benchmarkTarget, ILogger logg
247247
if (!GetSolutionRootDirectory(out var rootDirectory) && !GetProjectRootDirectory(out rootDirectory))
248248
{
249249
logger.WriteLineError(
250-
$"Unable to find .sln or .csproj file. Will use current directory {Directory.GetCurrentDirectory()} to search for project file. If you don't use .sln file on purpose it should not be a problem.");
250+
$"Unable to find .sln .slnx or .csproj file. Will use current directory {Directory.GetCurrentDirectory()} to search for project file. If you don't use .sln file on purpose it should not be a problem.");
251251
rootDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());
252252
}
253253

0 commit comments

Comments
 (0)