DynamicRouteValueTransformer does not exist - c#

I get a missing reference error when I try to inherit from the class DynamicRouteValueTransformer in a class library but when I do it from my MVC app it works fine.
public class ProductRouteTransformer : Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer
DynamicRouteValueTransformer is in namespace Microsoft.AspNetCore.Mvc.Routing which is part of Microsoft.AspNetCore.Mvc.Core.dll. I've added the DLL to the class library using Nuget and can see that it is installed but I still get a missing reference error. The class is just missing from the namespace.
I'm using .NET Core 3.1.
The csproj is below:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="9.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="2.2.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" />
<PackageReference Include="NLog" Version="4.6.8" />
</ItemGroup>
<ItemGroup>
<Folder Include="Database\EntityUtils\" />
</ItemGroup>
</Project>

There's a topic in the docs that was introduced recently, which covers this in great detail:
With the release of .NET Core 3.0, many ASP.NET Core assemblies are no longer published to NuGet as packages.
If you take a look at the contents of your .csproj, you'll see that you've added references to 2.2.x versions of a few Microsoft.AspNetCore.* packages. I'm sure you intended to reference 3.1.x versions of these, but, as the docs quote above shows, these packages are no longer produced for 3.0+.
The next few lines from the docs explain what's happened here:
Instead, the assemblies are included in the Microsoft.AspNetCore.App shared framework, which is installed with the .NET Core SDK and runtime installers.
As of .NET Core 3.0, projects using the Microsoft.NET.Sdk.Web MSBuild SDK implicitly reference the shared framework. Projects using the Microsoft.NET.Sdk or Microsoft.NET.Sdk.Razor SDK must reference ASP.NET Core to use ASP.NET Core APIs in the shared framework.
As your project is referencing Microsoft.NET.Sdk, you'll need to add a FrameworkReference, as described above, and remove those old PackageReferences:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="9.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" />
<PackageReference Include="NLog" Version="4.6.8" />
</ItemGroup>
<ItemGroup>
<Folder Include="Database\EntityUtils\" />
</ItemGroup>
</Project>
Note that not all of the packages have been folded into the shared framework. For example, Microsoft.EntityFrameworkCore.SqlServer is still provided as a NuGet package.

Related

Azure function v4 migration. Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=7.0.0.0, Culture=neutral

I'm currently migrating an Azure Function from v2 to Azure Functions v4. I already migrated my project to .NET6 and fixed all the package reference errors. I have in the solution 3 projects which I adjusted to .NET6 and Azure Function v4. For that I edited the .csproj files of each of those projects and upgraded/substituted packages which are not working with .NET6. The project file of each project looks like:
Azure Function Project:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.11.1" />
<PackageReference Include="Azure.Messaging.EventHubs" Version="5.7.5" />
<PackageReference Include="DocumentFormat.OpenXml" Version="2.18.0" />
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.33" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventHubs" Version="5.1.2" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="5.8.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.6.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.48.1" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PCM.1.z\x.1.z.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="2.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Update="1.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Update="3.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
Second Project:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.11.1" />
<PackageReference Include="Azure.Messaging.EventHubs" Version="5.7.5" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.21.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Azure.Devices" Version="1.38.2" />
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.33" />
<PackageReference Include="SendGrid" Version="9.28.1" />
<PackageReference Include="StackExchange.Redis" Version="2.6.80" />
<PackageReference Include="Twilio" Version="6.0.1" />
<PackageReference Include="UnitsNet" Version="4.149.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\x.1.w\x.1.w.csproj" />
</ItemGroup>
</Project>
Third Project:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.0" />
</ItemGroup>
</Project>
When I build the project I got no errors. But when I debug the project I got an exception which looks like:
Exception:
Exception thrown: 'System.IO.FileNotFoundException' in Microsoft.Azure.WebJobs.Host.dll.
An exception of type 'System.IO.FileNotFoundException' occurred in Microsoft.Azure.WebJobs.Host.dll but was not handled in user code
Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
I have tried the last two weeks different packages since when I googled this error, the suggestion was to see which packages are not supported by package:
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.3" />. I analyzed all my packages. After changing them back and force I got still the same error.
Can anyone help me and say what exactly I have to change?
As #Codebrane said, Microsoft.Extensions.Configuration.Abstractions, Version=7.0.0.0 has the issues in working with Azure Functions v4 Version and it has been shown practically in this thread.
Try by downgrading the Microsoft.Extensions.Configuration.Abstractions to Version 6.0.0 and check.
Microsoft.NET.Sdk.Functions depends on the NuGet Packages related to the Code but these can be suggested by VS IntelliSense and installed automatically, or it shows these packages required.
Also, NuGet Packages varies between In-Process and Out-of-Process worker type in Azure Functions. Refer to one of my threads for more information.
I am building an Azure function as v4 in net6. Since I also got the System.IO.FileNotFoundException regarding library Microsoft.Extensions.Configuration.Abstraction 7.0.0 when starting up the function,
I downgraded to Microsoft.Extensions.Configuration.Abstractions 6.0.0 and also had to downgrade other dependencies such as Microsoft.EntityFrameworkCore to 6.0.12 and, since I am using PostgreSQL also Npgsql.EntityFrameworkCore.PostgreSQL to 6.0.8. Now everything works.
I fixed it by including the package Microsoft.Extensions.Configuration.Abstractions 6.0.0 and building it. To include this package doesn't solve the problem directly it just shows which packages have a conflict. By downgrading these conflicting packages the project could be debugged. To check which packages are conflicting you have to open up the packages on the right side in visual studio and look where is a exclamation mark. Then you have to analyze these packages to know on what version you have to downgrade them. It changes from project to project.

