Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Why can't I use any of the functionality of my installed NuGet packages, when installed trough NuGet package manager? [duplicate]

$
0
0

I'm new to ASP.net programming (not programming in general) and are following a course online.

I have a big problem, that seems to be in Visual Studio, probably with the NuGet package manager.

The problem resides in, that I install the packages, but I can't use them.

Here is an example.

I have installed the Entity framework in my class library:

Solution Explore picture

And my CSPROJ also looks ok to me:

<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><TargetFramework>netcoreapp3.1</TargetFramework></PropertyGroup><ItemGroup><PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.1" /><PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.1"><PrivateAssets>all</PrivateAssets><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets></PackageReference><PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.1" /></ItemGroup><ItemGroup><ProjectReference Include="..\OdeToFood.core\OdeToFood.Core.csproj" /></ItemGroup></Project>

When I run the dotnet ef command in the project, I get:

PS H:\Pluralsight\asp.net core\OdeToFood\OdeToFood\OdeToFood.Data> dotnet efCould not execute because the specified command or file was not found.Possible reasons for this include:  * You misspelled a built-in dotnet command.  * You intended to execute a .NET program, but dotnet-ef does not exist.  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

Also, an error in the Package Manager Console.

And if I run dotnet -h ef it doesn't show under SDK, but it did in the course video I'm following.

I have:

  • The newest version of VS
  • Rebuild the solution and the class library
  • Restarted VS
  • The latest stable version of the packages

It was also a problem when I did it with Font Awesome, but I installed that as a client-side library with Libman instead, because I didn't want to fight with it anymore at that time. But, I really want my package manager to work.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>