#Is it possible to manage the NuGet packages for Nano projects from the command line?

1 messages · Page 1 of 1 (latest)

storm geyser
#

I would like to use the console apps/scripts to manage the NuGet packages for my projects, especially when I am jumping back and forth between samples and trial projects. I've tried manually comparing the packages.config files, but then that doesn't update the nfproj file with references, and that file is a tricky to manually compare.

I'd like to be able to Add/Remove/Update with bonus of manage package versions. Is there already a tool that would allow me to do that, or should I write a script for that purpose?

glass dock
#

No, you cannot because nano is not yet as SDK. You will be once this will be done (no ETA). In the mean time, you have to use the Visual Studio extension or do it "manually"

viscid bone
#

why don't you use nuget CLI for that? it's a mater of passing package ID, version and path to the solution file

storm geyser
glass dock
storm geyser
#

Right, that is what I have been using 🙂

#

I was hoping for an "easy" way to apply all the required packages that are used in a project sample into my own project loosely based on that sample.

#

I would be happy to write some documentation for this, if that would be appreciated!

storm geyser
#

If I manually add the entry to the packages.conf file, I can get the nuget to restore the file, but not add the reference to the project file itself.

#

I may just write something in PowerShell to do something like .\NanoPackageManager.ps1 -install nanoFramework.Json and have it handle downloading the package from nuget and update the con and nfproj files.

storm geyser
glass dock
#

I think an easier way is to rename the nfproj into csproj, apply the nuget and rename. That should be easier and should work 😉

storm geyser
#

Well where's the fun in that? This was a weird deep dive in xml search and manipulation, and writing power shell in vscode (switching from the ise)

#

Also cool was how to search for nuget packages