DotNetCore 3 EF Core 3 CLI is looking for AspNetCore.App version '2.2.0'

I had EF Core set up and working with .Net Core 2 & EF Core 2. I upgraded to .Net Core & EF Core to v3 but I never tested my migrations.
Now I have upgraded to .NetCore 3.1 & EF Core 3.1 and when I try to create a migration or run database update I get the following error.
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '2.2.0' was not found.
- The following frameworks were found:
3.0.1 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
3.1.3 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
I have checked the version of dotnet
dotnet --version
3.1.201
dotnet ef --version
Entity Framework Core .NET Command-line Tools 3.1.3
My Class library where EF Core is installed and the startup project both target
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
And I have upgraded all my NuGet packages to the latest version.
Class Library
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="Migrations" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Event.Models\Event.Models.csproj" />
</ItemGroup>
</Project>
And my Startup Project
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<DockerComposeProjectPath>../docker-compose.dcproj</DockerComposeProjectPath>
<UserSecretsId>some-secret-guid</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MassTransit" Version="6.2.3" />
<PackageReference Include="MassTransit.AspNetCore" Version="6.2.3" />
<PackageReference Include="MassTransit.Autofac" Version="6.2.3" />
<PackageReference Include="Autofac" Version="5.1.2" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="MassTransit.Extensions.DependencyInjection" Version="6.2.3" />
<PackageReference Include="MassTransit.RabbitMQ" Version="6.2.3" />
<PackageReference Include="Serilog" Version="2.9.0" />
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.MongoDB" Version="4.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Event.DataAccess\Event.DataAccess.csproj" />
<ProjectReference Include="..\Event.Domain\Event.Domain.csproj" />
<ProjectReference Include="..\Event.Models\Event.Models.csproj" />
</ItemGroup>
</Project>
I have no idea where the reference to Microsoft.AspNetCore.App, version '2.2.0' is coming from. I have Googled this and I haven't come across any related issues.
Thanks in advance for any help.
hi many time this problem happened to me, so first uninstall all of the NuGet packages from the all of your project and class library ( remember the name of packages you have been uninstalled)
then install them again with the last version you want (be careful many packages in asp core 3 joined to gather or removed)
i recently had this issue after migrating from .net core 2.2 to 5.0.
after struggling for hours there's a hidden folder inside the root folder named ".config" , you'll find "dotnet-tools.json" , modify the version and it should work.

warning NETSDK1080: A PackageReference to Microsoft.AspNetCore.App is not necessary when targeting .NET Core 3.0 or higher

How do I fix the nasty warning I'm getting when running .NET Core tests from a command line via dotnet test?
The dotnet --version returns back 3.1.101.
$ dotnet test
watch : Started
C:\Program Files\dotnet\sdk\3.1.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets(151,5):
warning NETSDK1080: A PackageReference to Microsoft.AspNetCore.App is not necessary when targeting
.NET Core 3.0 or higher. If Microsoft.NET.Sdk.Web is used, the shared framework will be referenced automatically.
Otherwise, the PackageReference should be replaced with a FrameworkReference.
[C:\github\demo\Demo\SmartHome.API\SmartHome.API.csproj]
C:\Program Files\dotnet\sdk\3.1.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets(151,5):
warning NETSDK1080: A PackageReference to Microsoft.AspNetCore.App is not necessary when targeting
.NET Core 3.0 or higher. If Microsoft.NET.Sdk.Web is used, the shared framework will be referenced automatically.
Otherwise, the PackageReference should be replaced with a FrameworkReference.
[C:\github\demo\Demo\SmartHome.API\SmartHome.API.csproj]
Test run for C:\github\demo\Demo\SmartHome.API.Test\bin\Debug\netcoreapp3.1\SmartHome.API.Test.dll(.NETCoreApp,Version=v3.1)
Microsoft (R) Test Execution Command Line Tool Version 16.3.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Here's what my SmartHome.API.Test.csproj looks like.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="MongoDB.Driver" Version="2.10.1" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="coverlet.collector" Version="1.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SmartHome.API\SmartHome.API.csproj" />
<ProjectReference Include="..\SmartHome.Models\SmartHome.API.Models.csproj" />
</ItemGroup>
</Project>
And this is the SmartHome.API.csproj which seems to be the source of the issue.
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentValidation" Version="8.6.1" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.8" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.1" />
<PackageReference Include="MongoDB.Driver" Version="2.10.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SmartHome.Models\SmartHome.API.Models.csproj" />
</ItemGroup>
</Project>
Changing a package dependency from Microsoft.AspNetCore.App (2.2.8) into a FrameworkReference in the SmartHome.API.csproj solved the problem for me at the cost of introducing a new one.
Initial fix
+ <ItemGroup>
+ <FrameworkReference Include="Microsoft.AspNetCore.App" />
+ </ItemGroup>
+
<ItemGroup>
<PackageReference Include="FluentValidation" Version="8.6.1" />
- <PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.8" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.1" />
<PackageReference Include="MongoDB.Driver" Version="2.10.1" />
</ItemGroup>
New warning
I started seeing a new warning:
C:\Program Files\dotnet\sdk\3.1.101\Sdks\Microsoft.NET.Sdk\targets\
Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(39,5):
warning NETSDK1086: A FrameworkReference for 'Microsoft.AspNetCore.App' was
included in the project. This is implicitly referenced by the .NET SDK and you
do not typically need to reference it from your project. For more information,
see https://aka.ms/sdkimplicitrefs
Final fix
...so I ended up removing the "Microsoft.AspNetCore.App" reference altogether. Now the build is warning-free!
i.e. the file looks like this:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentValidation" Version="8.6.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.1" />
<PackageReference Include="MongoDB.Driver" Version="2.10.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SmartHome.Models\SmartHome.API.Models.csproj" />
</ItemGroup>
</Project>
Thanks a lot for the provided fix.
I deleted the reference <PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.8" /> and my build is now warning-free too!! :)
Br,
harald

