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
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Note: `ImmutableArray<T>` is a value type. Use `IsDefault` property to check for
## Working Effectively

#### Bootstrap and Build the Repository
NEVER build the repository with just `dotnet build MSBuild.sln` or `dotnet build src/.../Project.csproj`.
NEVER build the repository with just `dotnet build MSBuild.slnx` or `dotnet build src/.../Project.csproj`.
Run these commands in sequence to set up a complete development environment:

**Windows:**
Expand Down
2 changes: 1 addition & 1 deletion MSBuild.Dev.slnf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"solution": {
"path": "MSBuild.sln",
"path": "MSBuild.slnx",
"projects": [
"src\\Build.OM.UnitTests\\Microsoft.Build.Engine.OM.UnitTests.csproj",
"src\\Build.UnitTests\\Microsoft.Build.Engine.UnitTests.csproj",
Expand Down
2 changes: 1 addition & 1 deletion MSBuild.SourceBuild.slnf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"solution": {
"path": "MSBuild.sln",
"path": "MSBuild.slnx",
"projects": [
"src\\Build\\Microsoft.Build.csproj",
"src\\Framework\\Microsoft.Build.Framework.csproj",
Expand Down
625 changes: 0 additions & 625 deletions MSBuild.sln

This file was deleted.

115 changes: 115 additions & 0 deletions MSBuild.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<Solution>
<Configurations>
<Platform Name="Any CPU" />
<Platform Name="ARM64" />
<Platform Name="x64" />
<Platform Name="x86" />
</Configurations>
<Folder Name="/Package/">
<Project Path="src/Package/DevDivPackage/DevDivPackage.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Package/Localization/Localization.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Package/Microsoft.Build.UnGAC/Microsoft.Build.UnGAC.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Package/MSBuild.VSSetup.Arm64/MSBuild.VSSetup.Arm64.csproj">
<Platform Solution="*|ARM64" Project="arm64" />
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Package/MSBuild.VSSetup/MSBuild.VSSetup.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
</Folder>
<Folder Name="/Samples/">
<Project Path="src/Samples/Dependency/Dependency.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Samples/PortableTask/PortableTask.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Samples/ProjectCachePlugin/ProjectCachePlugin.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Samples/TaskUsageLogger/TaskUsageLogger.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Samples/TaskWithDependency/TaskWithDependency.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Samples/XmlFileLogger/XmlFileLogger.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
</Folder>
<Folder Name="/Solution Items/">
<File Path="NuGet.Config" />
<File Path="src/Shared/UnitTests/xunit.runner.json" />
<File Path="testenvironments.json" />
</Folder>
<Project Path="src/Build.OM.UnitTests/Microsoft.Build.Engine.OM.UnitTests.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Build/Microsoft.Build.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/BuildCheck.UnitTests/Microsoft.Build.BuildCheck.UnitTests.csproj">
<Platform Solution="*|ARM64" Project="arm64" />
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Framework.UnitTests/Microsoft.Build.Framework.UnitTests.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Framework/Microsoft.Build.Framework.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/MSBuild.Bootstrap/MSBuild.Bootstrap.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/MSBuild.UnitTests/Microsoft.Build.CommandLine.UnitTests.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/MSBuild/MSBuild.csproj">
<Platform Solution="*|x64" Project="x64" />
<Platform Solution="Debug|ARM64" Project="ARM64" />
</Project>
<Project Path="src/MSBuildTaskHost/MSBuildTaskHost.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/StringTools.Benchmark/StringTools.Benchmark.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/StringTools.UnitTests/StringTools.UnitTests.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/StringTools.UnitTests/StringTools.UnitTests.net35.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/StringTools/StringTools.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Tasks.UnitTests/Microsoft.Build.Tasks.UnitTests.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Tasks/Microsoft.Build.Tasks.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/UnitTests.Shared/Microsoft.Build.UnitTests.Shared.csproj">
<Platform Solution="*|ARM64" Project="arm64" />
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Utilities.UnitTests/Microsoft.Build.Utilities.UnitTests.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Utilities/Microsoft.Build.Utilities.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="src/Xunit.NetCore.Extensions/Xunit.NetCore.Extensions.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="template_feed/Microsoft.Build.Templates.csproj" />
</Solution>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To get started on **Visual Studio 2022**:
4. Clone the source code: `git clone https://github.com/dotnet/msbuild`
- You may have to [download Git](https://git-scm.com/downloads) first.
5. Run `.\build.cmd` from the root of the repo to build the code. This also restores packages needed to open the projects in Visual Studio.
6. Open `MSBuild.sln` or `MSBuild.Dev.slnf` in Visual Studio 2022.
6. Open `MSBuild.slnx` or `MSBuild.Dev.slnf` in Visual Studio 2022.

This newly-built MSBuild will be located at `artifacts\bin\bootstrap\net472\MSBuild\Current\Bin\MSBuild.exe`. It may not work for all scenarios, including C++ builds.

Expand Down
4 changes: 2 additions & 2 deletions documentation/specs/event-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ One can run MSBuild with eventing using the following command:

`PerfView /Providers=*Microsoft-Build run MSBuild.exe <project to build>`

For example, if PerfView is one level up from my current directory (which has MSBuild.exe), and I want to build MSBuild.sln on Windows, I would use the following command:
For example, if PerfView is one level up from my current directory (which has MSBuild.exe), and I want to build MSBuild.slnx on Windows, I would use the following command:

`..\PerfView /OnlyProviders=*Microsoft-Build run .\MSBuild.exe .\MSBuild.sln`
`..\PerfView /OnlyProviders=*Microsoft-Build run .\MSBuild.exe .\MSBuild.slnx`
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Use developer command prompt for Visual Studio or put devenv on you PATH
```shell
build.cmd # to have a full build first
.\artifacts\msbuild-build-env.bat
devenv MSBuild.sln
devenv MSBuild.slnx
```

Note again that in Visual studio "Use previews of the .NET SDK (requires restart)" must be checked. See the above comment for how to enable this.
Expand Down
4 changes: 2 additions & 2 deletions eng/Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
</PropertyGroup>

<ItemGroup>
<!-- Remove all sln files globbed by arcade so far and add only MSBuild.sln to the build.
<!-- Remove all sln files globbed by arcade so far and add only MSBuild.slnx to the build.
Without this, arcade tries to build all three MSBuild solution at once, which leads to
locked file errors. -->
<ProjectToBuild Remove="@(ProjectToBuild)" />
<ProjectToBuild Include="$(RepoRoot)MSBuild.sln" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
<ProjectToBuild Include="$(RepoRoot)MSBuild.slnx" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
<ProjectToBuild Include="$(RepoRoot)MSBuild.SourceBuild.slnf" Condition="'$(DotNetBuildSourceOnly)' == 'true'" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions eng/restore-toolset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ function CreateVSShortcut {
}

$scriptPath = Join-Path $ArtifactsDir 'msbuild-build-env.ps1'
$slnPath = Join-Path $RepoRoot 'MSBuild.sln'
$slnPath = Join-Path $RepoRoot 'MSBuild.slnx'
$commandToLaunch = "& '$scriptPath'; & '$devenvPath' '$slnPath'"
$powershellPath = '%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe'
$shortcutPath = Join-Path $ArtifactsDir 'VS with MSBuild.sln.lnk'
$shortcutPath = Join-Path $ArtifactsDir 'VS with MSBuild.slnx.lnk'

# https://stackoverflow.com/a/9701907/294804
# https://learn.microsoft.com/en-us/troubleshoot/windows-client/admin-development/create-desktop-shortcut-with-wsh
Expand Down
2 changes: 1 addition & 1 deletion src/Build.UnitTests/Resources_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ private string GetRepoRoot()
{
// Start from the current directory and walk up until we find the repo root
var currentDir = Directory.GetCurrentDirectory();
while (currentDir != null && !File.Exists(Path.Combine(currentDir, "MSBuild.sln")))
while (currentDir != null && !File.Exists(Path.Combine(currentDir, "MSBuild.slnx")))
{
currentDir = Directory.GetParent(currentDir)?.FullName;
}
Expand Down