-
Notifications
You must be signed in to change notification settings - Fork 1.1k
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Duplicate items in _ResolvedCopyLocalPublishAssets #3007
Comments
The simple fix would be to just filter out Unfortunately it also seems that the runtime pack changes also introduced package references that are As the set of packages now differs from the build, this causes the publish targets to fallback to resolving (non-platform) assets and generating a different deps file, which you can see just by diffing the deps file from build vs. publish; the former has entries for the packages excluded from publish and the latter does not. This logic is getting difficult to reason because data is coming from many different places into the |
* Use 3.0 preview SDK to build illink * Respond to SDK changes in conflict resolution targets * Respond to SDK changes to publish assembly resolution * Work around duplicate items introduced by an sdk change See dotnet/sdk#3007 * Remove dependency on GetRuntimeLibraries Instead, use RuntimePackAssets resolved by the SDK
When `CopyLocalLockFileAssemblies` was true, `ReferenceCopyLocalPaths` contained the set of `RuntimePackAsset` items. When resolving assets to copy local for publish, the `RuntimePackAsset` items were added twice: once explicitly and again via `ReferenceCopyLocalPaths`. This commit fixes this by only adding to the resolved copy local assets for publish when `CopyLocalLockFileAssemblies` is false. Fixes dotnet#3007.
When `CopyLocalLockFileAssemblies` was true, `ReferenceCopyLocalPaths` contained the set of `RuntimePackAsset` items. When resolving assets to copy local for publish, the `RuntimePackAsset` items were added twice: once explicitly and again via `ReferenceCopyLocalPaths`. This commit fixes this by only adding to the resolved copy local assets for publish when `CopyLocalLockFileAssemblies` is false. Fixes dotnet#3007.
* Update dependencies from https://github.com/dotnet/cli build 20190930.6 - Microsoft.DotNet.Cli.Runtime - 5.0.100-alpha1.19480.6 * Update dependencies from https://github.com/dotnet/cli build 20191001.3 - Microsoft.DotNet.Cli.Runtime - 5.0.100-alpha1.19501.3 * Update dependencies from https://github.com/dotnet/cli build 20191001.6 - Microsoft.DotNet.Cli.Runtime - 5.0.100-alpha1.19501.6
* Use 3.0 preview SDK to build illink * Respond to SDK changes in conflict resolution targets * Respond to SDK changes to publish assembly resolution * Work around duplicate items introduced by an sdk change See dotnet/sdk#3007 * Remove dependency on GetRuntimeLibraries Instead, use RuntimePackAssets resolved by the SDK Commit migrated from dotnet/linker@5e9d86c
ResolveCopyLocalAssets
runs during self-contained publish (_UseBuildDependencyFile
is false), it outputs_ResolvedCopyLocalPublishAssets
._ComputeResolvedCopyLocalPublishAssets
runs, it adds to_ResolvedCopyLocalPublishAssets
the contents of (ReferenceCopyLocalPaths
\_ResolvedCopyLocalBuildAssets
):sdk/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets
Lines 398 to 399 in c60af5f
_ResolvedCopyLocalBuildAssets
is empty, so it gets a duplicate copy of items inReferenceCopyLocalPaths
(which comes fromRuntimePackAsset
), for exampleSystem.Private.CoreLib.dll
.Before #2646,
ResolvedAssembliesToPublish
only had one Item for System.Private.CoreLib.dll. I noticed this while trying to update https://github.com/mono/linker/blob/master/src/ILLink.Tasks/ILLink.Tasks.targets#L451 to work with the newest SDK._ManagedAssembliesToLink
was computed fromResolvedAssembliesToPublish
, but that line breaks when there are multiple files with the same Filename in the input:#2666 may be relevant.
/cc @peterhuene @nguerrera
The text was updated successfully, but these errors were encountered: