Skip to content
Open
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
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<LangVersion>Latest</LangVersion>
<BaseArtifactsPath>$(MSBuildThisFileDirectory)artifacts\</BaseArtifactsPath>
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
<NoWarn>$(NoWarn);NU5128;SA0001</NoWarn>
<RestoreEnablePackageSourceMapping>false</RestoreEnablePackageSourceMapping>
<NoWarn>$(NoWarn);NU5128;SA0001;NU1507</NoWarn>
<!--
Disabling static graph restore due to a bug related to NuGetAuditSuppress.
See: https://github.com/NuGet/Home/issues/14300
Expand Down
43 changes: 26 additions & 17 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,25 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>

<!-- Please use caution adding a dependency to MSBuild packages. Use latest for testing and
use the minimum version for compilation for back compat. -->
<MicrosoftBuildPackageVersion>17.11.4</MicrosoftBuildPackageVersion>
<MicrosoftBuildMinimumPackageVersion>16.11.0</MicrosoftBuildMinimumPackageVersion>
<MicrosoftBuildPackageVersion Condition="'$(TargetFramework)' == 'net10.0'" >17.15.0-preview-25378-103</MicrosoftBuildPackageVersion>
<MicrosoftBuildPackageVersion Condition="'$(TargetFramework)' != 'net10.0'" >17.11.31</MicrosoftBuildPackageVersion>
<MicrosoftBuildMinimumPackageVersion>17.11.31</MicrosoftBuildMinimumPackageVersion>
</PropertyGroup>
<!-- ItemGroup for net10.0 -->
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageVersion Include="System.CodeDom" Version="9.0.0-rc.2.24473.5" />
<!--<PackageVersion Include="MSBuild.ProjectCreation" Version="14.0.14-gd56bf0b446" />-->
<PackageVersion Include="MSBuild.ProjectCreation" Version="14.0.5" />
</ItemGroup>

<!-- ItemGroup for non-net10.0 -->
<ItemGroup Condition="'$(TargetFramework)' != 'net10.0'">
<PackageVersion Include="System.CodeDom" Version="8.0.0" />
<PackageVersion Include="MSBuild.ProjectCreation" Version="13.0.0" />
</ItemGroup>

<ItemGroup>
<PackageVersion Include="CopyOnWrite" Version="0.5.0" Condition=" '$(TargetFramework)' != 'net46' " />
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="6.0.0" />
Expand All @@ -23,30 +36,26 @@
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildPackageVersion)" />
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="System.CodeDom" Version="8.0.0" />
<PackageVersion Include="System.Collections.Immutable" Version="8.0.0" />
<PackageVersion Include="System.Net.Http" Version="4.3.4" />

<!-- Suppress high vuln Component Governance alert. >8.0.4 breaks downlevel VS installations. VS team working to fix. -->
<!-- https://github.com/microsoft/MSBuildSdks/issues/591 -->
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-8g4q-xg66-9fp4" />
<PackageVersion Include="System.Text.Json" Version="8.0.4" />

<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="8.0.1" />

<PackageVersion Include="System.Text.Json" Version="8.0.5" />
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="8.0.1" />
<!-- Pinning vulnerable packages -->
<PackageVersion Include="System.Security.Cryptography.Xml" Version="8.0.1" />
<PackageVersion Include="Microsoft.IO.Redist" Version="6.0.1" />
<PackageVersion Include="System.Formats.Asn1" Version="8.0.1" />

</ItemGroup>
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<PackageVersion Include="AssemblyShader" Version="1.0.3-preview" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="MSBuild.ProjectCreation" Version="13.0.0" />
<PackageVersion Include="Shouldly" Version="4.2.1" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.analyzers" Version="1.16.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="AssemblyShader" Version="1.1.3" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageVersion Include="Shouldly" Version="4.3.0" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.analyzers" Version="1.23.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.3" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.Build.Artifacts" Version="6.1.48" Condition="'$(EnableArtifacts)' != 'false'" />
Expand All @@ -58,4 +67,4 @@
<Compile Include="$(MSBuildThisFileDirectory)src\GlobalSuppressions.cs" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" />
</ItemGroup>
</Project>
</Project>
1 change: 1 addition & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
<packageSources>
<clear />
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
</packageSources>
</configuration>
42 changes: 40 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ variables:
BuildPlatform: 'Any CPU'
DotNet8Version: '8.x'
DotNet9Version: '9.x'
DotNet10Version: '10.x'
MSBuildArgs: '"/p:Platform=$(BuildPlatform)" "/p:Configuration=$(BuildConfiguration)" "/BinaryLogger:$(Build.SourcesDirectory)\$(ArtifactsDirectoryName)\msbuild.binlog"'
SignType: 'Test'

