Skip to content
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

Duplicated References with implicit references from NETStandard.Libraray[.NETFramework] #1129

Closed
weshaggard opened this issue Apr 17, 2017 · 4 comments
Milestone

Comments

@weshaggard
Copy link
Member

MusicStore application is hitting an issue where we end up with 2 System.Net.Http reference (see aspnet/MusicStore#775).

This is an issue because of the way we are adding References in our NETStandard.Library[.NETFramework] targets (See https://github.com/dotnet/corefx/blob/master/pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.targets#L3) and how the SDK removes simple name references that come from nuget packages which is https://github.com/dotnet/sdk/blob/master/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.PackageDependencyResolution.targets#L375.

The reason NETStandard.Library packages is adding references in a targets file is to enable playing nicely with packages.config projects.

We need to come up with a solution eliminate the simple name duplication to avoid these conflicts.

cc @dsplaisted @ericstj

@ericstj
Copy link
Member

ericstj commented Apr 19, 2017

We just need to decide the best way to hook into the SDK's ResolveLockFileReferences target.

This package will install downlevel in packages.config based projects so it must use Reference and ReferencePath items.

Ideally the SDK would consider these as well, perhaps conditionally based on metadata on the item.

Otherwise we'll need to fork our targets for PackageReference vs packages.config/project.json.

/cc @natidea who made the change: 03f6a2a

@nguerrera
Copy link
Contributor

Is this still an issue with the targets that are integrated in to this repo and not in the NetStandard.Library package?

@weshaggard
Copy link
Member Author

I suspect https://github.com/dotnet/sdk/blob/master/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.NETFramework.targets#L70 fixes this issue, but we would need to try it.

@kichalla is asp.net still interested in trying to make the MusicStore application target net461?

@livarcocc
Copy link
Contributor

Closing.

mmitche pushed a commit to mmitche/sdk that referenced this issue Jun 5, 2020
…0191122.17 (dotnet#1129)

- Microsoft.AspNetCore.Analyzers - 5.0.0-alpha1.19572.17
- Microsoft.AspNetCore.Mvc.Api.Analyzers - 5.0.0-alpha1.19572.17
- Microsoft.AspNetCore.Mvc.Analyzers - 5.0.0-alpha1.19572.17
- Microsoft.AspNetCore.Components.Analyzers - 5.0.0-alpha1.19572.17
GangWang01 pushed a commit to GangWang01/sdk that referenced this issue Jun 7, 2022
update templates to crossgen 2.0.0-rtw-26412
GangWang01 pushed a commit to GangWang01/sdk that referenced this issue Jul 11, 2022
update templates to crossgen 2.0.0-rtw-26412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants