Implicit selection of `Microsoft.AspNetCore.App` broken in new SDK
See original GitHub issueWhen we upgraded to the new SDK (3.0.100-preview-009730) we started experiencing the following errors in our templating tests:
C:\Users\rybrande\.nuget\packages\microsoft.aspnetcore.app\2.1.0\build\netcoreapp2.1\Microsoft.AspNetCore.App.targets(14,5): error : This version of Microsoft.AspNetCore.App is only compatible with the netcoreapp2.1 target framework. Please target netcoreapp2.1 or choose a version of Microsoft.AspNetCore.App compatible with netcoreapp3.0.
I’ve created a minimal repro of this issue here. You can work around this by explicitly giving the version of Microsoft.AspNetCore.App
as Version="3.0.0-alpha1-10653"
, but it’s my understanding that the implicit scenario is not only supported, but the recommended path.
If you’d like to see it in the “real” environment the repro steps against Templating are as follows:
- Acquire SDK version 3.0.100-preview-009730.
git clone https://github.com/aspnet/Templating
./run.ps1 -update upgrade deps
./build.cmd
Observe the test failures.
dotnet --info:
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview-009730
Commit: 6a33a587e8
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:\Users\rybrande\.dotnet\x64\sdk\3.0.100-preview-009730\
Host (useful for support):
Version: 3.0.0-preview1-26907-05
Commit: 96537a8f64
.NET Core SDKs installed:
2.1.403 [C:\Program Files\dotnet\sdk]
2.1.500-preview-009398 [C:\Program Files\dotnet\sdk]
2.2.100-preview2-009404 [C:\Users\rybrande\.dotnet\x64\sdk]
2.2.200-preview-009431 [C:\Program Files\dotnet\sdk]
3.0.100-preview-009730 [C:\Users\rybrande\.dotnet\x64\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.0-preview2-35157 [C:\Users\rybrande\.dotnet\x64\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.0-preview3-35364 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 3.0.0-alpha1-10620 [C:\Users\rybrande\.dotnet\x64\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 3.0.0-alpha1-10663 [C:\Users\rybrande\.dotnet\x64\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.0-preview2-35157 [C:\Users\rybrande\.dotnet\x64\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.0-preview3-35364 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-alpha1-10620 [C:\Users\rybrande\.dotnet\x64\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-alpha1-10663 [C:\Users\rybrande\.dotnet\x64\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-alpha1-10706 [C:\Users\rybrande\.dotnet\x64\shared\Microsoft.AspNetCore.App]
Microsoft.DesktopUI.App 3.0.0-alpha-27030-3 [C:\Users\rybrande\.dotnet\x64\shared\Microsoft.DesktopUI.App]
Microsoft.NETCore.App 2.2.0-preview2-26905-02 [C:\Users\rybrande\.dotnet\x64\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.0-preview3-27001-02 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview-27104-01 [C:\Users\rybrande\.dotnet\x64\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview1-26907-05 [C:\Users\rybrande\.dotnet\x64\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Implicit selection of `Microsoft.AspNetCore.App` broken in ...
When we upgraded to the new SDK (2.2.100-preview3-009430) we started experiencing the following errors in our templating tests: error ...
Read more >Microsoft.AspNetCore.App metapackage for ASP.NET Core
Web SDK implicitly reference the Microsoft.AspNetCore.App framework. No additional references are required for these projects: XML Copy.
Read more >Migrate from ASP.NET Core 2.2 to 3.0
Learn how to migrate an ASP.NET Core 2.2 project to ASP.NET Core 3.0. ... Sdk.Web SDK implicitly reference the Microsoft.AspNetCore.App ...
Read more >Visual Studio 2017 cannot update Microsoft.NETCore.App ...
The implicit package references that the Microsoft.NET.Sdk infers can't be updated via NuGet. If you migrated from project.json, the project ...
Read more >Microsoft.AspNetCore.App 2.1.1 upgrade "Blocked by ...
I'm trying to upgrade a .net core 2.1 project to the latest version of Nuget packages such as Microsoft.Extensions.DependencyInjection.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This was solved by KnownFrameworkReference. I’ve run into a different problem, but I’ll file it as its own issue.
Can we get an issue filed against us at aspnet/AspNetCore or be otherwise notified when this kind of change is coming? It’s a real pain to find out about these things piecemeal when they start breaking us, and it can server as semi-documentation for anyone who’s doing their own templates or otherwise operating outside of the “normal” workflow (that is, aren’t using preview or RTM builds with full installers).
I’ll try that against my broken Templating branch and let you know how it turns out.