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
3 changes: 1 addition & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<DefaultItemExcludes>*log</DefaultItemExcludes>
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors>
<LangVersion>Latest</LangVersion>
<BaseArtifactsPath>$(MSBuildThisFileDirectory)artifacts\</BaseArtifactsPath>
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
<NoWarn>$(NoWarn);NU5128;SA0001</NoWarn>
<!--
Expand All @@ -12,7 +11,7 @@
-->
<RestoreUseStaticGraphEvaluation>false</RestoreUseStaticGraphEvaluation>
<RestoreSerializeGlobalProperties>true</RestoreSerializeGlobalProperties>
<UseArtifactsOutput>false</UseArtifactsOutput>
<UseArtifactsOutput>true</UseArtifactsOutput>
<IsTestProject Condition="$(MSBuildProjectName.EndsWith('UnitTests'))">true</IsTestProject>
<IsPackable Condition="'$(IsTestProject)' != 'true'">true</IsPackable>

Expand Down
80 changes: 47 additions & 33 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,74 @@
<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>17.14.28</MicrosoftBuildPackageVersion>
<MicrosoftBuildPackageNet8>17.11.48</MicrosoftBuildPackageNet8>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="CopyOnWrite" Version="0.5.0" Condition=" '$(TargetFramework)' != 'net46' " />
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="6.0.0" />

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'netstandard2.0'">
<PackageVersion Include="Microsoft.Build" Version="$(MicrosoftBuildPackageNet8)" />
<PackageVersion Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildPackageNet8)" />
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildPackageNet8)" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildPackageNet8)" />
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="8.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net8.0' And '$(TargetFramework)' != 'netstandard2.0'"> <!-- And '$(TargetFramework)' != 'net472'">-->
<PackageVersion Include="Microsoft.Build" Version="$(MicrosoftBuildPackageVersion)" />
<PackageVersion Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildPackageVersion)" />
<!--
Suppress advisory for Microsoft.Build.Tasks.Core as this repo only compiles against these assemblies,
and uses a lower version for compatability. The actual version used at runtime is the version of
MSBuild actually running.
-->
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-h4j7-5rxr-p4wc" />
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildPackageVersion)" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildPackageVersion)" />
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />

<PackageVersion Include="System.Text.Json" Version="9.0.0" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
<PackageVersion Include="CopyOnWrite" Version="0.5.0" />
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="6.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" />

<!-- Pinning vulnerable packages -->
<PackageVersion Include="System.CodeDom" Version="9.0.0" />
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageVersion Include="System.Collections.Immutable" Version="9.0.0" />
<!--





-->
<!-- 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" />
<PackageVersion Include="System.Formats.Asn1" Version="8.0.1" />-->
</ItemGroup>

