diff --git a/src/NuGet.Core/NuGet.CommandLine.XPlat/Commands/Why/DependencyGraphFinder.cs b/src/NuGet.Core/NuGet.CommandLine.XPlat/Commands/Why/DependencyGraphFinder.cs index c35f8565a6f..80f6681c74b 100644 --- a/src/NuGet.Core/NuGet.CommandLine.XPlat/Commands/Why/DependencyGraphFinder.cs +++ b/src/NuGet.Core/NuGet.CommandLine.XPlat/Commands/Why/DependencyGraphFinder.cs @@ -31,6 +31,10 @@ internal static class DependencyGraphFinder var dependencyGraphPerFramework = new Dictionary?>(assetsFile.Targets.Count); bool doesProjectHaveDependencyOnPackage = false; + // add null to the list of runtime identifiers to account for projects that do not have a runtime identifier + var runtimeIdentifiers = assetsFile.PackageSpec.RuntimeGraph.Runtimes.Keys + .Append(null) + .ToList(); // get all top-level package and project references for the project, categorized by target framework alias Dictionary> topLevelReferencesByFramework = GetTopLevelPackageAndProjectReferences(assetsFile, userInputFrameworks); @@ -38,21 +42,26 @@ internal static class DependencyGraphFinder { foreach (var (targetFrameworkAlias, topLevelReferences) in topLevelReferencesByFramework) { - LockFileTarget? target = assetsFile.GetTarget(targetFrameworkAlias, runtimeIdentifier: null); - - // get all package libraries for the framework - IList? packageLibraries = target?.Libraries; - - // if the project has a dependency on the target package, get the dependency graph - if (packageLibraries?.Any(l => l?.Name?.Equals(targetPackage, StringComparison.OrdinalIgnoreCase) == true) == true) - { - doesProjectHaveDependencyOnPackage = true; - dependencyGraphPerFramework.Add(targetFrameworkAlias, - GetDependencyGraphForTargetPerFramework(topLevelReferences, packageLibraries, targetPackage)); - } - else + foreach (var runtimeIdentifier in runtimeIdentifiers) { - dependencyGraphPerFramework.Add(targetFrameworkAlias, null); + var targetFrameworkDisplayName = runtimeIdentifier == null ? targetFrameworkAlias : $"{targetFrameworkAlias}/{runtimeIdentifier}"; + + LockFileTarget target = assetsFile.GetTarget(targetFrameworkAlias, runtimeIdentifier: runtimeIdentifier); + + // get all package libraries for the framework + IList? packageLibraries = target.Libraries; + + // if the project has a dependency on the target package, get the dependency graph + if (packageLibraries?.Any(l => l?.Name?.Equals(targetPackage, StringComparison.OrdinalIgnoreCase) == true) == true) + { + doesProjectHaveDependencyOnPackage = true; + dependencyGraphPerFramework.Add(targetFrameworkDisplayName, + GetDependencyGraphForTargetPerFramework(topLevelReferences, packageLibraries, targetPackage)); + } + else + { + dependencyGraphPerFramework.Add(targetFrameworkDisplayName, null); + } } } } diff --git a/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/Commands/Why/DependencyGraphFinderTests.cs b/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/Commands/Why/DependencyGraphFinderTests.cs index 4b7219a2439..8f5796ee063 100644 --- a/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/Commands/Why/DependencyGraphFinderTests.cs +++ b/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/Commands/Why/DependencyGraphFinderTests.cs @@ -206,6 +206,121 @@ public void DifferentCaseUsedForTargetPackageId_MatchesAreCaseInsensitive_AllPat Assert.Contains(dependencyGraphs["net472"].First(dep => dep.Id == "DotnetNuGetWhyPackage").Children, dep => (dep.Id == "System.Text.Json") && (dep.Version == "8.0.0")); } + [Fact] + public void GetAllDependencyGraphsForTarget_WithWinX64Runtime_FindsRIDSpecificPackages() + { + // Arrange + var lockFileFormat = new LockFileFormat(); + var lockFileContent = ProtocolUtility.GetResource("NuGet.CommandLine.Xplat.Tests.compiler.resources.Test.SampleProject2.project.assets.json", GetType()); + var assetsFile = lockFileFormat.Parse(lockFileContent, "In Memory"); + + if (XunitAttributeUtility.CurrentPlatform == Platform.Linux || XunitAttributeUtility.CurrentPlatform == Platform.Darwin) + { + ConvertRelevantWindowsPathsToUnix(assetsFile); + } + + string targetPackage = "system.private.uri"; + var frameworks = new List(); + + // Act + var dependencyGraphs = DependencyGraphFinder.GetAllDependencyGraphsForTarget(assetsFile, targetPackage, frameworks); + + // Assert + Assert.Contains(dependencyGraphs["net9.0/win-x64"], dep => (dep.Id == "System.AppContext") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net9.0/win-x64"].First().Children, dep => (dep.Id == "System.Runtime") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net9.0/win-x64"].First().Children.First().Children, dep => (dep.Id == "runtime.any.System.Runtime") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net9.0/win-x64"].First().Children.First().Children.First().Children, dep => (dep.Id == "System.Private.Uri") && (dep.Version == "4.3.0")); + } + + [Theory] + [InlineData("system.private.uri")] + [InlineData("system.PRIVATE.uri")] + [InlineData("system.private.URI")] + public void GetAllDependencyGraphsForTarget_TwoRidSpecificVersionsVariousCasings_FindsRIDSpecificPackages(string package) + { + // Arrange + var lockFileFormat = new LockFileFormat(); + var lockFileContent = ProtocolUtility.GetResource("NuGet.CommandLine.Xplat.Tests.compiler.resources.Test.TwoDifferentVersions.project.assets.json", GetType()); + var assetsFile = lockFileFormat.Parse(lockFileContent, "In Memory"); + + if (XunitAttributeUtility.CurrentPlatform == Platform.Linux || XunitAttributeUtility.CurrentPlatform == Platform.Darwin) + { + ConvertRelevantWindowsPathsToUnix(assetsFile); + } + + var frameworks = new List(); + + // Act + var dependencyGraphs = DependencyGraphFinder.GetAllDependencyGraphsForTarget(assetsFile, package, frameworks); + + // Assert + Assert.Contains(dependencyGraphs["net9.0/win-x64"], dep => (dep.Id == "System.Private.Uri") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net9.0"], dep => (dep.Id == "System.Private.Uri") && (dep.Version == "4.3.2")); + } + + [Fact] + public void GetAllDependencyGraphsForTarget_MultiTfmMultiRid_FindsRIDSpecificPackages() + { + // Arrange + var lockFileFormat = new LockFileFormat(); + var lockFileContent = ProtocolUtility.GetResource("NuGet.CommandLine.Xplat.Tests.compiler.resources.Test.MultiTfmMultiRidProject.project.assets.json", GetType()); + var assetsFile = lockFileFormat.Parse(lockFileContent, "In Memory"); + + if (XunitAttributeUtility.CurrentPlatform == Platform.Linux || XunitAttributeUtility.CurrentPlatform == Platform.Darwin) + { + ConvertRelevantWindowsPathsToUnix(assetsFile); + } + + string targetPackage = "system.private.uri"; + var frameworks = new List(); + + // Act + var dependencyGraphs = DependencyGraphFinder.GetAllDependencyGraphsForTarget(assetsFile, targetPackage, frameworks); + + // Assert + Assert.Contains(dependencyGraphs["net9.0/win-x64"], dep => (dep.Id == "System.AppContext") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net9.0/win-x64"].First().Children, dep => (dep.Id == "System.Runtime") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net9.0/win-x64"].First().Children.First().Children, dep => (dep.Id == "runtime.any.System.Runtime") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net9.0/win-x64"].First().Children.First().Children.First().Children, dep => (dep.Id == "System.Private.Uri") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net8.0/win-x64"], dep => (dep.Id == "System.AppContext") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net8.0/win-x64"].First().Children, dep => (dep.Id == "System.Runtime") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net8.0/win-x64"].First().Children.First().Children, dep => (dep.Id == "runtime.any.System.Runtime") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net8.0/win-x64"].First().Children.First().Children.First().Children, dep => (dep.Id == "System.Private.Uri") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net9.0/linux-x64"], dep => (dep.Id == "System.AppContext") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net9.0/linux-x64"].First().Children, dep => (dep.Id == "System.Runtime") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net9.0/linux-x64"].First().Children.First().Children, dep => (dep.Id == "runtime.any.System.Runtime") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net9.0/linux-x64"].First().Children.First().Children.First().Children, dep => (dep.Id == "System.Private.Uri") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net8.0/linux-x64"], dep => (dep.Id == "System.AppContext") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net8.0/linux-x64"].First().Children, dep => (dep.Id == "System.Runtime") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net8.0/linux-x64"].First().Children.First().Children, dep => (dep.Id == "runtime.any.System.Runtime") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net8.0/linux-x64"].First().Children.First().Children.First().Children, dep => (dep.Id == "System.Private.Uri") && (dep.Version == "4.3.0")); + } + + [Fact] + public void GetAllDependencyGraphsForTarget_NoRidSpecificPackages_FindsRIDlessPackages() + { + // Arrange + var lockFileFormat = new LockFileFormat(); + var lockFileContent = ProtocolUtility.GetResource("NuGet.CommandLine.Xplat.Tests.compiler.resources.Test.NoPackageRidSpecificPackageProject.project.assets.json", GetType()); + var assetsFile = lockFileFormat.Parse(lockFileContent, "In Memory"); + + if (XunitAttributeUtility.CurrentPlatform == Platform.Linux || XunitAttributeUtility.CurrentPlatform == Platform.Darwin) + { + ConvertRelevantWindowsPathsToUnix(assetsFile); + } + + string targetPackage = "System.Runtime"; + var frameworks = new List(); + + // Act + var dependencyGraphs = DependencyGraphFinder.GetAllDependencyGraphsForTarget(assetsFile, targetPackage, frameworks); + + // Assert + Assert.Null(dependencyGraphs["net9.0/win-x64"]); + Assert.Contains(dependencyGraphs["net9.0"], dep => (dep.Id == "System.AppContext") && (dep.Version == "4.3.0")); + Assert.Contains(dependencyGraphs["net9.0"].First().Children, dep => (dep.Id == "System.Runtime") && (dep.Version == "4.3.0")); + } + private static void ConvertRelevantWindowsPathsToUnix(LockFile assetsFile) { assetsFile.PackageSpec.FilePath = ConvertWindowsPathToUnix(assetsFile.PackageSpec.FilePath); diff --git a/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/NuGet.CommandLine.Xplat.Tests.csproj b/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/NuGet.CommandLine.Xplat.Tests.csproj index b11dc3e500f..aeabb0c67ea 100644 --- a/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/NuGet.CommandLine.Xplat.Tests.csproj +++ b/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/NuGet.CommandLine.Xplat.Tests.csproj @@ -17,11 +17,11 @@ - - - - + + + + diff --git a/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/compiler/resources/Test.MultiTfmMultiRidProject.project.assets.json b/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/compiler/resources/Test.MultiTfmMultiRidProject.project.assets.json new file mode 100644 index 00000000000..221aa933f40 --- /dev/null +++ b/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/compiler/resources/Test.MultiTfmMultiRidProject.project.assets.json @@ -0,0 +1,891 @@ +{ + "version": 3, + "targets": { + "net8.0": { + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.NETCore.Targets/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "System.AppContext/4.3.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.6/System.AppContext.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard1.6/System.AppContext.dll": {} + } + }, + "System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.dll": { + "related": ".xml" + } + } + } + }, + "net8.0/linux-x64": { + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.NETCore.Targets/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "runtime.any.System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "System.Private.Uri": "4.3.0" + }, + "compile": { + "ref/netstandard/_._": {} + }, + "runtime": { + "lib/netstandard1.5/System.Runtime.dll": {} + } + }, + "runtime.native.System/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + }, + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "runtime.unix.System.Private.Uri/4.3.0": { + "type": "package", + "dependencies": { + "runtime.native.System": "4.3.0" + }, + "compile": { + "ref/netstandard/_._": {} + }, + "runtime": { + "runtimes/unix/lib/netstandard1.0/System.Private.Uri.dll": {} + } + }, + "System.AppContext/4.3.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.6/System.AppContext.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard1.6/System.AppContext.dll": {} + } + }, + "System.Private.Uri/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "runtime.unix.System.Private.Uri": "4.3.0" + }, + "compile": { + "ref/netstandard/_._": {} + } + }, + "System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "runtime.any.System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.dll": { + "related": ".xml" + } + } + } + }, + "net8.0/win-x64": { + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.NETCore.Targets/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "runtime.any.System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "System.Private.Uri": "4.3.0" + }, + "compile": { + "ref/netstandard/_._": {} + }, + "runtime": { + "lib/netstandard1.5/System.Runtime.dll": {} + } + }, + "System.AppContext/4.3.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.6/System.AppContext.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard1.6/System.AppContext.dll": {} + } + }, + "System.Private.Uri/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + }, + "compile": { + "ref/netstandard/_._": {} + } + }, + "System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "runtime.any.System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.dll": { + "related": ".xml" + } + } + } + }, + "net9.0": { + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.NETCore.Targets/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "System.AppContext/4.3.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.6/System.AppContext.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard1.6/System.AppContext.dll": {} + } + }, + "System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.dll": { + "related": ".xml" + } + } + } + }, + "net9.0/linux-x64": { + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.NETCore.Targets/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "runtime.any.System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "System.Private.Uri": "4.3.0" + }, + "compile": { + "ref/netstandard/_._": {} + }, + "runtime": { + "lib/netstandard1.5/System.Runtime.dll": {} + } + }, + "runtime.native.System/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + }, + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "runtime.unix.System.Private.Uri/4.3.0": { + "type": "package", + "dependencies": { + "runtime.native.System": "4.3.0" + }, + "compile": { + "ref/netstandard/_._": {} + }, + "runtime": { + "runtimes/unix/lib/netstandard1.0/System.Private.Uri.dll": {} + } + }, + "System.AppContext/4.3.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.6/System.AppContext.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard1.6/System.AppContext.dll": {} + } + }, + "System.Private.Uri/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "runtime.unix.System.Private.Uri": "4.3.0" + }, + "compile": { + "ref/netstandard/_._": {} + } + }, + "System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "runtime.any.System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.dll": { + "related": ".xml" + } + } + } + }, + "net9.0/win-x64": { + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.NETCore.Targets/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "runtime.any.System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "System.Private.Uri": "4.3.0" + }, + "compile": { + "ref/netstandard/_._": {} + }, + "runtime": { + "lib/netstandard1.5/System.Runtime.dll": {} + } + }, + "System.AppContext/4.3.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.6/System.AppContext.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard1.6/System.AppContext.dll": {} + } + }, + "System.Private.Uri/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + }, + "compile": { + "ref/netstandard/_._": {} + } + }, + "System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "runtime.any.System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.dll": { + "related": ".xml" + } + } + } + } + }, + "libraries": { + "Microsoft.NETCore.Platforms/1.1.0": { + "sha512": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", + "type": "package", + "path": "microsoft.netcore.platforms/1.1.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "microsoft.netcore.platforms.1.1.0.nupkg.sha512", + "microsoft.netcore.platforms.nuspec", + "runtime.json" + ] + }, + "Microsoft.NETCore.Targets/1.1.0": { + "sha512": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==", + "type": "package", + "path": "microsoft.netcore.targets/1.1.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "microsoft.netcore.targets.1.1.0.nupkg.sha512", + "microsoft.netcore.targets.nuspec", + "runtime.json" + ] + }, + "runtime.any.System.Runtime/4.3.0": { + "sha512": "fRS7zJgaG9NkifaAxGGclDDoRn9HC7hXACl52Or06a/fxdzDajWb5wov3c6a+gVSlekRoexfjwQSK9sh5um5LQ==", + "type": "package", + "path": "runtime.any.system.runtime/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Runtime.dll", + "lib/netstandard1.5/System.Runtime.dll", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/netstandard/_._", + "runtime.any.system.runtime.4.3.0.nupkg.sha512", + "runtime.any.system.runtime.nuspec", + "runtimes/aot/lib/netcore50/_._" + ] + }, + "runtime.native.System/4.3.0": { + "sha512": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", + "type": "package", + "path": "runtime.native.system/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "runtime.native.system.4.3.0.nupkg.sha512", + "runtime.native.system.nuspec" + ] + }, + "runtime.unix.System.Private.Uri/4.3.0": { + "sha512": "ooWzobr5RAq34r9uan1r/WPXJYG1XWy9KanrxNvEnBzbFdQbMG7Y3bVi4QxR7xZMNLOxLLTAyXvnSkfj5boZSg==", + "type": "package", + "path": "runtime.unix.system.private.uri/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "ref/netstandard/_._", + "runtime.unix.system.private.uri.4.3.0.nupkg.sha512", + "runtime.unix.system.private.uri.nuspec", + "runtimes/unix/lib/netstandard1.0/System.Private.Uri.dll" + ] + }, + "System.AppContext/4.3.0": { + "sha512": "fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", + "type": "package", + "path": "system.appcontext/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.AppContext.dll", + "lib/net463/System.AppContext.dll", + "lib/netcore50/System.AppContext.dll", + "lib/netstandard1.6/System.AppContext.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.AppContext.dll", + "ref/net463/System.AppContext.dll", + "ref/netstandard/_._", + "ref/netstandard1.3/System.AppContext.dll", + "ref/netstandard1.3/System.AppContext.xml", + "ref/netstandard1.3/de/System.AppContext.xml", + "ref/netstandard1.3/es/System.AppContext.xml", + "ref/netstandard1.3/fr/System.AppContext.xml", + "ref/netstandard1.3/it/System.AppContext.xml", + "ref/netstandard1.3/ja/System.AppContext.xml", + "ref/netstandard1.3/ko/System.AppContext.xml", + "ref/netstandard1.3/ru/System.AppContext.xml", + "ref/netstandard1.3/zh-hans/System.AppContext.xml", + "ref/netstandard1.3/zh-hant/System.AppContext.xml", + "ref/netstandard1.6/System.AppContext.dll", + "ref/netstandard1.6/System.AppContext.xml", + "ref/netstandard1.6/de/System.AppContext.xml", + "ref/netstandard1.6/es/System.AppContext.xml", + "ref/netstandard1.6/fr/System.AppContext.xml", + "ref/netstandard1.6/it/System.AppContext.xml", + "ref/netstandard1.6/ja/System.AppContext.xml", + "ref/netstandard1.6/ko/System.AppContext.xml", + "ref/netstandard1.6/ru/System.AppContext.xml", + "ref/netstandard1.6/zh-hans/System.AppContext.xml", + "ref/netstandard1.6/zh-hant/System.AppContext.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.AppContext.dll", + "system.appcontext.4.3.0.nupkg.sha512", + "system.appcontext.nuspec" + ] + }, + "System.Private.Uri/4.3.0": { + "sha512": "I4SwANiUGho1esj4V4oSlPllXjzCZDE+5XXso2P03LW2vOda2Enzh8DWOxwN6hnrJyp314c7KuVu31QYhRzOGg==", + "type": "package", + "path": "system.private.uri/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "ref/netstandard/_._", + "system.private.uri.4.3.0.nupkg.sha512", + "system.private.uri.nuspec" + ] + }, + "System.Runtime/4.3.0": { + "sha512": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "type": "package", + "path": "system.runtime/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Runtime.dll", + "lib/portable-net45+win8+wp80+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Runtime.dll", + "ref/netcore50/System.Runtime.dll", + "ref/netcore50/System.Runtime.xml", + "ref/netcore50/de/System.Runtime.xml", + "ref/netcore50/es/System.Runtime.xml", + "ref/netcore50/fr/System.Runtime.xml", + "ref/netcore50/it/System.Runtime.xml", + "ref/netcore50/ja/System.Runtime.xml", + "ref/netcore50/ko/System.Runtime.xml", + "ref/netcore50/ru/System.Runtime.xml", + "ref/netcore50/zh-hans/System.Runtime.xml", + "ref/netcore50/zh-hant/System.Runtime.xml", + "ref/netstandard1.0/System.Runtime.dll", + "ref/netstandard1.0/System.Runtime.xml", + "ref/netstandard1.0/de/System.Runtime.xml", + "ref/netstandard1.0/es/System.Runtime.xml", + "ref/netstandard1.0/fr/System.Runtime.xml", + "ref/netstandard1.0/it/System.Runtime.xml", + "ref/netstandard1.0/ja/System.Runtime.xml", + "ref/netstandard1.0/ko/System.Runtime.xml", + "ref/netstandard1.0/ru/System.Runtime.xml", + "ref/netstandard1.0/zh-hans/System.Runtime.xml", + "ref/netstandard1.0/zh-hant/System.Runtime.xml", + "ref/netstandard1.2/System.Runtime.dll", + "ref/netstandard1.2/System.Runtime.xml", + "ref/netstandard1.2/de/System.Runtime.xml", + "ref/netstandard1.2/es/System.Runtime.xml", + "ref/netstandard1.2/fr/System.Runtime.xml", + "ref/netstandard1.2/it/System.Runtime.xml", + "ref/netstandard1.2/ja/System.Runtime.xml", + "ref/netstandard1.2/ko/System.Runtime.xml", + "ref/netstandard1.2/ru/System.Runtime.xml", + "ref/netstandard1.2/zh-hans/System.Runtime.xml", + "ref/netstandard1.2/zh-hant/System.Runtime.xml", + "ref/netstandard1.3/System.Runtime.dll", + "ref/netstandard1.3/System.Runtime.xml", + "ref/netstandard1.3/de/System.Runtime.xml", + "ref/netstandard1.3/es/System.Runtime.xml", + "ref/netstandard1.3/fr/System.Runtime.xml", + "ref/netstandard1.3/it/System.Runtime.xml", + "ref/netstandard1.3/ja/System.Runtime.xml", + "ref/netstandard1.3/ko/System.Runtime.xml", + "ref/netstandard1.3/ru/System.Runtime.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.xml", + "ref/netstandard1.5/System.Runtime.dll", + "ref/netstandard1.5/System.Runtime.xml", + "ref/netstandard1.5/de/System.Runtime.xml", + "ref/netstandard1.5/es/System.Runtime.xml", + "ref/netstandard1.5/fr/System.Runtime.xml", + "ref/netstandard1.5/it/System.Runtime.xml", + "ref/netstandard1.5/ja/System.Runtime.xml", + "ref/netstandard1.5/ko/System.Runtime.xml", + "ref/netstandard1.5/ru/System.Runtime.xml", + "ref/netstandard1.5/zh-hans/System.Runtime.xml", + "ref/netstandard1.5/zh-hant/System.Runtime.xml", + "ref/portable-net45+win8+wp80+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "system.runtime.4.3.0.nupkg.sha512", + "system.runtime.nuspec" + ] + } + }, + "projectFileDependencyGroups": { + "net8.0": [ + "System.AppContext >= 4.3.0" + ], + "net9.0": [ + "System.AppContext >= 4.3.0" + ] + }, + "packageFolders": { + "C:\\Users\\nyenework\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "N:\\trash\\app\\app.csproj", + "projectName": "app", + "projectPath": "N:\\trash\\app\\app.csproj", + "packagesPath": "C:\\Users\\nyenework\\.nuget\\packages\\", + "outputPath": "N:\\trash\\app\\obj\\", + "projectStyle": "PackageReference", + "crossTargeting": true, + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\nyenework\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net8.0", + "net9.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "C:\\Program Files\\dotnet\\library-packs": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "projectReferences": {} + }, + "net9.0": { + "targetAlias": "net9.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "9.0.100" + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "dependencies": { + "System.AppContext": { + "target": "Package", + "version": "[4.3.0, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Runtime.linux-x64", + "version": "[8.0.7, 8.0.7]" + }, + { + "name": "Microsoft.AspNetCore.App.Runtime.win-x64", + "version": "[8.0.7, 8.0.7]" + }, + { + "name": "Microsoft.NETCore.App.Host.linux-x64", + "version": "[8.0.7, 8.0.7]" + }, + { + "name": "Microsoft.NETCore.App.Runtime.linux-x64", + "version": "[8.0.7, 8.0.7]" + }, + { + "name": "Microsoft.NETCore.App.Runtime.win-x64", + "version": "[8.0.7, 8.0.7]" + }, + { + "name": "Microsoft.WindowsDesktop.App.Runtime.win-x64", + "version": "[8.0.7, 8.0.7]" + } + ], + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100-preview.7.24407.12/PortableRuntimeIdentifierGraph.json" + }, + "net9.0": { + "targetAlias": "net9.0", + "dependencies": { + "System.AppContext": { + "target": "Package", + "version": "[4.3.0, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Runtime.linux-x64", + "version": "[9.0.0-preview.7.24406.2, 9.0.0-preview.7.24406.2]" + }, + { + "name": "Microsoft.AspNetCore.App.Runtime.win-x64", + "version": "[9.0.0-preview.7.24406.2, 9.0.0-preview.7.24406.2]" + }, + { + "name": "Microsoft.NETCore.App.Host.linux-x64", + "version": "[9.0.0-preview.7.24405.7, 9.0.0-preview.7.24405.7]" + }, + { + "name": "Microsoft.NETCore.App.Runtime.linux-x64", + "version": "[9.0.0-preview.7.24405.7, 9.0.0-preview.7.24405.7]" + }, + { + "name": "Microsoft.NETCore.App.Runtime.win-x64", + "version": "[9.0.0-preview.7.24405.7, 9.0.0-preview.7.24405.7]" + }, + { + "name": "Microsoft.WindowsDesktop.App.Runtime.win-x64", + "version": "[9.0.0-preview.7.24405.2, 9.0.0-preview.7.24405.2]" + } + ], + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100-preview.7.24407.12/PortableRuntimeIdentifierGraph.json" + } + }, + "runtimes": { + "linux-x64": { + "#import": [] + }, + "win-x64": { + "#import": [] + } + } + }, + "logs": [ + { + "code": "NU1903", + "level": "Warning", + "warningLevel": 1, + "message": "Package 'System.Private.Uri' 4.3.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-5f2m-466j-3848", + "libraryId": "System.Private.Uri", + "targetGraphs": [ + "net8.0/linux-x64", + "net8.0/win-x64", + "net9.0/linux-x64", + "net9.0/win-x64" + ] + }, + { + "code": "NU1902", + "level": "Warning", + "warningLevel": 1, + "message": "Package 'System.Private.Uri' 4.3.0 has a known moderate severity vulnerability, https://github.com/advisories/GHSA-x5qj-9vmx-7g6g", + "libraryId": "System.Private.Uri", + "targetGraphs": [ + "net8.0/linux-x64", + "net8.0/win-x64", + "net9.0/linux-x64", + "net9.0/win-x64" + ] + }, + { + "code": "NU1903", + "level": "Warning", + "warningLevel": 1, + "message": "Package 'System.Private.Uri' 4.3.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-xhfc-gr8f-ffwc", + "libraryId": "System.Private.Uri", + "targetGraphs": [ + "net8.0/linux-x64", + "net8.0/win-x64", + "net9.0/linux-x64", + "net9.0/win-x64" + ] + } + ] +} diff --git a/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/compiler/resources/Test.NoPackageRidSpecificPackageProject.project.assets.json b/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/compiler/resources/Test.NoPackageRidSpecificPackageProject.project.assets.json new file mode 100644 index 00000000000..79708f5b3fc --- /dev/null +++ b/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/compiler/resources/Test.NoPackageRidSpecificPackageProject.project.assets.json @@ -0,0 +1,455 @@ +{ + "version": 3, + "targets": { + "net9.0": { + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.NETCore.Targets/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "System.AppContext/4.3.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.6/System.AppContext.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard1.6/System.AppContext.dll": {} + } + }, + "System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.dll": { + "related": ".xml" + } + } + } + }, + "net9.0/linux-x64": { + }, + "net9.0/win-x64": { + } + }, + "libraries": { + "Microsoft.NETCore.Platforms/1.1.0": { + "sha512": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", + "type": "package", + "path": "microsoft.netcore.platforms/1.1.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "microsoft.netcore.platforms.1.1.0.nupkg.sha512", + "microsoft.netcore.platforms.nuspec", + "runtime.json" + ] + }, + "Microsoft.NETCore.Targets/1.1.0": { + "sha512": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==", + "type": "package", + "path": "microsoft.netcore.targets/1.1.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "microsoft.netcore.targets.1.1.0.nupkg.sha512", + "microsoft.netcore.targets.nuspec", + "runtime.json" + ] + }, + "runtime.any.System.Runtime/4.3.0": { + "sha512": "fRS7zJgaG9NkifaAxGGclDDoRn9HC7hXACl52Or06a/fxdzDajWb5wov3c6a+gVSlekRoexfjwQSK9sh5um5LQ==", + "type": "package", + "path": "runtime.any.system.runtime/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Runtime.dll", + "lib/netstandard1.5/System.Runtime.dll", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/netstandard/_._", + "runtime.any.system.runtime.4.3.0.nupkg.sha512", + "runtime.any.system.runtime.nuspec", + "runtimes/aot/lib/netcore50/_._" + ] + }, + "runtime.native.System/4.3.0": { + "sha512": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", + "type": "package", + "path": "runtime.native.system/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "runtime.native.system.4.3.0.nupkg.sha512", + "runtime.native.system.nuspec" + ] + }, + "runtime.unix.System.Private.Uri/4.3.0": { + "sha512": "ooWzobr5RAq34r9uan1r/WPXJYG1XWy9KanrxNvEnBzbFdQbMG7Y3bVi4QxR7xZMNLOxLLTAyXvnSkfj5boZSg==", + "type": "package", + "path": "runtime.unix.system.private.uri/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "ref/netstandard/_._", + "runtime.unix.system.private.uri.4.3.0.nupkg.sha512", + "runtime.unix.system.private.uri.nuspec", + "runtimes/unix/lib/netstandard1.0/System.Private.Uri.dll" + ] + }, + "System.AppContext/4.3.0": { + "sha512": "fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", + "type": "package", + "path": "system.appcontext/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.AppContext.dll", + "lib/net463/System.AppContext.dll", + "lib/netcore50/System.AppContext.dll", + "lib/netstandard1.6/System.AppContext.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.AppContext.dll", + "ref/net463/System.AppContext.dll", + "ref/netstandard/_._", + "ref/netstandard1.3/System.AppContext.dll", + "ref/netstandard1.3/System.AppContext.xml", + "ref/netstandard1.3/de/System.AppContext.xml", + "ref/netstandard1.3/es/System.AppContext.xml", + "ref/netstandard1.3/fr/System.AppContext.xml", + "ref/netstandard1.3/it/System.AppContext.xml", + "ref/netstandard1.3/ja/System.AppContext.xml", + "ref/netstandard1.3/ko/System.AppContext.xml", + "ref/netstandard1.3/ru/System.AppContext.xml", + "ref/netstandard1.3/zh-hans/System.AppContext.xml", + "ref/netstandard1.3/zh-hant/System.AppContext.xml", + "ref/netstandard1.6/System.AppContext.dll", + "ref/netstandard1.6/System.AppContext.xml", + "ref/netstandard1.6/de/System.AppContext.xml", + "ref/netstandard1.6/es/System.AppContext.xml", + "ref/netstandard1.6/fr/System.AppContext.xml", + "ref/netstandard1.6/it/System.AppContext.xml", + "ref/netstandard1.6/ja/System.AppContext.xml", + "ref/netstandard1.6/ko/System.AppContext.xml", + "ref/netstandard1.6/ru/System.AppContext.xml", + "ref/netstandard1.6/zh-hans/System.AppContext.xml", + "ref/netstandard1.6/zh-hant/System.AppContext.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.AppContext.dll", + "system.appcontext.4.3.0.nupkg.sha512", + "system.appcontext.nuspec" + ] + }, + "System.Private.Uri/4.3.0": { + "sha512": "I4SwANiUGho1esj4V4oSlPllXjzCZDE+5XXso2P03LW2vOda2Enzh8DWOxwN6hnrJyp314c7KuVu31QYhRzOGg==", + "type": "package", + "path": "system.private.uri/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "ref/netstandard/_._", + "system.private.uri.4.3.0.nupkg.sha512", + "system.private.uri.nuspec" + ] + }, + "System.Runtime/4.3.0": { + "sha512": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "type": "package", + "path": "system.runtime/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Runtime.dll", + "lib/portable-net45+win8+wp80+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Runtime.dll", + "ref/netcore50/System.Runtime.dll", + "ref/netcore50/System.Runtime.xml", + "ref/netcore50/de/System.Runtime.xml", + "ref/netcore50/es/System.Runtime.xml", + "ref/netcore50/fr/System.Runtime.xml", + "ref/netcore50/it/System.Runtime.xml", + "ref/netcore50/ja/System.Runtime.xml", + "ref/netcore50/ko/System.Runtime.xml", + "ref/netcore50/ru/System.Runtime.xml", + "ref/netcore50/zh-hans/System.Runtime.xml", + "ref/netcore50/zh-hant/System.Runtime.xml", + "ref/netstandard1.0/System.Runtime.dll", + "ref/netstandard1.0/System.Runtime.xml", + "ref/netstandard1.0/de/System.Runtime.xml", + "ref/netstandard1.0/es/System.Runtime.xml", + "ref/netstandard1.0/fr/System.Runtime.xml", + "ref/netstandard1.0/it/System.Runtime.xml", + "ref/netstandard1.0/ja/System.Runtime.xml", + "ref/netstandard1.0/ko/System.Runtime.xml", + "ref/netstandard1.0/ru/System.Runtime.xml", + "ref/netstandard1.0/zh-hans/System.Runtime.xml", + "ref/netstandard1.0/zh-hant/System.Runtime.xml", + "ref/netstandard1.2/System.Runtime.dll", + "ref/netstandard1.2/System.Runtime.xml", + "ref/netstandard1.2/de/System.Runtime.xml", + "ref/netstandard1.2/es/System.Runtime.xml", + "ref/netstandard1.2/fr/System.Runtime.xml", + "ref/netstandard1.2/it/System.Runtime.xml", + "ref/netstandard1.2/ja/System.Runtime.xml", + "ref/netstandard1.2/ko/System.Runtime.xml", + "ref/netstandard1.2/ru/System.Runtime.xml", + "ref/netstandard1.2/zh-hans/System.Runtime.xml", + "ref/netstandard1.2/zh-hant/System.Runtime.xml", + "ref/netstandard1.3/System.Runtime.dll", + "ref/netstandard1.3/System.Runtime.xml", + "ref/netstandard1.3/de/System.Runtime.xml", + "ref/netstandard1.3/es/System.Runtime.xml", + "ref/netstandard1.3/fr/System.Runtime.xml", + "ref/netstandard1.3/it/System.Runtime.xml", + "ref/netstandard1.3/ja/System.Runtime.xml", + "ref/netstandard1.3/ko/System.Runtime.xml", + "ref/netstandard1.3/ru/System.Runtime.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.xml", + "ref/netstandard1.5/System.Runtime.dll", + "ref/netstandard1.5/System.Runtime.xml", + "ref/netstandard1.5/de/System.Runtime.xml", + "ref/netstandard1.5/es/System.Runtime.xml", + "ref/netstandard1.5/fr/System.Runtime.xml", + "ref/netstandard1.5/it/System.Runtime.xml", + "ref/netstandard1.5/ja/System.Runtime.xml", + "ref/netstandard1.5/ko/System.Runtime.xml", + "ref/netstandard1.5/ru/System.Runtime.xml", + "ref/netstandard1.5/zh-hans/System.Runtime.xml", + "ref/netstandard1.5/zh-hant/System.Runtime.xml", + "ref/portable-net45+win8+wp80+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "system.runtime.4.3.0.nupkg.sha512", + "system.runtime.nuspec" + ] + } + }, + "projectFileDependencyGroups": { + "net9.0": [ + "System.AppContext >= 4.3.0" + ] + }, + "packageFolders": { + "C:\\Users\\nyenework\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "N:\\trash\\app\\app.csproj", + "projectName": "app", + "projectPath": "N:\\trash\\app\\app.csproj", + "packagesPath": "C:\\Users\\nyenework\\.nuget\\packages\\", + "outputPath": "N:\\trash\\app\\obj\\", + "projectStyle": "PackageReference", + "crossTargeting": true, + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\nyenework\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net9.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "C:\\Program Files\\dotnet\\library-packs": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "9.0.100" + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "dependencies": { + "System.AppContext": { + "target": "Package", + "version": "[4.3.0, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Runtime.linux-x64", + "version": "[9.0.0-preview.7.24406.2, 9.0.0-preview.7.24406.2]" + }, + { + "name": "Microsoft.AspNetCore.App.Runtime.win-x64", + "version": "[9.0.0-preview.7.24406.2, 9.0.0-preview.7.24406.2]" + }, + { + "name": "Microsoft.NETCore.App.Host.linux-x64", + "version": "[9.0.0-preview.7.24405.7, 9.0.0-preview.7.24405.7]" + }, + { + "name": "Microsoft.NETCore.App.Runtime.linux-x64", + "version": "[9.0.0-preview.7.24405.7, 9.0.0-preview.7.24405.7]" + }, + { + "name": "Microsoft.NETCore.App.Runtime.win-x64", + "version": "[9.0.0-preview.7.24405.7, 9.0.0-preview.7.24405.7]" + }, + { + "name": "Microsoft.WindowsDesktop.App.Runtime.win-x64", + "version": "[9.0.0-preview.7.24405.2, 9.0.0-preview.7.24405.2]" + } + ], + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100-preview.7.24407.12/PortableRuntimeIdentifierGraph.json" + } + }, + "runtimes": { + "linux-x64": { + "#import": [] + }, + "win-x64": { + "#import": [] + } + } + }, + "logs": [ + { + "code": "NU1903", + "level": "Warning", + "warningLevel": 1, + "message": "Package 'System.Private.Uri' 4.3.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-5f2m-466j-3848", + "libraryId": "System.Private.Uri", + "targetGraphs": [ + "net9.0/linux-x64", + "net9.0/win-x64" + ] + }, + { + "code": "NU1902", + "level": "Warning", + "warningLevel": 1, + "message": "Package 'System.Private.Uri' 4.3.0 has a known moderate severity vulnerability, https://github.com/advisories/GHSA-x5qj-9vmx-7g6g", + "libraryId": "System.Private.Uri", + "targetGraphs": [ + "net9.0/linux-x64", + "net9.0/win-x64" + ] + }, + { + "code": "NU1903", + "level": "Warning", + "warningLevel": 1, + "message": "Package 'System.Private.Uri' 4.3.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-xhfc-gr8f-ffwc", + "libraryId": "System.Private.Uri", + "targetGraphs": [ + "net9.0/linux-x64", + "net9.0/win-x64" + ] + } + ] +} diff --git a/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/compiler/resources/Test.SampleProject2.project.assets.json b/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/compiler/resources/Test.SampleProject2.project.assets.json new file mode 100644 index 00000000000..b2b5eb63e6d --- /dev/null +++ b/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/compiler/resources/Test.SampleProject2.project.assets.json @@ -0,0 +1,472 @@ +{ + "version": 3, + "targets": { + "net9.0": { + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.NETCore.Targets/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "System.AppContext/4.3.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.6/System.AppContext.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard1.6/System.AppContext.dll": {} + } + }, + "System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.dll": { + "related": ".xml" + } + } + } + }, + "net9.0/win-x64": { + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.NETCore.Targets/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "runtime.any.System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "System.Private.Uri": "4.3.0" + }, + "compile": { + "ref/netstandard/_._": {} + }, + "runtime": { + "lib/netstandard1.5/System.Runtime.dll": {} + } + }, + "System.AppContext/4.3.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.6/System.AppContext.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard1.6/System.AppContext.dll": {} + } + }, + "System.Private.Uri/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + }, + "compile": { + "ref/netstandard/_._": {} + } + }, + "System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "runtime.any.System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.dll": { + "related": ".xml" + } + } + } + } + }, + "libraries": { + "Microsoft.NETCore.Platforms/1.1.0": { + "sha512": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", + "type": "package", + "path": "microsoft.netcore.platforms/1.1.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "microsoft.netcore.platforms.1.1.0.nupkg.sha512", + "microsoft.netcore.platforms.nuspec", + "runtime.json" + ] + }, + "Microsoft.NETCore.Targets/1.1.0": { + "sha512": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==", + "type": "package", + "path": "microsoft.netcore.targets/1.1.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "microsoft.netcore.targets.1.1.0.nupkg.sha512", + "microsoft.netcore.targets.nuspec", + "runtime.json" + ] + }, + "runtime.any.System.Runtime/4.3.0": { + "sha512": "fRS7zJgaG9NkifaAxGGclDDoRn9HC7hXACl52Or06a/fxdzDajWb5wov3c6a+gVSlekRoexfjwQSK9sh5um5LQ==", + "type": "package", + "path": "runtime.any.system.runtime/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Runtime.dll", + "lib/netstandard1.5/System.Runtime.dll", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/netstandard/_._", + "runtime.any.system.runtime.4.3.0.nupkg.sha512", + "runtime.any.system.runtime.nuspec", + "runtimes/aot/lib/netcore50/_._" + ] + }, + "System.AppContext/4.3.0": { + "sha512": "fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", + "type": "package", + "path": "system.appcontext/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.AppContext.dll", + "lib/net463/System.AppContext.dll", + "lib/netcore50/System.AppContext.dll", + "lib/netstandard1.6/System.AppContext.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.AppContext.dll", + "ref/net463/System.AppContext.dll", + "ref/netstandard/_._", + "ref/netstandard1.3/System.AppContext.dll", + "ref/netstandard1.3/System.AppContext.xml", + "ref/netstandard1.3/de/System.AppContext.xml", + "ref/netstandard1.3/es/System.AppContext.xml", + "ref/netstandard1.3/fr/System.AppContext.xml", + "ref/netstandard1.3/it/System.AppContext.xml", + "ref/netstandard1.3/ja/System.AppContext.xml", + "ref/netstandard1.3/ko/System.AppContext.xml", + "ref/netstandard1.3/ru/System.AppContext.xml", + "ref/netstandard1.3/zh-hans/System.AppContext.xml", + "ref/netstandard1.3/zh-hant/System.AppContext.xml", + "ref/netstandard1.6/System.AppContext.dll", + "ref/netstandard1.6/System.AppContext.xml", + "ref/netstandard1.6/de/System.AppContext.xml", + "ref/netstandard1.6/es/System.AppContext.xml", + "ref/netstandard1.6/fr/System.AppContext.xml", + "ref/netstandard1.6/it/System.AppContext.xml", + "ref/netstandard1.6/ja/System.AppContext.xml", + "ref/netstandard1.6/ko/System.AppContext.xml", + "ref/netstandard1.6/ru/System.AppContext.xml", + "ref/netstandard1.6/zh-hans/System.AppContext.xml", + "ref/netstandard1.6/zh-hant/System.AppContext.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.AppContext.dll", + "system.appcontext.4.3.0.nupkg.sha512", + "system.appcontext.nuspec" + ] + }, + "System.Private.Uri/4.3.0": { + "sha512": "I4SwANiUGho1esj4V4oSlPllXjzCZDE+5XXso2P03LW2vOda2Enzh8DWOxwN6hnrJyp314c7KuVu31QYhRzOGg==", + "type": "package", + "path": "system.private.uri/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "ref/netstandard/_._", + "system.private.uri.4.3.0.nupkg.sha512", + "system.private.uri.nuspec" + ] + }, + "System.Runtime/4.3.0": { + "sha512": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "type": "package", + "path": "system.runtime/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Runtime.dll", + "lib/portable-net45+win8+wp80+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Runtime.dll", + "ref/netcore50/System.Runtime.dll", + "ref/netcore50/System.Runtime.xml", + "ref/netcore50/de/System.Runtime.xml", + "ref/netcore50/es/System.Runtime.xml", + "ref/netcore50/fr/System.Runtime.xml", + "ref/netcore50/it/System.Runtime.xml", + "ref/netcore50/ja/System.Runtime.xml", + "ref/netcore50/ko/System.Runtime.xml", + "ref/netcore50/ru/System.Runtime.xml", + "ref/netcore50/zh-hans/System.Runtime.xml", + "ref/netcore50/zh-hant/System.Runtime.xml", + "ref/netstandard1.0/System.Runtime.dll", + "ref/netstandard1.0/System.Runtime.xml", + "ref/netstandard1.0/de/System.Runtime.xml", + "ref/netstandard1.0/es/System.Runtime.xml", + "ref/netstandard1.0/fr/System.Runtime.xml", + "ref/netstandard1.0/it/System.Runtime.xml", + "ref/netstandard1.0/ja/System.Runtime.xml", + "ref/netstandard1.0/ko/System.Runtime.xml", + "ref/netstandard1.0/ru/System.Runtime.xml", + "ref/netstandard1.0/zh-hans/System.Runtime.xml", + "ref/netstandard1.0/zh-hant/System.Runtime.xml", + "ref/netstandard1.2/System.Runtime.dll", + "ref/netstandard1.2/System.Runtime.xml", + "ref/netstandard1.2/de/System.Runtime.xml", + "ref/netstandard1.2/es/System.Runtime.xml", + "ref/netstandard1.2/fr/System.Runtime.xml", + "ref/netstandard1.2/it/System.Runtime.xml", + "ref/netstandard1.2/ja/System.Runtime.xml", + "ref/netstandard1.2/ko/System.Runtime.xml", + "ref/netstandard1.2/ru/System.Runtime.xml", + "ref/netstandard1.2/zh-hans/System.Runtime.xml", + "ref/netstandard1.2/zh-hant/System.Runtime.xml", + "ref/netstandard1.3/System.Runtime.dll", + "ref/netstandard1.3/System.Runtime.xml", + "ref/netstandard1.3/de/System.Runtime.xml", + "ref/netstandard1.3/es/System.Runtime.xml", + "ref/netstandard1.3/fr/System.Runtime.xml", + "ref/netstandard1.3/it/System.Runtime.xml", + "ref/netstandard1.3/ja/System.Runtime.xml", + "ref/netstandard1.3/ko/System.Runtime.xml", + "ref/netstandard1.3/ru/System.Runtime.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.xml", + "ref/netstandard1.5/System.Runtime.dll", + "ref/netstandard1.5/System.Runtime.xml", + "ref/netstandard1.5/de/System.Runtime.xml", + "ref/netstandard1.5/es/System.Runtime.xml", + "ref/netstandard1.5/fr/System.Runtime.xml", + "ref/netstandard1.5/it/System.Runtime.xml", + "ref/netstandard1.5/ja/System.Runtime.xml", + "ref/netstandard1.5/ko/System.Runtime.xml", + "ref/netstandard1.5/ru/System.Runtime.xml", + "ref/netstandard1.5/zh-hans/System.Runtime.xml", + "ref/netstandard1.5/zh-hant/System.Runtime.xml", + "ref/portable-net45+win8+wp80+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "system.runtime.4.3.0.nupkg.sha512", + "system.runtime.nuspec" + ] + } + }, + "projectFileDependencyGroups": { + "net9.0": [ + "System.AppContext >= 4.3.0" + ] + }, + "packageFolders": { + "C:\\Users\\nyenework\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "N:\\trash\\app\\app.csproj", + "projectName": "app", + "projectPath": "N:\\trash\\app\\app.csproj", + "packagesPath": "C:\\Users\\nyenework\\.nuget\\packages\\", + "outputPath": "N:\\trash\\app\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\nyenework\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net9.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "C:\\Program Files\\dotnet\\library-packs": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "9.0.100" + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "dependencies": { + "System.AppContext": { + "target": "Package", + "version": "[4.3.0, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Runtime.win-x64", + "version": "[9.0.0-preview.7.24406.2, 9.0.0-preview.7.24406.2]" + }, + { + "name": "Microsoft.NETCore.App.Runtime.win-x64", + "version": "[9.0.0-preview.7.24405.7, 9.0.0-preview.7.24405.7]" + }, + { + "name": "Microsoft.WindowsDesktop.App.Runtime.win-x64", + "version": "[9.0.0-preview.7.24405.2, 9.0.0-preview.7.24405.2]" + } + ], + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100-preview.7.24407.12/PortableRuntimeIdentifierGraph.json" + } + }, + "runtimes": { + "win-x64": { + "#import": [] + } + } + }, + "logs": [ + { + "code": "NU1903", + "level": "Warning", + "warningLevel": 1, + "message": "Package 'System.Private.Uri' 4.3.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-5f2m-466j-3848", + "libraryId": "System.Private.Uri", + "targetGraphs": [ + "net9.0/win-x64" + ] + }, + { + "code": "NU1902", + "level": "Warning", + "warningLevel": 1, + "message": "Package 'System.Private.Uri' 4.3.0 has a known moderate severity vulnerability, https://github.com/advisories/GHSA-x5qj-9vmx-7g6g", + "libraryId": "System.Private.Uri", + "targetGraphs": [ + "net9.0/win-x64" + ] + }, + { + "code": "NU1903", + "level": "Warning", + "warningLevel": 1, + "message": "Package 'System.Private.Uri' 4.3.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-xhfc-gr8f-ffwc", + "libraryId": "System.Private.Uri", + "targetGraphs": [ + "net9.0/win-x64" + ] + } + ] +} diff --git a/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/compiler/resources/Test.TwoDifferentVersions.project.assets.json b/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/compiler/resources/Test.TwoDifferentVersions.project.assets.json new file mode 100644 index 00000000000..c4239734171 --- /dev/null +++ b/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/compiler/resources/Test.TwoDifferentVersions.project.assets.json @@ -0,0 +1,145 @@ +{ + "version": 3, + "targets": { + "net9.0": { + "System.Private.Uri/4.3.2": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.1", + "Microsoft.NETCore.Targets": "1.1.3" + }, + "compile": { + "ref/netstandard/_._": {} + } + } + }, + "net9.0/win-x64": { + "System.Private.Uri/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.1", + "Microsoft.NETCore.Targets": "1.1.3" + }, + "compile": { + "ref/netstandard/_._": {} + } + } + } + }, + "libraries": { + "System.Private.Uri/4.3.2": { + "sha512": "o1+7RJnu3Ik3PazR7Z7tJhjPdE000Eq2KGLLWhqJJKXj04wrS8lwb1OFtDF9jzXXADhUuZNJZlPc98uwwqmpFA==", + "type": "package", + "path": "system.private.uri/4.3.2", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "ref/netstandard/_._", + "system.private.uri.4.3.2.nupkg.sha512", + "system.private.uri.nuspec" + ] + } + }, + "projectFileDependencyGroups": { + "net9.0": [ + "System.Private.Uri >= 4.3.2" + ] + }, + "packageFolders": { + "C:\\Users\\nyenework\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "N:\\trash\\app\\app.csproj", + "projectName": "app", + "projectPath": "N:\\trash\\app\\app.csproj", + "packagesPath": "C:\\Users\\nyenework\\.nuget\\packages\\", + "outputPath": "N:\\trash\\app\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\nyenework\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net9.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "C:\\Program Files\\dotnet\\library-packs": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "9.0.100" + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "dependencies": { + "System.Private.Uri": { + "target": "Package", + "version": "[4.3.2, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Runtime.win-x64", + "version": "[9.0.0-preview.7.24406.2, 9.0.0-preview.7.24406.2]" + }, + { + "name": "Microsoft.NETCore.App.Runtime.win-x64", + "version": "[9.0.0-preview.7.24405.7, 9.0.0-preview.7.24405.7]" + }, + { + "name": "Microsoft.WindowsDesktop.App.Runtime.win-x64", + "version": "[9.0.0-preview.7.24405.2, 9.0.0-preview.7.24405.2]" + } + ], + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100-preview.7.24407.12/PortableRuntimeIdentifierGraph.json" + } + }, + "runtimes": { + "win-x64": { + "#import": [] + } + } + } +}