diff --git a/build/Build.Steps.cs b/build/Build.Steps.cs index 31ff3fd6c1..82d20eba02 100644 --- a/build/Build.Steps.cs +++ b/build/Build.Steps.cs @@ -1,4 +1,5 @@ using System.Diagnostics; +using System.Runtime.InteropServices; using System.Text.Json; using System.Text.Json.Nodes; using Extensions; @@ -551,6 +552,7 @@ void RemoveFilesInNetFolderAvailableInAdditionalStore() .SetProject(Solution.GetProjectByName(Projects.AutoInstrumentationAdditionalDeps)) .SetConfiguration(BuildConfiguration) .SetTargetPlatformAnyCPU() + .SetProperty("NukePlatform", Platform) .SetProperty("TracerHomePath", TracerHomeDirectory) .EnableNoBuild() .SetNoRestore(NoRestore) @@ -559,7 +561,7 @@ void RemoveFilesInNetFolderAvailableInAdditionalStore() // Additional-deps probes the directory using SemVer format. // Example: For netcoreapp3.1 framework, additional-deps uses 3.1.0 or 3.1.1 and so on. // Major and Minor version are extracted from framework and default value of 0 is appended for patch. - .SetOutput(AdditionalDepsDirectory / "shared" / "Microsoft.NETCore.App" / framework.ToString().Substring(framework.ToString().Length - 3) + ".0"))); + .SetOutput(AdditionalDepsDirectory / "shared" / "Microsoft.NETCore.App" / framework.ToString().Substring(framework.ToString().Length - 3) + ".0"))); ; AdditionalDepsDirectory.GlobFiles("**/*deps.json") .ForEach(file => @@ -569,8 +571,9 @@ void RemoveFilesInNetFolderAvailableInAdditionalStore() var folderRuntimeName = depsJson.GetFolderRuntimeName(); var architectureStores = new List() - .AddIf(StoreDirectory / "x64" / folderRuntimeName, true) // All OS'es support x64 runtime + .AddIf(StoreDirectory / "x64" / folderRuntimeName, RuntimeInformation.OSArchitecture == Architecture.X64) .AddIf(StoreDirectory / "x86" / folderRuntimeName, IsWin) // Only Windows supports x86 runtime + .AddIf(StoreDirectory / "arm64" / folderRuntimeName, IsArm64) .AsReadOnly(); depsJson.CopyNativeDependenciesToStore(file, architectureStores); diff --git a/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/OpenTelemetry.AutoInstrumentation.AdditionalDeps.csproj b/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/OpenTelemetry.AutoInstrumentation.AdditionalDeps.csproj index 4ec7e91ceb..b153dc30c0 100644 --- a/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/OpenTelemetry.AutoInstrumentation.AdditionalDeps.csproj +++ b/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/OpenTelemetry.AutoInstrumentation.AdditionalDeps.csproj @@ -10,6 +10,7 @@ $(OutputDir)\store\ $(TracerHomePath)\AdditionalDeps $(TracerHomePath)\store + x64 @@ -17,17 +18,17 @@ x86 $(StoreOutputBasePath) - + x64 $(StoreOutputBasePath) - + arm64 $(StoreOutputBasePath) - +