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

Target Platform Intrinsic Functions #5429

Merged
merged 5 commits into from
Jul 15, 2020

Conversation

sfoslund
Copy link
Member

No description provided.

@sfoslund
Copy link
Member Author

@rainersigwald I've updated the NuGet dependency to get the latest version, which has the target platform changes. Is this the right way to go about it?

Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

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

LGTM. We'll probably want to avoid taking this until we fork for 16.7 since it's a "new feature".

@sfoslund
Copy link
Member Author

sfoslund commented Jun 22, 2020

Looks like the test failures are unrelated to this PR.

@rainersigwald what's the timeline with working to 16.7? Edit: It sounds like July 2nd, is that right? Is this good to go in once the branch is ready?

@sfoslund sfoslund marked this pull request as ready for review June 23, 2020 17:23
@rainersigwald
Copy link
Member

Test failures should have been fixed by #5439.

@rainersigwald
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@wli3
Copy link

wli3 commented Jun 24, 2020

All tests passed. Good to go?

@sfoslund
Copy link
Member Author

@wli3 see #5429 (review), we're waiting until the fork for 16.7

@wli3
Copy link

wli3 commented Jun 25, 2020

Looks like we need to rush a bit after the branch cut. cswinrt wants to be done in preview 8. 7/15 is the branch cut date. After this is merged, we need to get on the task of parsing out $(TargetPlatformVersion) quickly. Although, it is possible for you to write to code for parsing out $(TargetPlatformVersion) now? So we can just merge the code after 7/2.

@wli3
Copy link

wli3 commented Jun 25, 2020

Get a build of this local msbuild and then swap the content inside stage 0 for you local SDK might work. We can try together

@sfoslund
Copy link
Member Author

@wli3, I have the skeleton of the code written and I already did a little bit of testing with this MSBuild change in my stage 0. If you're going to be blocked I can clean it up and test some more tomorrow and put out a draft PR so you can review.

@wli3
Copy link

wli3 commented Jun 25, 2020

That's great! Let's do that

@sfoslund
Copy link
Member Author

Once NuGet/NuGet.Client#3479 is merged we'll want to update the NuGet version number to point to the updated implementation, since the one we're using at the moment has known bugs.

@wli3
Copy link

wli3 commented Jul 6, 2020

We could merge it today?

@sfoslund
Copy link
Member Author

sfoslund commented Jul 6, 2020

@wli3 We're going to want to update the NuGet version number once NuGet/NuGet.Client#3479 is merged, so we're still blocked on that. Right now this is implemented on top of the buggy target platform work.

@rainersigwald rainersigwald marked this pull request as draft July 7, 2020 15:53
@rainersigwald
Copy link
Member

@sfoslund I converted this to a draft so we don't look at it in triage until the NuGet thing is resolved. Can you promote it to "ready for review" when that's done and consumed here?

@sfoslund sfoslund marked this pull request as ready for review July 10, 2020 22:25
@sfoslund
Copy link
Member Author

@rainersigwald I've updated the nuget version so this should be ready to go.

@wli3
Copy link

wli3 commented Jul 13, 2020

@rainersigwald ?

@@ -18,7 +18,7 @@
<PackageReference Update="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="1.16.30" />
<PackageReference Update="Microsoft.Win32.Registry" Version="4.3.0" />
<PackageReference Update="NuGet.Build.Tasks" Version="$(NuGetBuildTasksVersion)" />
<PackageReference Update="NuGet.Frameworks" Version="$(NuGetBuildTasksVersion)" />
<PackageReference Update="NuGet.Frameworks" Version="5.7.0-rtm.6710" />
Copy link
Member

Choose a reason for hiding this comment

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

What does rtm stand for? And will this always be available?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it means release to manufacturing?... (@wli3 is that right?) I don't see why it wouldn't be avaliable.

Copy link

Choose a reason for hiding this comment

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

ya, "release to manufacturing". In our case it is mostly mean this version is ready for try. And it should be stable.
although remember to remove line once nuget proper insertion is in.

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you mean proper nuget insertion? We're using reflection here so we won't need insertions into MSBuild.

Copy link

Choose a reason for hiding this comment

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

ah, i forgot that. you are right

Copy link
Member

Choose a reason for hiding this comment

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

What's the fallback if it can't find 5.7.0-rtm-6710?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know that there is a fallback, but this dependency is only for testing. Otherwise we use reflection and try to load the dll from its VS install location or next to the MSBuild dll. This logic is here in the last intrinsic functions PR I made.

eng/Packages.props Outdated Show resolved Hide resolved
@sfoslund
Copy link
Member Author

error MSB3243: (NETCORE_ENGINEERING_TELEMETRY=Build) No way to resolve conflict between "Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.

@rainersigwald updating the master nuget reference seems to create some version mismatches. Is there a simple way to solve this?

@rainersigwald rainersigwald merged commit 9c2d922 into dotnet:master Jul 15, 2020
@ghost ghost added this to the current-release milestone Jul 15, 2020
@sfoslund sfoslund deleted the TargetPlatformFuncs branch July 15, 2020 16:01
AR-May pushed a commit that referenced this pull request Jun 30, 2021
Fixes #5792

We had two areas where MSBuild checked TargetFramework based on whether it started with netcore and netstandard. With net5.0 resolving to net5.0 instead of netcoreapp5.0, this logic would no longer succeed, so here's a quick fix via intrinsic function GetTargetFrameworkIdentifier introduced in #5429.

Co-authored-by: Forgind <Forgind@users.noreply.github.com>
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.

4 participants