Skip to content

Add reference to empty Microsoft.NETCore.App package#3195

Merged
dsplaisted merged 2 commits intodotnet:masterfrom
dsplaisted:reference-empty-packages
May 2, 2019
Merged

Add reference to empty Microsoft.NETCore.App package#3195
dsplaisted merged 2 commits intodotnet:masterfrom
dsplaisted:reference-empty-packages

Conversation

@dsplaisted
Copy link
Member

The reference to the Microsoft.NETCore.App package is specified via the PackagesToReference metadata on KnownFrameworkReference. This metadata was added in dotnet/installer#1766, and the package was produced in dotnet/core-setup#5893.

Once https://github.com/dotnet/core-setup/issues/6222 is done, this should fix #3044. This PR also adds a test case for that issue, which is currently skipped.

This PR removes the implicit reference to the Microsoft.NETCore.Platforms package, as that will now come in as a dependency of the Microsoft.NETCore.App package.

This comes via the PackagesToReference metadata on KnownFrameworkReference
@dsplaisted dsplaisted requested review from a team, ericstj and nguerrera May 2, 2019 14:42
@nguerrera
Copy link
Contributor

I think the name "PackagesToReference" is a bit confusing since these are only referenced when there are other packages. Can we come up with a better name. PackageToReferenceWhenThereAreOtherPackages is probably too long, but is there a nicer way to say that? We can handle that as a follow up since the name is already baked into bundled versions.


if (frameworkReference != null)
{
if (!string.IsNullOrEmpty(knownFrameworkReference.PackagesToReference))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: reduce nesting by using &&

{
foreach (var packageAndVersion in knownFrameworkReference.PackagesToReference.Split(';'))
{
var items = packageAndVersion.Split('/');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:: So many allocations, but we already have an issue to speed up this task.

@dsplaisted
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dsplaisted dsplaisted merged commit b68e3d4 into dotnet:master May 2, 2019
dsplaisted pushed a commit to dsplaisted/sdk that referenced this pull request Feb 19, 2020
GangWang01 pushed a commit to GangWang01/sdk that referenced this pull request Jun 7, 2022
GangWang01 pushed a commit to GangWang01/sdk that referenced this pull request Jun 21, 2022
GangWang01 pushed a commit to GangWang01/sdk that referenced this pull request Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restore fails if netstandard1.x package reference is present

3 participants