I'd like to add Microsoft.AspNetCore.StaticFiles to ASP.NET Core project.
Is there another way rather than editing manually the .csproj file?
If I do nuget install
it installs it in the current project folder and no change is applied to the .csproj file.
The OS is *nix one so I'm using VSCode and a terminal/console.
NuGet installs the latest version of the package when you use the dotnet add package command unless you specify the package version ( -v switch).
The .NET Core SDK which has support for the new Sdk style .csproj files allows you to do this from the command line if you are using a .csproj file.
dotnet add <PROJECT> package [arguments] [options]
dotnet add package Microsoft.AspNetCore.StaticFiles
dotnet add package Microsoft.AspNetCore.StaticFiles -v 1.0.1
If you are using project.json files then there is no command line support for that as far as I am aware.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With