<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<PackageVersion Include="AssemblyShader" Version="1.0.3-preview" />
<PackageVersion Include="AssemblyShader" Version="1.1.3" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="MSBuild.ProjectCreation" Version="13.0.0" />
<PackageVersion Include="MSBuild.ProjectCreation" Version="16.1.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="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.analyzers" Version="1.25.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.Build.Artifacts" Version="6.1.48" Condition="'$(EnableArtifacts)' != 'false'" />
<GlobalPackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="1.0.0" Condition="'$(EnableMicroBuild)' != 'false'" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" Condition="'$(EnableGitVersioning)' != 'false'" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.9.50" Condition="'$(EnableGitVersioning)' != 'false'" />
</ItemGroup>
<ItemGroup Condition=" '$(EnableStyleCop)' != 'false' ">
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<Compile Include="$(MSBuildThisFileDirectory)src\GlobalSuppressions.cs" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" />
</ItemGroup>
</Project>
</Project>
26 changes: 2 additions & 24 deletions MSBuildSdks.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32516.85
# Visual Studio Version 18
VisualStudioVersion = 18.0.11205.157 d18.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Build.Traversal", "src\Traversal\Microsoft.Build.Traversal.csproj", "{B93918D4-75EA-467E-8F50-393A1324FF91}"
EndProject
Expand Down Expand Up @@ -48,16 +48,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Build.Artifacts",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Build.Artifacts.UnitTests", "src\Artifacts.UnitTests\Microsoft.Build.Artifacts.UnitTests.csproj", "{359B2C2B-B9B8-496F-B4B1-9E4359729F89}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CentralPackageVersions", "CentralPackageVersions", "{FCF015C3-82E5-488D-8438-1410F6572F0B}"
ProjectSection(SolutionItems) = preProject
samples\CentralPackageVersions\Directory.Build.props = samples\CentralPackageVersions\Directory.Build.props
samples\CentralPackageVersions\Directory.Build.targets = samples\CentralPackageVersions\Directory.Build.targets
samples\CentralPackageVersions\Packages.props = samples\CentralPackageVersions\Packages.props
samples\CentralPackageVersions\README.md = samples\CentralPackageVersions\README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClassLibrary", "samples\CentralPackageVersions\src\ClassLibrary\ClassLibrary.csproj", "{A266FDFA-BE7C-4E3E-9BEA-EF18EF66540C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Traversal", "Traversal", "{5AEA9E7B-4AF2-4E03-A566-7CC30318C311}"
ProjectSection(SolutionItems) = preProject
samples\Traversal\Directory.Build.props = samples\Traversal\Directory.Build.props
Expand All @@ -74,10 +64,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectA", "samples\Travers
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectB", "samples\Traversal\ProjectB\ProjectB.csproj", "{2035141B-4345-4E79-83DB-979A43BA5C29}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{145D39C4-285A-4ACF-B86C-7E611969DE35}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ClassLibrary", "ClassLibrary", "{35CEF293-5111-4017-A3BA-63FF5710C953}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SampleNoTargets", "SampleNoTargets", "{469437EE-241A-4B8A-B7E0-E0F913F5529D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Build.CopyOnWrite", "src\CopyOnWrite\Microsoft.Build.CopyOnWrite.csproj", "{153D1183-2953-4D4D-A5AD-AA2CF99B0DE3}"
Expand Down Expand Up @@ -134,10 +120,6 @@ Global
{359B2C2B-B9B8-496F-B4B1-9E4359729F89}.Debug|Any CPU.Build.0 = Debug|Any CPU
{359B2C2B-B9B8-496F-B4B1-9E4359729F89}.Release|Any CPU.ActiveCfg = Release|Any CPU
{359B2C2B-B9B8-496F-B4B1-9E4359729F89}.Release|Any CPU.Build.0 = Release|Any CPU
{A266FDFA-BE7C-4E3E-9BEA-EF18EF66540C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A266FDFA-BE7C-4E3E-9BEA-EF18EF66540C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A266FDFA-BE7C-4E3E-9BEA-EF18EF66540C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A266FDFA-BE7C-4E3E-9BEA-EF18EF66540C}.Release|Any CPU.Build.0 = Release|Any CPU
{18C7CBF8-98D3-4C47-A11B-2905AF23A20B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{18C7CBF8-98D3-4C47-A11B-2905AF23A20B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{18C7CBF8-98D3-4C47-A11B-2905AF23A20B}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -177,15 +159,11 @@ Global
GlobalSection(NestedProjects) = preSolution
{516F0D1D-C4FE-4832-9E49-903A2C57D3F3} = {867D30F7-2AEC-48E7-B167-4919EE1B0985}
{48F56A6B-A285-4B40-9E96-044F7AA2C532} = {469437EE-241A-4B8A-B7E0-E0F913F5529D}
{FCF015C3-82E5-488D-8438-1410F6572F0B} = {867D30F7-2AEC-48E7-B167-4919EE1B0985}
{A266FDFA-BE7C-4E3E-9BEA-EF18EF66540C} = {35CEF293-5111-4017-A3BA-63FF5710C953}
{5AEA9E7B-4AF2-4E03-A566-7CC30318C311} = {867D30F7-2AEC-48E7-B167-4919EE1B0985}
{615210F2-B751-431E-B2F1-C5D3C205F899} = {5AEA9E7B-4AF2-4E03-A566-7CC30318C311}
{A9CC411B-67F8-4644-873C-1ACBFC12AAA5} = {5AEA9E7B-4AF2-4E03-A566-7CC30318C311}
{18C7CBF8-98D3-4C47-A11B-2905AF23A20B} = {615210F2-B751-431E-B2F1-C5D3C205F899}
{2035141B-4345-4E79-83DB-979A43BA5C29} = {A9CC411B-67F8-4644-873C-1ACBFC12AAA5}
{145D39C4-285A-4ACF-B86C-7E611969DE35} = {FCF015C3-82E5-488D-8438-1410F6572F0B}
{35CEF293-5111-4017-A3BA-63FF5710C953} = {145D39C4-285A-4ACF-B86C-7E611969DE35}
{469437EE-241A-4B8A-B7E0-E0F913F5529D} = {516F0D1D-C4FE-4832-9E49-903A2C57D3F3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ variables:
ArtifactsDirectoryName: 'artifacts'
BuildConfiguration: 'Release'
BuildPlatform: 'Any CPU'
DotNetVersion: '9.x'
DotNetVersion: '10.x'
MSBuildArgs: '"/p:Platform=$(BuildPlatform)" "/p:Configuration=$(BuildConfiguration)" "/BinaryLogger:$(Build.SourcesDirectory)\$(ArtifactsDirectoryName)\msbuild.binlog"'
SignType: 'Real'
trigger:
Expand Down
64 changes: 64 additions & 0 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 @@ -46,6 +47,12 @@ jobs:
version: '$(DotNet9Version)'
includePreviewVersions: true

- 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 +83,21 @@ jobs:
testRunTitle: 'Windows .NET 9.0'
condition: succeededOrFailed()

# Disabled due to MSBuild.ProjectCreation dependency issue
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just null-refs running, no idea why. Probably needs to be updated for MSBuild 18, but that didn't actually fix it
jeffkl/MSBuildProjectCreator#346

We're not targeting 10 anywhere other than for tests though, so should be fine to ignore for now.

# - 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()

- powershell: |
$bin = "$(Build.SourcesDirectory)\$(ArtifactsDirectoryName)\bin"
if (Test-Path $bin) { Remove-Item -LiteralPath $bin -Recurse -Force }
displayName: 'Remove artifacts/bin (Windows)'
condition: always()

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
inputs:
Expand All @@ -100,6 +122,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 @@ -122,6 +150,21 @@ jobs:
testRunTitle: 'Linux .NET 9.0'
condition: succeededOrFailed()

# Disabled due to MSBuild.ProjectCreation dependency issue
# - 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()

- bash: |
BIN_DIR="$(Build.SourcesDirectory)/$(ArtifactsDirectoryName)/bin"
[ -d "$BIN_DIR" ] && rm -rf "$BIN_DIR"
displayName: 'Remove artifacts/bin (Linux)'
condition: always()

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
inputs:
Expand All @@ -146,6 +189,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 +217,21 @@ jobs:
testRunTitle: 'MacOS .NET 9.0'
condition: succeededOrFailed()

# Disabled due to MSBuild.ProjectCreation dependency issue
# - 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()

- bash: |
BIN_DIR="$(Build.SourcesDirectory)/$(ArtifactsDirectoryName)/bin"
[ -d "$BIN_DIR" ] && rm -rf "$BIN_DIR"
displayName: 'Remove artifacts/bin (macOS)'
condition: always()

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
inputs:
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"sdk": {
"version": "9.0.201",
"version": "10.0.100",
"rollForward": "latestMinor",
"allowPrerelease": true
},
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.7.56"
"Microsoft.Build.NoTargets": "3.7.134"
}
}
4 changes: 0 additions & 4 deletions samples/CentralPackageVersions/Directory.Build.targets

This file was deleted.

9 changes: 0 additions & 9 deletions samples/CentralPackageVersions/Packages.props

This file was deleted.

33 changes: 0 additions & 33 deletions samples/CentralPackageVersions/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions samples/CentralPackageVersions/src/ClassLibrary/Class1.cs

This file was deleted.

This file was deleted.

Loading
Loading