Skip to content

Include localPath in deps.json for runtime assets #50120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using FluentAssertions.Json;
using Microsoft.Build.Framework;
using Microsoft.Extensions.DependencyModel;
using Microsoft.NET.TestFramework;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NuGet.Frameworks;
Expand Down Expand Up @@ -229,7 +230,7 @@ private static DependencyContext BuildDependencyContextFromDependenciesWithResou
[]);
string mainProjectDirectory = Path.GetDirectoryName(mainProject.ProjectPath);


ITaskItem[] referencePaths = dllReference ? references.Select(reference =>
new MockTaskItem($"/usr/Path/{reference}.dll", new Dictionary<string, string> {
{ "CopyLocal", "false" },
Expand Down Expand Up @@ -529,5 +530,186 @@ void CheckRuntimeFallbacks(string runtimeIdentifier, int fallbackCount)
CheckRuntimeFallbacks("new_os-new_arch", 1);
CheckRuntimeFallbacks("unrelated_os-unknown_arch", 0);
}

[Fact]
public void ItIncludesLocalPathForResolvedNuGetFiles()
{
string mainProjectName = "simple.dependencies";
LockFile lockFile = TestLockFiles.GetLockFile(mainProjectName);
LockFileLookup lockFileLookup = new(lockFile);

SingleProjectInfo mainProject = SingleProjectInfo.Create(
"/usr/Path",
mainProjectName,
".dll",
"1.0.0",
[]);

ProjectContext projectContext = lockFile.CreateProjectContext(
FrameworkConstants.CommonFrameworks.NetCoreApp10.GetShortFolderName(),
runtime: null,
Constants.DefaultPlatformLibrary,
runtimeFrameworks: null,
isSelfContained: false);

string packageName = "Newtonsoft.Json";
string packageVersion = "9.0.1";

// Runtime assemblies
ResolvedFile runtime = new(
"Newtonsoft.Json.dll",
destinationSubDirectory: null,
new PackageIdentity(packageName, new NuGetVersion(packageVersion)),
AssetType.Runtime,
$"lib/{ToolsetInfo.CurrentTargetFramework}/Newtonsoft.Json.dll");
ResolvedFile runtimeWithCustomSubPath = new(
"CustomSubPath.dll",
"pkg/",
new PackageIdentity(packageName, new NuGetVersion(packageVersion)),
AssetType.Runtime,
$"lib/{ToolsetInfo.CurrentTargetFramework}/CustomSubPath.dll");

// Native libraries
ResolvedFile native = new(
"nativelib.dll",
"runtimes/win-x64/native/",
new PackageIdentity(packageName, new NuGetVersion(packageVersion)),
AssetType.Native,
"runtimes/win-x64/native/nativelib.dll");
ResolvedFile nativeWithCustomSubPath = new(
"nativecustomsubpath.dll",
"pkg/runtimes/win-x64/native/",
new PackageIdentity(packageName, new NuGetVersion(packageVersion)),
AssetType.Native,
"runtimes/win-x64/native/nativecustomsubpath.dll");

// Resource assemblies
MockTaskItem resourceTaskItem = new("de/Newtonsoft.Json.resources.dll",
new Dictionary<string, string>
{
[MetadataKeys.DestinationSubDirectory] = "de/",
[MetadataKeys.AssetType] = "resources",
[MetadataKeys.NuGetPackageId] = packageName,
[MetadataKeys.NuGetPackageVersion] = packageVersion,
[MetadataKeys.PathInPackage] = $"lib/{ToolsetInfo.CurrentTargetFramework}/de/Newtonsoft.Json.resources.dll",
[MetadataKeys.Culture] = "de",
});
MockTaskItem resourceWithCustomSubPathTaskItem = new("fr/Newtonsoft.Json.resources.dll",
new Dictionary<string, string>
{
[MetadataKeys.DestinationSubDirectory] = "pkg/fr/",
[MetadataKeys.AssetType] = "resources",
[MetadataKeys.NuGetPackageId] = packageName,
[MetadataKeys.NuGetPackageVersion] = packageVersion,
[MetadataKeys.PathInPackage] = $"lib/{ToolsetInfo.CurrentTargetFramework}/fr/Newtonsoft.Json.resources.dll",
[MetadataKeys.Culture] = "fr",
});
ResolvedFile resource = new(resourceTaskItem, false);
ResolvedFile resourceWithCustomSubPath = new(resourceWithCustomSubPathTaskItem, false);

DependencyContext dependencyContext = new DependencyContextBuilder(mainProject, includeRuntimeFileVersions: false, runtimeGraph: null, projectContext: projectContext, libraryLookup: lockFileLookup)
.WithResolvedNuGetFiles([runtime, runtimeWithCustomSubPath, native, nativeWithCustomSubPath, resource, resourceWithCustomSubPath])
.Build();

var library = dependencyContext.RuntimeLibraries.FirstOrDefault(l => l.Name == "Newtonsoft.Json");
library.Should().NotBeNull();

// Runtime assembly
library.RuntimeAssemblyGroups.Should().HaveCount(1);
IReadOnlyList<RuntimeFile> runtimeFiles = library.RuntimeAssemblyGroups[0].RuntimeFiles;
runtimeFiles.Should().HaveCount(2);
runtimeFiles.Should().Contain(
f => f.LocalPath == runtime.DestinationSubPath && f.Path == runtime.PathInPackage,
$"runtime assemblies should have item with LocalPath={runtime.DestinationSubPath} and Path matching {runtime.PathInPackage}");
runtimeFiles.Should().Contain(
f => f.LocalPath == runtimeWithCustomSubPath.DestinationSubPath && f.Path == runtimeWithCustomSubPath.PathInPackage,
$"runtime assemblies should have item with LocalPath={runtimeWithCustomSubPath.DestinationSubPath} and Path matching {runtimeWithCustomSubPath.PathInPackage}");

// Native library
library.NativeLibraryGroups.Should().HaveCount(1);
IReadOnlyList<RuntimeFile> nativeFiles = library.NativeLibraryGroups[0].RuntimeFiles;
nativeFiles.Should().HaveCount(2);
nativeFiles.Should().Contain(
f => f.LocalPath == native.DestinationSubPath && f.Path == native.PathInPackage,
$"native libraries should have item with LocalPath={native.PathInPackage} and Path={native.DestinationSubPath}");
nativeFiles.Should().Contain(
f => f.LocalPath == nativeWithCustomSubPath.DestinationSubPath && f.Path == nativeWithCustomSubPath.PathInPackage,
$"native libraries should have item with LocalPath={nativeWithCustomSubPath.PathInPackage} and Path={nativeWithCustomSubPath.DestinationSubPath}");

// Resource assembly
IReadOnlyList<ResourceAssembly> resourceAssemblies = library.ResourceAssemblies;
resourceAssemblies.Should().HaveCount(2);
resourceAssemblies.Should().Contain(
f => f.LocalPath == resource.DestinationSubPath && f.Path == resource.PathInPackage,
$"resource assemblies should have item with LocalPath={resource.PathInPackage} and Path={resource.DestinationSubPath}");
resourceAssemblies.Should().Contain(
f => f.LocalPath == resourceWithCustomSubPath.DestinationSubPath && f.Path == resourceWithCustomSubPath.PathInPackage,
$"resource assemblies should have item with LocalPath={resourceWithCustomSubPath.PathInPackage} and Path={resourceWithCustomSubPath.DestinationSubPath}");
}

[Fact]
public void ItIncludesLocalPathForReferences()
{
string mainProjectName = "simple.dependencies";
LockFile lockFile = TestLockFiles.GetLockFile(mainProjectName);
LockFileLookup lockFileLookup = new(lockFile);

SingleProjectInfo mainProject = SingleProjectInfo.Create(
"/usr/Path",
mainProjectName,
".dll",
"1.0.0",
[]);

ProjectContext projectContext = lockFile.CreateProjectContext(
FrameworkConstants.CommonFrameworks.NetCoreApp10.GetShortFolderName(),
runtime: null,
Constants.DefaultPlatformLibrary,
runtimeFrameworks: null,
isSelfContained: false);

MockTaskItem[] directReferenceTaskItems =
[
new MockTaskItem("DirectReference.dll", new Dictionary<string, string>
{
[MetadataKeys.DestinationSubDirectory] = "direct-ref/",
})
];
IEnumerable<ReferenceInfo> directReferences = ReferenceInfo.CreateDirectReferenceInfos(
directReferenceTaskItems,
[],
lockFileLookup: lockFileLookup,
i => true,
includeProjectsNotInAssetsFile: true);

MockTaskItem[] dependencyReferenceTaskItems =
[
new MockTaskItem("DependencyReference.dll", new Dictionary<string, string>
{
[MetadataKeys.DestinationSubDirectory] = "dependency-ref/",
})
];
IEnumerable<ReferenceInfo> dependencyReferences = ReferenceInfo.CreateDependencyReferenceInfos(
dependencyReferenceTaskItems,
[],
i => true);

DependencyContext dependencyContext = new DependencyContextBuilder(mainProject, includeRuntimeFileVersions: false, runtimeGraph: null, projectContext: projectContext, libraryLookup: lockFileLookup)
.WithDirectReferences(directReferences)
.WithDependencyReferences(dependencyReferences)
.Build();

ReferenceInfo[] expectedReferences = [.. directReferences, .. dependencyReferences];
foreach (ReferenceInfo referenceInfo in expectedReferences)
{
var lib = dependencyContext.RuntimeLibraries.FirstOrDefault(l => l.Name == referenceInfo.Name);
lib.Should().NotBeNull();
lib.RuntimeAssemblyGroups.Should().HaveCount(1);
lib.RuntimeAssemblyGroups[0].RuntimeFiles.Should().HaveCount(1);
lib.RuntimeAssemblyGroups[0].RuntimeFiles.Should().Contain(
f => f.LocalPath == referenceInfo.DestinationSubPath && f.Path == referenceInfo.FileName,
$"runtime assemblies should have item with LocalPath={referenceInfo.DestinationSubPath} and Path matching {referenceInfo.FileName}");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,23 @@
"System.Runtime.Serialization.Primitives": "4.1.1"
},
"runtime": {
"lib/netstandard1.0/Newtonsoft.Json.dll": {}
"lib/netstandard1.0/Newtonsoft.Json.dll": {
"localPath": "Newtonsoft.Json.dll"
}
}
},
"System.Collections.NonGeneric/4.0.1": {
"runtime": {
"lib/netstandard1.3/System.Collections.NonGeneric.dll": {}
"lib/netstandard1.3/System.Collections.NonGeneric.dll": {
"localPath": "System.Collections.NonGeneric.dll"
}
}
},
"System.Runtime.Serialization.Primitives/4.1.1": {
"runtime": {
"lib/netstandard1.3/System.Runtime.Serialization.Primitives.dll": {}
"lib/netstandard1.3/System.Runtime.Serialization.Primitives.dll": {
"localPath": "System.Runtime.Serialization.Primitives.dll"
}
}
}
}
Expand Down
34 changes: 16 additions & 18 deletions src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
return this;
}

