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
13 changes: 4 additions & 9 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,15 @@ jobs:
with:
fetch-depth: 0 # Git Versioning requires a non-shallow clone

- name: Install .NET 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.x'

- name: Install .NET 7
- name: Install .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.x'
dotnet-version: '8.x'

- name: Install .NET 8
- name: Install .NET 9
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
dotnet-version: '9.x'

- name: Restore
run: dotnet restore -bl:logs/restore.binlog
Expand Down
8 changes: 7 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project>
<Project>

<PropertyGroup>
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors>
Expand All @@ -17,6 +17,12 @@

<!-- Use artifacts output layout (https://learn.microsoft.com/en-us/dotnet/core/sdk/artifacts-output) -->
<UseArtifactsOutput>true</UseArtifactsOutput>

<!--
This all runs in the context of the MSBuild, so we don't have control of the dependencies.
Furthermore, we intentionally target lower versions of MSBuild for best compatibility.
-->
<NuGetAudit>false</NuGetAudit>
</PropertyGroup>

<!-- Packaging -->
Expand Down
4 changes: 1 addition & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
<Project>
<PropertyGroup>
<!-- Use the highest version which supports a given target framework -->
<MSBuildPackageVersion>17.8.3</MSBuildPackageVersion>
<MSBuildPackageVersion Condition="'$(TargetFramework)' == 'net7.0'">17.7.2</MSBuildPackageVersion>
<MSBuildPackageVersion Condition="'$(TargetFramework)' == 'net6.0'">17.3.2</MSBuildPackageVersion>
<MSBuildPackageVersion>17.11.4</MSBuildPackageVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.Build" Version="$(MSBuildPackageVersion)" />
Expand Down
2 changes: 1 addition & 1 deletion MSBuildPrediction.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
azure-pipelines-ci.yml = azure-pipelines-ci.yml
.github\workflows\pr.yml = .github\workflows\pr.yml
azure-pipelines-official.yml = azure-pipelines-official.yml
CodeAnalysis.ruleset = CodeAnalysis.ruleset
Directory.Build.props = Directory.Build.props
Expand Down
5 changes: 2 additions & 3 deletions azure-pipelines-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ variables:
ArtifactsDirectory: artifacts
BuildConfiguration: 'Release'
BuildPlatform: 'Any CPU'
DotNetVersion: '8.x'
MSBuildArgs: '"/p:Platform=$(BuildPlatform)" "/p:Configuration=$(BuildConfiguration)" "/BinaryLogger:$(LogDirectory)/msbuild.binlog"'
SignType: 'Real'
TeamName: 'MSBuild'
Expand Down Expand Up @@ -74,9 +73,9 @@ extends:
displayName: 'Set SignType to Real for tagged commits'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
- task: UseDotNet@2
displayName: 'Install .NET $(DotNetVersion)'
displayName: 'Install .NET'
inputs:
version: '$(DotNetVersion)'
version: '9.x'
- task: DotNetCoreCLI@2
displayName: 'Build Solution'
inputs:
Expand Down
2 changes: 1 addition & 1 deletion src/BuildPrediction/Microsoft.Build.Prediction.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net472;net8.0;net9.0</TargetFrameworks>
</PropertyGroup>
<!-- Packaging -->
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net472;net8.0;net9.0</TargetFrameworks>
<!-- Documentation rules aren't needed for the test project -->
<NoWarn>$(NoWarn);SA1600;SA1611;SA1615</NoWarn>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void FindArtifactsForExistingDirectoryRecursive(string separator)

// Recursive is the default. Also testing the file matching logic here.
artifactItem.AddMetadata(ArtifactsSdkPredictor.FileMatchMetadata, "*.txt");
artifactItem.AddMetadata(ArtifactsSdkPredictor.FileExcludeMetadata, string.Join(separator, ["exclude.*", "dontwant.*"]));
artifactItem.AddMetadata(ArtifactsSdkPredictor.FileExcludeMetadata, string.Join(separator, new string[] { "exclude.*", "dontwant.*" }));
artifactItem.AddMetadata(ArtifactsSdkPredictor.DirExcludeMetadata, "excludeDir");

Directory.CreateDirectory(Path.Combine(_rootDir, @"src\Artifacts"));
Expand Down Expand Up @@ -337,7 +337,7 @@ public void FindArtifactsForGeneratedDirectory(string separator)
// Copying another project's output dir to this project's output dir
var artifactItem = projectRootElement.AddItem(ArtifactsSdkPredictor.ArtifactsItemName, @"$(EnlistmentRoot)\bar\$(OutputPath)");
artifactItem.AddMetadata(ArtifactsSdkPredictor.DestinationFolderMetadata, @"$(OutputPath)");
artifactItem.AddMetadata(ArtifactsSdkPredictor.FileMatchMetadata, string.Join(separator, ["*.dll", "*.pdb"]));
artifactItem.AddMetadata(ArtifactsSdkPredictor.FileMatchMetadata, string.Join(separator, new string[] { "*.dll", "*.pdb" }));

ProjectInstance projectInstance = TestHelpers.CreateProjectInstanceFromRootElement(projectRootElement);

Expand Down