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

[release/3.1] Fix dotnet-ef RuntimeFrameworkVersion #20007

Merged
merged 1 commit into from
Feb 20, 2020
Merged

[release/3.1] Fix dotnet-ef RuntimeFrameworkVersion #20007

merged 1 commit into from
Feb 20, 2020

Conversation

bricelam
Copy link
Contributor

@bricelam bricelam commented Feb 20, 2020

Description

The dotnet-ef global tool was built incorrectly:

  • dotnet-ef 3.1.2 depends on runtime 3.1.2
  • This fails on any machine with just 3.1 on it. This includes when the web tools try to load dotnet-ef from within VS.
  • It should depend on 3.1.0

Customer Impact

This will break common VS scenarios as well as people who install the latest tool on the command line.

How found

CTI validation using VS following the patch release, and also customer-reported on the command line.

Test coverage

We have done manual validation on the new PR and will validate again once it is in the build.

Going forward we need to make sure that we can reproduce this in the CTI validation before the new packages are pushed to NuGet.

Also, since we knew about this before and thought it was fixed we will investigate what happened in the process that allowed this.

Regression?

Yes, from 3.0.

Risk

Low.


We had some dead code in the project files: (I'm not exactly sure what happened, but it looks like it broke while migrating to Arcade.)

<!--
    This keeps dotnet-ef targeting the default version of .NET Core for netcoreapp3.1,
    which maximizes the machines on which this tool will be compatible.
-->
<TargetLatestDotNetRuntime Condition=" '$(IsServicingBuild)' == 'true' ">false</TargetLatestDotNetRuntime>

Fixes errors like:

It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.1.2' was not found.

Verification:

Installed a local 3.1.3 build of dotnet-ef with only runtime 3.1.1 available and it worked where dotnet-ef 3.1.2 failed. Also verified that the runtimeconfig contains 3.1.0 instead of the latest patch version.

Fixes #20005

@bricelam bricelam added this to the 3.1.x milestone Feb 20, 2020
@bricelam bricelam requested review from Pilchie, ajcvickers and a team February 20, 2020 19:18
Copy link
Member

@wtgodbe wtgodbe left a comment

Choose a reason for hiding this comment

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

Change looks reasonable, but could you add a description of why it's needed? Do we need to take this for 3.1.3 (the march release)?

@bricelam
Copy link
Contributor Author

(Description updated)

@ajcvickers
Copy link
Member

@bricelam What validation have we done? What should we do to make sure it works once it is merged?

@Pilchie We should try to get this in to the next shipping patch. I can send a request to Tactics if that's the best way to go here.

@bricelam
Copy link
Contributor Author

bricelam commented Feb 20, 2020

Verification: Installed a local 3.1.3 build of dotnet-ef with only runtime 3.1.1 available and it worked where dotnet-ef 3.1.2 failed. Also verified that the runtimeconfig contains 3.1.0 instead of the latest patch version.

@wtgodbe
Copy link
Member

wtgodbe commented Feb 20, 2020

If we merge this today it shouldn't affect our ability to get a 3.1.3 build by tomorrow. Tell-mode should be fine since this is an infrastructure change, but let's still wait for @Pilchie's signoff

@Pilchie
Copy link
Member

Pilchie commented Feb 20, 2020

I don't totally understand the fix, but I'm supportive of the scenario. I think we should still email Tactics, since this was an issue we discussed today.

One thing we could consider is publishing this package earlier than the full 3.1.3 release too.

@ajcvickers
Copy link
Member

I'll send email to tactics and we'll get this in for 3.1.3 today.

@Pilchie If an earlier train arrives, then we should hop on it.

@bricelam
Copy link
Contributor Author

Similar code existed before the move to Arcade:

<IsServicingBuild Condition=" '$(PreReleaseLabel)' == 'servicing' ">true</IsServicingBuild>

<PropertyGroup Condition=" '$(TargetLatestDotNetRuntime)' != 'false' ">
<!-- Assign these values at the end of the project after TargetFramework has been assigned. TargetFramework is not assigned yet in Directory.Build.props. -->
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">$(MicrosoftNETCoreApp20PackageVersion)</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">$(MicrosoftNETCoreAppPackageVersion)</RuntimeFrameworkVersion>
</PropertyGroup>

@bricelam
Copy link
Contributor Author

bricelam commented Feb 20, 2020

I'd like to clean this up more in master--just doing the minimal thing for patches

@ajcvickers
Copy link
Member

This is approved for 3.1.3 by tactics.

@bricelam Let's get this merged today. Also can you file an issue (or use an existing one) so we can have an issue tracking this in 3.1.3.

@wtgodbe wtgodbe merged commit 3b47530 into dotnet:release/3.1 Feb 20, 2020
@bricelam bricelam deleted the servicing branch February 24, 2020 22:47
@smitpatel smitpatel removed this from the 3.1.3 milestone Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants