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

TargetFramework.Sdk should ensure an unique TargetFramework property in inner builds #4859

Closed
ViktorHofer opened this issue Feb 17, 2020 · 3 comments · Fixed by #8418
Closed
Labels
area-Infrastructure-libraries Area maintained by .NET libraries team: APICompat, AsmDiff, GenAPI, GenFacades, PkgProj, etc

Comments

@ViktorHofer
Copy link
Member

  • Is this issue blocking: no
  • Is this issue causing unreasonable pain: no

Porting comments from dotnet/runtime#32300 (comment):

@ViktorHofer: Can we avoid such breaks by coming up with a better pattern which guarantees unique TargetFramework properties in the different inner-builds?

@Anipik: Actually, That was our first experiment. Later on this project we shifted to remove the TargetFrameworkSuffix from TargetFramework bcoz we hit a significant block. I will try to dig up the reason. @ericstj do u remember wht caused us to remove the TargetFrameworkSuffix during the build ?

@ViktorHofer: +1. Yes, please dig up the reason for the change in direction.

@tmat: Please file an issue to fix Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk...

@ericstj
Copy link
Member

ericstj commented Feb 18, 2020

It was removed because nuget writes conditions depending on $(TargetFramework) to generated props and targets files. We considered a few options to workaround this, but everything hacky/risky. Would be nice if NuGet's generated targets used $(NuGetTargetMoniker) (like assets file resolution does), or some other property, allowing a layer of indirection between the cross-compiling property and the nuget resolution property.

@ViktorHofer
Copy link
Member Author

@rrelyea @nkolev92 do you think @ericstj's ask makes sense and is feasible?

@nkolev92
Copy link
Contributor

This is so inconsistent that I wouldn't feel comfortable giving a definitive response without digging in more.

However, one problem I see is that NuGetTargetMoniker is not guaranteed to be unique, see, NuGet/Home#8388. That's an ask on NuGet to do the opposite of the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Infrastructure-libraries Area maintained by .NET libraries team: APICompat, AsmDiff, GenAPI, GenFacades, PkgProj, etc
Projects
None yet
3 participants