Skip to content

Conversation

@wtgodbe
Copy link
Member

@wtgodbe wtgodbe commented Sep 19, 2019

@wtgodbe wtgodbe requested review from a team and ajcvickers September 19, 2019 20:38
@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 19, 2019

F:\workspace_work\1\s\src\dotnet-ef\dotnet-ef.csproj : error NU1102: Unable to find package Microsoft.AspNetCore.App.Runtime.win-x64 with version (= 5.0.0-alpha1.19466.7) [F:\workspace_work\1\s\All.sln]

That version doesn't show up in Versions.props, thinking it comes from the SDK. Looking.

TargetFramework="netcoreapp5.0" />

<!-- Reference base shared framework at incoming dependency flow version, not bundled sdk version. -->
<FrameworkReference Update="Microsoft.NETCore.App"
Copy link
Contributor

@JunTaoLuo JunTaoLuo Sep 19, 2019

Choose a reason for hiding this comment

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

Hmm I wonder how this ever worked. @wtgodbe the version you're linking to is the runtime version for Microsoft.NETCore.App. The error message is complaining that it cannot find the appropriate version of Microsoft.AspNetCore.App. I wonder if we need to apply this workaround to M.AspNetCore.App as well. Also, I'm curious how this ever worked without this workaround.

Copy link
Contributor

Choose a reason for hiding this comment

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

@JunTaoLuo why wouldn't this work given the $(NETCoreAppMaximumVersion) setting? EF doesn't reference Microsoft.AspNetCore.App anywhere.

Suggest instead updating @(KnownFrameworkReference) items instead of @(FrameworkReference) but that's reasonably minor.

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 when we had a 3.0 SDK, the KnownFrameworkReference for Microsoft.AspNetCore.App was a 3.0 version, which we were able to restore from nuget (3.0.0-rc1-19456-20). Now with the 5.0 SDK, that default reference is versioned 5.0.0-alpha1.19466.7 per the binlog, which we can't restore since it's not in nuget or the dotnet-core feed. What feed to we publish AspNetCore stuff to? We could just add that to nuget.config.

Copy link
Contributor

@JunTaoLuo JunTaoLuo Sep 19, 2019

Choose a reason for hiding this comment

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

Hmm, I think it's implicit since dotnet-ef targets 5.0 after my change (my bad) https://github.com/aspnet/EntityFrameworkCore/blob/master/src/dotnet-ef/dotnet-ef.csproj#L15. I think the recommendation is for dotnet CLI tools to target a lower fixed TFM and allow roll forward: dotnet/diagnostics#227.

So theoretically, we should make a change in 3.1 to make this tool target netcoreapp3.0 and then add the roll forward option in the json file. That should also fix the error @wtgodbe saw.

Copy link
Contributor

Choose a reason for hiding this comment

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

Again, exactly what in this repo references Microsoft.AspNetCore.App? That sounds like a bug.

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's the KnownFrameworkReference from the 5.0 SDK, which does try to pull in the package which the build complains it can't find (5.0.0-alpha1.19466.7). The old 3.0 SDK referenced a version that's present on nuget.org.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we're getting our wires crossed, we can discuss this in person at the next standup.

Copy link
Contributor

Choose a reason for hiding this comment

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

dotnet-ef project might have issues but that's a red herring for this problem. Instead, let's remove all Microsoft.AspNetCore.App items from the @(KnownFrameworkReference) group.

Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

Probably need similar changes in other SDK update PRs.

<KnownAppHostPack Include="@(KnownAppHostPack->WithMetadataValue('TargetFramework', 'netcoreapp3.0'))"
TargetFramework="netcoreapp5.0" />
<KnownFrameworkReference Include="@(KnownFrameworkReference->WithMetadataValue('TargetFramework', 'netcoreapp3.0'))"
TargetFramework="netcoreapp5.0" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't remove this logic; it'll help to have around the next time we deal w/ a new TFM before an SDK is ready. Instead, make this conditional on lack of '%(TargetFramework) == $(DefaultNetCoreTargetFramework)` items in each group.

TargetFramework="netcoreapp5.0" />

<!-- Reference base shared framework at incoming dependency flow version, not bundled sdk version. -->
<FrameworkReference Update="Microsoft.NETCore.App"
Copy link
Contributor

Choose a reason for hiding this comment

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

@JunTaoLuo why wouldn't this work given the $(NETCoreAppMaximumVersion) setting? EF doesn't reference Microsoft.AspNetCore.App anywhere.

Suggest instead updating @(KnownFrameworkReference) items instead of @(FrameworkReference) but that's reasonably minor.

@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 20, 2019

Just pushed cac7707 to address feedback, @dougbu PTAL

@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 20, 2019

Failing with the package icon issue, I'll fix first in a separate PR:

##[error].dotnet\sdk\5.0.100-alpha1-014696\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(198,5): error NU5048: The 'PackageIconUrl'/'iconUrl' element is deprecated. Consider using the 'PackageIcon'/'icon' element instead. Learn more at https://aka.ms/deprecateIconUrl

@dougbu
Copy link
Contributor

dougbu commented Sep 20, 2019

Suggestion: Do the package icon change in parallel with getting this in. For this PR, just disable the NuGet warning / error.

@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 20, 2019

Checking to see if the package icon fix works with these changes

NTaylorMullen pushed a commit to dotnet-maestro-bot/AspNetCore-Tooling that referenced this pull request Sep 20, 2019
@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 23, 2019

This looks good locally now, assuming we don't need info about the packageIcon in the .nuspec. Waiting to hear back from @tmat on that one.

@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 23, 2019

As per dotnet/ef6#1286 (comment), looks like we don't need to worry about the .nuspec. @dougbu any other concerns, or is this good to go?

@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 23, 2019

@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 24, 2019

With the last change, this now includes the icon metadata in all .nuspec's, including the manually generated ones - @dougbu PTAL

Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

Please split this in two because the package icon portion needs to be done in 'release/3.0' and that's somewhat urgent. Include the necessary <NoWarn/> w/ the 5.0 SDK bit until that change flows into 'master'.

Separately, the package icon changes should also remove <NoWarn>NU5048;$(NoWarn)</NoWarn> elements where they exist. That might need to be done separately since I doubt we have that in 'release/3.0' branches.

<None Include="$(PackageIconFullPath)" Pack="true" PackagePath="\"/>
</ItemGroup>
</Project>
</Project>
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Avoid changing the final newlines. This results in files thrashing back and forth.

@wtgodbe
Copy link
Member Author

wtgodbe commented Sep 24, 2019

@dougbu this now just handles the SDK update - #18027 takes care of the package icon change in 3.0.

@wtgodbe wtgodbe merged commit 612f9b1 into master Sep 25, 2019
@ghost ghost deleted the 50SDK branch September 25, 2019 15:58
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.

5 participants