File tree Expand file tree Collapse file tree 8 files changed +29
-10
lines changed
test/OpenTelemetry.AutoInstrumentation.Tests
tools/DependencyListGenerator Expand file tree Collapse file tree 8 files changed +29
-10
lines changed Original file line number Diff line number Diff line change 33 "isRoot" : true ,
44 "tools" : {
55 "nuke.globaltool" : {
6- "version" : " 9 .0.4 " ,
6+ "version" : " 10 .0.0 " ,
77 "commands" : [
88 " nuke"
99 ]
Original file line number Diff line number Diff line change 22using Extensions ;
33using Nuke . Common ;
44using Nuke . Common . IO ;
5+ #if NET10_0
6+ using Nuke . Common . ProjectModel ;
7+ #endif
58using Nuke . Common . Tools . DotNet ;
69using Nuke . Common . Tools . NuGet ;
710using Nuke . Common . Utilities . Collections ;
@@ -125,7 +128,11 @@ partial class Build
125128 var nuspecSolutionFolder = Solution . GetSolutionFolder ( "nuget" )
126129 ?? throw new InvalidOperationException ( "Couldn't find the expected \" nuget\" solution folder." ) ;
127130
128- var nuspecProjects = nuspecSolutionFolder . Items . Keys . ToArray ( ) ;
131+ #if NET9_0
132+ throw new InvalidOperationException ( "NuSpec packaging requires .NET 10 or greater to run." ) ;
133+ #else
134+ var nuspecProjects = nuspecSolutionFolder . GetModel ( ) . Files ! ;
135+
129136 foreach ( var nuspecProject in nuspecProjects )
130137 {
131138 NuGetTasks . NuGetPack ( s => s
@@ -134,6 +141,8 @@ partial class Build
134141 . SetProperties ( nuspecCommonProperties )
135142 . SetOutputDirectory ( NuGetArtifactsDirectory ) ) ;
136143 }
144+ #endif
145+
137146 } ) ;
138147
139148 Target BuildNuGetPackagesTests => _ => _
Original file line number Diff line number Diff line change 33
44 <ItemGroup >
55 <PackageVersion Include =" Mono.Cecil" Version =" 0.11.6" />
6- <PackageVersion Include =" Nuke.Common" Version =" 9.0.4" />
6+ <PackageVersion Include =" Nuke.Common" Version =" 10.0.0" />
7+ <PackageVersion Include =" Nuget.CommandLine" Version =" 7.0.0" />
8+ </ItemGroup >
9+
10+ <ItemGroup Condition =" '$(IsLegacyUbuntu)' != '' " >
11+ <PackageVersion Update =" Nuke.Common" Version =" 9.0.4" />
712 <!-- Microsoft.Build is an indirect reference from Nuke.Common. Fixes https://github.com/advisories/GHSA-w3q9-fxm7-j8fq -->
813 <PackageVersion Include =" Microsoft.Build" Version =" 17.14.28" />
914 <!-- Microsoft.Build.Tasks.Core is an indirect reference from Nuke.Common. Fixes https://github.com/advisories/GHSA-w3q9-fxm7-j8fq -->
1015 <PackageVersion Include =" Microsoft.Build.Tasks.Core" Version =" 17.14.28" />
11- <PackageVersion Include =" Nuget.CommandLine" Version =" 7.0.0" />
1216 </ItemGroup >
1317</Project >
Original file line number Diff line number Diff line change 22
33 <PropertyGroup >
44 <OutputType >Exe</OutputType >
5- <TargetFramework >net9.0</TargetFramework >
5+ <TargetFramework Condition =" '$(IsLegacyUbuntu)' == '' " >net10.0</TargetFramework >
6+ <TargetFramework Condition =" '$(IsLegacyUbuntu)' != '' " >net9.0</TargetFramework >
67 <RootNamespace ></RootNamespace >
78 <NoWarn >CS0649;CS0169</NoWarn >
89 <NukeRootDirectory >..\</NukeRootDirectory >
1920 <ItemGroup >
2021 <PackageReference Include =" Mono.Cecil" />
2122 <PackageReference Include =" Nuke.Common" />
23+ <PackageReference Include =" Nuget.CommandLine" ExcludeAssets =" all" />
24+ </ItemGroup >
25+ <ItemGroup Condition =" '$(IsLegacyUbuntu)' != '' " >
2226 <!-- Microsoft.Build is an indirect reference from Nuke.Common. Fixes https://github.com/advisories/GHSA-w3q9-fxm7-j8fq -->
2327 <PackageReference Include =" Microsoft.Build" />
2428 <!-- Microsoft.Build.Tasks.Core is an indirect reference from Nuke.Common. Fixes https://github.com/advisories/GHSA-w3q9-fxm7-j8fq -->
2529 <PackageReference Include =" Microsoft.Build.Tasks.Core" />
26- <PackageReference Include =" Nuget.CommandLine" ExcludeAssets =" all" />
2730 </ItemGroup >
2831 <ItemGroup >
2932 <PackageReference Include =" DotNet.ReproducibleBuilds" >
Original file line number Diff line number Diff line change @@ -37,4 +37,6 @@ RUN chmod +x ./dotnet-install.sh \
3737 && ./dotnet-install.sh -v 9.0.308 --install-dir /usr/share/dotnet --no-path \
3838 && rm dotnet-install.sh
3939
40+ ENV IsLegacyUbuntu=true
41+
4042WORKDIR /project
Original file line number Diff line number Diff line change 33
44// This test is defined in NET 9.0 because the tool is written in .NET 9.0
55// The actual test is testing .NET Framework context.
6- #if NET9_0
6+ #if NET10_0
77
88using System . Reflection ;
99using System . Runtime . InteropServices ;
Original file line number Diff line number Diff line change 44 <PackageReference Include =" Newtonsoft.Json" />
55 <PackageReference Include =" Xunit.SkippableFact" />
66 <PackageReference Include =" log4net" />
7- <PackageReference Include =" Microsoft.Build" Condition =" '$(TargetFramework)' == 'net9 .0' " />
7+ <PackageReference Include =" Microsoft.Build" Condition =" '$(TargetFramework)' == 'net10 .0' " />
88 </ItemGroup >
99
1010 <ItemGroup >
1111 <ProjectReference Include =" ..\..\src\OpenTelemetry.AutoInstrumentation\OpenTelemetry.AutoInstrumentation.csproj" />
12- <ProjectReference Include =" ..\..\tools\DependencyListGenerator\DependencyListGenerator.csproj" Condition =" '$(TargetFramework)' == 'net9 .0' " />
12+ <ProjectReference Include =" ..\..\tools\DependencyListGenerator\DependencyListGenerator.csproj" Condition =" '$(TargetFramework)' == 'net10 .0' " />
1313 </ItemGroup >
1414
1515 <ItemGroup >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >net9.0</TargetFramework >
4+ <TargetFramework Condition =" '$(IsLegacyUbuntu)' == '' " >net10.0</TargetFramework >
5+ <TargetFramework Condition =" '$(IsLegacyUbuntu)' != '' " >net9.0</TargetFramework >
56 <ImplicitUsings >enable</ImplicitUsings >
67 <Nullable >disable</Nullable >
78 <SignAssembly >true</SignAssembly >
You can’t perform that action at this time.
0 commit comments