.NET Core 3.0 Identity issue

I'm trying to update my projects to .NET Core 3.0 and .NET Standard 2.1 (including .NET Core Identity)
I have 2 projects. First my Web API:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0" />
</ItemGroup>
...
And in this project code related with Identity works fine.
As I see here I need to remove package Microsoft.AspNetCore.Identity
https://learn.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-3.0&tabs=visual-studio
2-nd project:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<!--<FrameworkReference Include="Microsoft.AspNetCore.App" />-->
<!--<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />-->
</ItemGroup>
...
So, if I remove Microsoft.AspNetCore.Identity from my second project I see error:
The type or namespace name 'SignInManager<>' could not be found (are you missing a using directive or an assembly reference?)
If I add this line:
<FrameworkReference Include="Microsoft.AspNetCore.App" />
I see this error:
Error NETSDK1073 The FrameworkReference 'Microsoft.AspNetCore.App' was not recognized
How can I resolve my issue?
See this Github Issue which explains a lot of the changes. As said in one of the comments.
Correct. We are removing the netstandard2.0 from most Microsoft.AspNetCore.* assemblies. See #3754
So in order to use the <FrameworkReference Include="Microsoft.AspNetCore.App" /> in your .csproj you will need to target netcoreapp3.0 or higher.
I started getting this issue after downgrading visual studio enterprise 2019 to professional 2019.
.Net core framework netcoreapp3.1
I fixed it by updating the Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation from 3.1.3 to 3.1.4.

Problem adding initial migration and my configuration and services don't have references

I just started learning how to create asp.netcore web applications using mvc 2.0 pattern...i encountered;Problem adding migration...and most of the configuration and services in my startup.cs don't have any reference hence they dont change color.I was told I have to install one nuget package but I already installed some...it is still not working. Hence I can't add initial migration. In the picture above I have included an evidence of the Nuget packages I installed on my system
Try to add Microsoft.EntityFrameworkCore.Design in your project.
If you are using asp.net core 2.2(2.1+), you do not need to add additional EF core packages which are included in the Microsoft.AspNetCore.App metapackage. The default .csproj file is:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<UserSecretsId>aspnet-{Project Name}-{GUID}</UserSecretsId>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.0" />
</ItemGroup>
</Project>
For asp.net core 2.0,
<Project Sdk = "Microsoft.NET.Sdk.Web" >
< PropertyGroup >
< TargetFramework > netcoreapp2.0</TargetFramework>
<UserSecretsId>aspnet-{Project Name}-{GUID}</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include = "Microsoft.AspNetCore.All" Version="2.0.9" />
<PackageReference Include = "Microsoft.EntityFrameworkCore.Tools" Version="2.0.3" PrivateAssets="All" />
<PackageReference Include = "Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.4" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include = "Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.3" />
<DotNetCliToolReference Include = "Microsoft.Extensions.SecretManager.Tools" Version="2.0.2" />
<DotNetCliToolReference Include = "Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.4" />
</ItemGroup>
</Project>
You could show your .csproj file(Right-click project -> Edit csproj) and check the missing packages.
I upgraded my .netcore SDK software to 2.2 so I could run asp.netcore MVC 2.2 since all my nuget packages are versions 2.2.n....it is working well and I've been able to add migration ....thanks to you all for your help

Categories