Expand Down Expand Up @@ -44,8 +45,12 @@ jobs:
displayName: 'Install .NET $(DotNet9Version)'
inputs:
version: '$(DotNet9Version)'
includePreviewVersions: false
- task: UseDotNet@2
displayName: 'Install .NET $(DotNet10Version)'
inputs:
version: '$(DotNet10Version)'
includePreviewVersions: true

- task: DotNetCoreCLI@2
displayName: 'Build Solution'
inputs:
Expand Down Expand Up @@ -76,6 +81,13 @@ jobs:
testRunTitle: 'Windows .NET 9.0'
condition: succeededOrFailed()

- task: DotNetCoreCLI@2
displayName: 'Run Unit Tests (.NET 10.0)'
inputs:
command: 'test'
arguments: '--no-restore --no-build --framework net10.0 /noautorsp'
testRunTitle: 'Windows .NET 10.0'
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
inputs:
Expand All @@ -98,8 +110,13 @@ jobs:
displayName: 'Install .NET $(DotNet9Version)'
inputs:
version: '$(DotNet9Version)'
includePreviewVersions: true
includePreviewVersions: false

- task: UseDotNet@2
displayName: 'Install .NET $(DotNet10Version)'
inputs:
version: '$(DotNet10Version)'
includePreviewVersions: true
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
Expand All @@ -122,6 +139,13 @@ jobs:
testRunTitle: 'Linux .NET 9.0'
condition: succeededOrFailed()

- task: DotNetCoreCLI@2
displayName: 'Run Unit Tests (.NET 10.0)'
inputs:
command: 'test'
arguments: '--no-restore --no-build --framework net10.0 /noautorsp'
testRunTitle: 'Linux .NET 10.0'
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
inputs:
Expand All @@ -146,6 +170,12 @@ jobs:
version: '$(DotNet9Version)'
includePreviewVersions: true

- task: UseDotNet@2
displayName: 'Install .NET $(DotNet10Version)'
inputs:
version: '$(DotNet10Version)'
includePreviewVersions: true

- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
Expand All @@ -168,6 +198,14 @@ jobs:
testRunTitle: 'MacOS .NET 9.0'
condition: succeededOrFailed()

