To upload packages by hand, the following steps need to be performed:
- First, you will have to retrieve the URL to your feed. To do this, click on Connect to feed for any of your feeds, as shown in the following screenshot:
- In the list on the left, select the protocol to use for accessing the feed.
- Select the correct view to use. Remember that for publishing packages, the full feed URL needs to be used since views are read-only.
- After making the correct selections, copy the correct URL to the clipboard using the copy button.
- Execute the following command to create a NuGet package from a regular .csproj file. If you do not have the NuGet.exe tool already available, you can download it using the link provided at the end of this chapter:
nuget.exe pack DemoSolutionMyPackage.csproj -Version 1.1.0
- Execute the final command for uploading the package to NuGet:
nuget.exe push
-Source "{feedUrl}" "MyPackage.1.1.0.nupkg"
After executing the final command, the package will be published and become available in your feed.