I went to Nuget.org to fetch Microsoft.AspNetCore.Mvc.Core 3.0.0 but didn't find it, Is there any reason for Microsoft for not pushing these packages?
1 Answer
ASP.NET Core 3.0 is no longer shipped as nuget packages but a framework, which is included as a part of the SDK.
To reference it from a project that does not use the web sdks, use this in your csproj file inside an <ItemGroup>
element, like so:
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App"/>
</ItemGroup>
This includes most packages that were formerly referenced from nuget.
Note that you cannot add it to a project that uses the web sdks, as it is already added by the sdk by default.
-
that doesn't work, and give error
The FrameworkReference 'Microsoft.AspNetCore.App' was not recognized
– MuhammadSep 29, 2019 at 10:22 -
2Are you sure that your target framework is
netcoreapp3.0
? ASP.NET Core 3.0 targets .NET Core 3.0 only, not .NET Standard 2.1 or 2.0– AlseinSep 29, 2019 at 12:32 -