- task: DotNetCoreCLI@2
displayName: 'Run Unit Tests (.NET 10.0)'
inputs:
command: 'test'
arguments: '--no-restore --no-build --framework net10.0 /noautorsp'
testRunTitle: 'MacOS .NET 10.0'
condition: succeededOrFailed()

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
inputs:
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.201",
"version": "10.0.100-preview.6.25358.103",
"rollForward": "latestMinor",
"allowPrerelease": true
},
Expand Down
36 changes: 22 additions & 14 deletions src/Artifacts.UnitTests/Microsoft.Build.Artifacts.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net472;net8.0;net9.0;net10.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AssemblyShader" />
<PackageReference Include="CopyOnWrite" />
<PackageReference Include="Microsoft.NET.Test.Sdk"
ShadeDependencies="NuGet.Frameworks" />
<PackageReference Include="Microsoft.NET.Test.Sdk" ShadeDependencies="NuGet.Frameworks" />
<PackageReference Include="MSBuild.ProjectCreation" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Shouldly" />
<PackageReference Include="System.Threading.Tasks.Dataflow" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.analyzers" />
<PackageReference Include="xunit.runner.visualstudio" />
<PackageReference Include="xunit.analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Artifacts\Microsoft.Build.Artifacts.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="..\Artifacts\build\**"
Link="build\%(Filename)%(Extension)"
CopyToOutputDirectory="PreserveNewest" />
<None Include="..\Artifacts\buildMultiTargeting\**"
Link="buildMultiTargeting\%(Filename)%(Extension)"
CopyToOutputDirectory="PreserveNewest" />
<None Include="..\Artifacts\Sdk\**"
Link="Sdk\%(Filename)%(Extension)"
CopyToOutputDirectory="PreserveNewest" />
<None Include="..\Artifacts\build\**" Link="build\%(Filename)%(Extension)" CopyToOutputDirectory="PreserveNewest" />
<None Include="..\Artifacts\buildMultiTargeting\**" Link="buildMultiTargeting\%(Filename)%(Extension)" CopyToOutputDirectory="PreserveNewest" />
<None Include="..\Artifacts\Sdk\**" Link="Sdk\%(Filename)%(Extension)" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<PackageVersion Update="Nerdbank.GitVersioning" Version="3.7.115" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
41 changes: 17 additions & 24 deletions src/Artifacts/Microsoft.Build.Artifacts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,35 @@
<PackageReference Include="System.Threading.Tasks.Dataflow" VersionOverride="4.9.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<None Include="build\*"
Pack="true"
PackagePath="build\" />
<None Include="buildMultiTargeting\*"
Pack="true"
PackagePath="buildMultiTargeting\" />
<None Include="build\*" Pack="true" PackagePath="build\" />
<None Include="buildMultiTargeting\*" Pack="true" PackagePath="buildMultiTargeting\" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Build.Artifacts.UnitTests" />
</ItemGroup>
<ItemGroup>
<FilesToSign Include="$(TargetPath)"
Authenticode="Microsoft400"
StrongName="StrongName" />
<FilesToSign Include="$(TargetPath)" Authenticode="Microsoft400" StrongName="StrongName" />
</ItemGroup>
<Target Name="SignNuGetPackage" />
<Target Name="CopyArtifacts"
AfterTargets="Pack"
DependsOnTargets="SignNuGetPackage"
Condition="'$(IsInnerBuild)' != 'true'">
<Target Name="CopyArtifacts" AfterTargets="Pack" DependsOnTargets="SignNuGetPackage" Condition="'$(IsInnerBuild)' != 'true'">
<ItemGroup>
<Artifact Include="$(OutputPath)\**" />
</ItemGroup>
<Copy SourceFiles="@(Artifact)"
DestinationFiles="@(Artifact->'$(ArtifactsPath)%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" />
<Copy SourceFiles="@(Artifact)" DestinationFiles="@(Artifact->'$(ArtifactsPath)%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" />
</Target>
<Target Name="IncludeReferenceCopyLocalPathsInBuildOutputInPackage"
BeforeTargets="_GetBuildOutputFilesWithTfm"
DependsOnTargets="ResolveReferences;ResolvePackageDependenciesForBuild">
<Target Name="IncludeReferenceCopyLocalPathsInBuildOutputInPackage" BeforeTargets="_GetBuildOutputFilesWithTfm" DependsOnTargets="ResolveReferences;ResolvePackageDependenciesForBuild">
<ItemGroup>
<BuildOutputInPackage Include="@(RuntimeCopyLocalItems-&gt;WithMetadataValue('AssetType', 'runtime'))"
TargetPath="%(RuntimeCopyLocalItems.DestinationSubDirectory)%(Filename)%(Extension)" />
<BuildOutputInPackage Include="@(RuntimeCopyLocalItems-&gt;WithMetadataValue('CopyLocal', 'true'))"
TargetPath="%(RuntimeCopyLocalItems.DestinationSubDirectory)%(Filename)%(Extension)" />
<BuildOutputInPackage Include="@(RuntimeCopyLocalItems-&gt;WithMetadataValue('AssetType', 'runtime'))" TargetPath="%(RuntimeCopyLocalItems.DestinationSubDirectory)%(Filename)%(Extension)" />
<BuildOutputInPackage Include="@(RuntimeCopyLocalItems-&gt;WithMetadataValue('CopyLocal', 'true'))" TargetPath="%(RuntimeCopyLocalItems.DestinationSubDirectory)%(Filename)%(Extension)" />
</ItemGroup>
</Target>
<ItemGroup>
<PackageVersion Update="Nerdbank.GitVersioning" Version="3.7.115" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
2 changes: 2 additions & 0 deletions src/Cargo.UnitTests/CargoTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ public void DoNotReferenceOutputAssemblies()
targetFramework: "net8.0")
#elif NET9_0
targetFramework: "net9.0")
#elif NET10_0
targetFramework: "net10.0")
#endif
.Save();

Expand Down
2 changes: 1 addition & 1 deletion src/Cargo.UnitTests/Microsoft.Build.Cargo.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net472;net8.0;net9.0;net10.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AssemblyShader" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net472;net8.0;net9.0;net10.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net472;net8.0;net9.0;net10.0</TargetFrameworks>
<Nullable>Enable</Nullable>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net472;net8.0;net9.0;net10.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AssemblyShader" />
Expand Down
2 changes: 2 additions & 0 deletions src/NoTargets.UnitTests/NoTargetsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ public void DoNotReferenceOutputAssemblies()
targetFramework: "net8.0")
#elif NET9_0
targetFramework: "net9.0")
#elif NET10_0
targetFramework: "net10.0")
#endif
.Save();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net472;net8.0;net9.0;net10.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AssemblyShader" />
Expand Down