public DependencyContext Build(string[] userRuntimeAssemblies = null)
public DependencyContext Build((string Path, string DestinationSubPath)[] userRuntimeAssemblies = null)
{
CalculateExcludedLibraries();

Expand Down Expand Up @@ -299,7 +299,7 @@
name: GetReferenceLibraryName(directReference),
version: directReference.Version,
hash: string.Empty,
runtimeAssemblyGroups: [new RuntimeAssetGroup(string.Empty, [CreateRuntimeFile(directReference.FileName, directReference.FullPath)])],
runtimeAssemblyGroups: [new RuntimeAssetGroup(string.Empty, [CreateRuntimeFile(directReference.FileName, directReference.FullPath, directReference.DestinationSubPath)])],
nativeLibraryGroups: [],
resourceAssemblies: CreateResourceAssemblies(directReference.ResourceAssemblies),
dependencies: [],
Expand All @@ -317,7 +317,7 @@
* 1. If runtimeAssemblyGroups, nativeLibraryGroups, dependencies, and resourceAssemblies are all empty, remove this runtimeLibrary as well as any dependencies on it.
* 2. Add all runtimeLibraries to a list of to-be-processed libraries called libraryCandidatesForRemoval
* 3. libraryCandidatesForRemoval.Pop() --> if there are no runtimeAssemblyGroups, nativeLibraryGroups, or resourceAssemblies, and either dependencies is empty or all
* dependencies have something else that depends on them, remove it (and from libraryCandidatesForRemoval), adding everything that depends on this to
* dependencies have something else that depends on them, remove it (and from libraryCandidatesForRemoval), adding everything that depends on this to
* libraryCandidatesForRemoval if it isn't already there
* Repeat 3 until libraryCandidatesForRemoval is empty
*/
Expand Down Expand Up @@ -483,8 +483,8 @@
runtimeSignature: string.Empty,
_isPortable);

// Compute the runtime fallback graph
//
// Compute the runtime fallback graph
//
// If the input RuntimeGraph is empty, or we're not compiling
// for a specific RID, then an runtime fallback graph is empty
//
Expand Down Expand Up @@ -623,7 +623,7 @@
});
}

private ModifiableRuntimeLibrary GetRuntimeLibrary(DependencyLibrary library, string[] userRuntimeAssemblies)
private ModifiableRuntimeLibrary GetRuntimeLibrary(DependencyLibrary library, (string Path, string DestinationSubPath)[] userRuntimeAssemblies)
{
GetCommonLibraryProperties(library,
out string hash,
Expand All @@ -646,8 +646,10 @@
if (library.Type == "project" && !(referenceProjectInfo is UnreferencedProjectInfo))
{
var fileName = Path.GetFileNameWithoutExtension(library.Path);
var assemblyPath = userRuntimeAssemblies?.FirstOrDefault(p => Path.GetFileNameWithoutExtension(p).Equals(fileName));
var runtimeFile = !string.IsNullOrWhiteSpace(assemblyPath) && File.Exists(assemblyPath) ? CreateRuntimeFile(referenceProjectInfo.OutputName, assemblyPath) :
(string Path, string DestinationSubPath) assembly = userRuntimeAssemblies is not null
? userRuntimeAssemblies.FirstOrDefault(p => Path.GetFileNameWithoutExtension(p.Path).Equals(fileName))
: default;
var runtimeFile = !string.IsNullOrWhiteSpace(assembly.Path) && File.Exists(assembly.Path) ? CreateRuntimeFile(referenceProjectInfo.OutputName, assembly.Path, assembly.DestinationSubPath) :
!string.IsNullOrWhiteSpace(library.Path) && File.Exists(library.Path) ? CreateRuntimeFile(referenceProjectInfo.OutputName, library.Path) :
new RuntimeFile(referenceProjectInfo.OutputName, string.Empty, string.Empty);
runtimeAssemblyGroups.Add(new RuntimeAssetGroup(string.Empty, [runtimeFile]));
Expand All @@ -674,7 +676,7 @@
var resourceFiles = resolvedNuGetFiles.Where(f => f.Asset == AssetType.Resources &&
!f.IsRuntimeTarget);

resourceAssemblies.AddRange(resourceFiles.Select(f => new ResourceAssembly(f.PathInPackage, f.Culture)));
resourceAssemblies.AddRange(resourceFiles.Select(f => new ResourceAssembly(f.PathInPackage, f.Culture, f.DestinationSubPath)));

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TemplateEngine: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TemplateEngine: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build AoT: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build AoT: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TemplateEngine: linux (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TemplateEngine: linux (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: linux (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: linux (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: macOS (arm64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: macOS (arm64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: linux (arm64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: linux (arm64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

Check failure on line 679 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L679

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(679,79): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'ResourceAssembly' does not contain a constructor that takes 3 arguments

var runtimeTargets = resolvedNuGetFiles.Where(f => f.IsRuntimeTarget)
.GroupBy(f => f.RuntimeIdentifier);
Expand Down Expand Up @@ -813,25 +815,21 @@

private RuntimeFile CreateRuntimeFile(ResolvedFile resolvedFile)
{
string relativePath = resolvedFile.PathInPackage;
if (string.IsNullOrEmpty(relativePath))
{
relativePath = resolvedFile.DestinationSubPath;
}
return CreateRuntimeFile(relativePath, resolvedFile.SourcePath);
string relativePath = resolvedFile.PathInPackage ?? resolvedFile.DestinationSubPath;
return CreateRuntimeFile(relativePath, resolvedFile.SourcePath, resolvedFile.DestinationSubPath);
}

private RuntimeFile CreateRuntimeFile(string path, string fullPath)
private RuntimeFile CreateRuntimeFile(string path, string fullPath, string localPath = null)
{
if (_includeRuntimeFileVersions)
{
string fileVersion = FileUtilities.GetFileVersion(fullPath).ToString();
string assemblyVersion = FileUtilities.TryGetAssemblyVersion(fullPath)?.ToString();
return new RuntimeFile(path, assemblyVersion, fileVersion);
return new RuntimeFile(path, assemblyVersion, fileVersion, localPath);

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TemplateEngine: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TemplateEngine: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build AoT: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build AoT: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TemplateEngine: linux (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TemplateEngine: linux (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: linux (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: linux (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: macOS (arm64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: macOS (arm64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: linux (arm64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: linux (arm64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 828 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L828

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(828,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments
}
else
{
return new RuntimeFile(path, null, null);
return new RuntimeFile(path, null, null, localPath);

Check failure on line 832 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TemplateEngine: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L832

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(832,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 832 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build AoT: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L832

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(832,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 832 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: macOS (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L832

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(832,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 832 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TemplateEngine: linux (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L832

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(832,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 832 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: linux (x64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L832

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(832,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 832 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: macOS (arm64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L832

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(832,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 832 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build TestBuild: linux (arm64))

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L832

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(832,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments

Check failure on line 832 in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs#L832

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs(832,28): error CS1729: (NETCORE_ENGINEERING_TELEMETRY=Build) 'RuntimeFile' does not contain a constructor that takes 4 arguments
}
}

Expand Down
Loading
Loading