Each download is the nuget.exe file directly. Instruct your browser to save the file to a folder of your choice. The download file isn't an installer, so you don't see anything if you run the file directly from the browser.
You can use either the dotnet CLI or the nuget.exe CLI to support NuGet features in the Visual Studio IDE. The dotnet CLI is installed with some Visual Studio workloads, such as .NET Core. The nuget.exe CLI must be installed separately as described earlier. For a feature comparison of the tools, see the feature availability section.
2018-03-16T08:30:30.0446275Z ##[error]The nuget command failed with exit code(1) and error(System.AggregateException: One or more errors occurred. ---> NuGet.CommandLine.CommandLineException: Error parsing solution file at D:\a\ts.sln: Exception has been thrown by the target of an invocation. at NuGet.CommandLine.MsBuildUtility.GetAllProjectFileNamesWithMsBuild(String solutionFile, String msbuildPath) at NuGet.CommandLine.RestoreCommand.ProcessSolutionFile(String solutionFileFullPath, PackageRestoreInputs restoreInputs) at NuGet.CommandLine.RestoreCommand.d__37.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.CommandLine.RestoreCommand.d__30.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at NuGet.CommandLine.Command.Execute() at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)---> (Inner Exception #0) NuGet.CommandLine.CommandLineException: Error parsing solution file at D:\a\ts.sln: Exception has been thrown by the target of an invocation. at NuGet.CommandLine.MsBuildUtility.GetAllProjectFileNamesWithMsBuild(String solutionFile, String msbuildPath) at NuGet.CommandLine.RestoreCommand.ProcessSolutionFile(String solutionFileFullPath, PackageRestoreInputs restoreInputs) at NuGet.CommandLine.RestoreCommand.d__37.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.CommandLine.RestoreCommand.d__30.MoveNext()
I have a bunch of powershell scripts I'm providing to developers as nuget package. The scripts depend on other packages. When I add those packages as dependencies to my package, running nuget.exe restore or nuget.exe install on my package (which is in the packages.config), I would like for it to also install the dependencies (as would happen in restoring/installing using Visual Studio). What do I need to do to have all dependencies also install?
Firstly, I think it would be useful for Travis to pre-install NuGet.CommandLine , available from nuget or choco. Or if it is already installed, add it to the PATH. Doing so will mean people dont need to do the following OneGet set up in order to sanely use NuGet directly.
It would also be lovely if nuget was pre-installed on the Xenial image, so that it can be used on either as the basis of a cross-platform build. Even better if pwsh (not in Ubuntu afaics) was also pre-installed on Xenial, so ps1 can be a cross-platform scripting language for Travis.
You can use CLI tools like nuget and dotnet to publish and consume packages from CodeArtifact. This document provides information about configuring the CLI tools and using them to publish or consume packages.
You can configure the nuget or dotnet CLI with the CodeArtifact NuGet Credential Provider, with the AWS CLI, or manually. Configuring NuGet with the credential provider is highly recommended for simplified setup and continued authentication.
The CodeArtifact NuGet Credential Provider simplifies the authentication and configuration of CodeArtifact with NuGet CLI tools. CodeArtifact authentication tokens are valid for a maximum of 12 hours. To avoid having to manually refresh the token while using the nuget or dotnet CLI, the credential provider periodically fetches a new token before the current token expires.
To use the credential provider, ensure that any existing AWS CodeArtifact credentials are cleared from your nuget.config file that may have been added manually or by running aws codeartifact login to configure NuGet previously.
After you create a repository and configure the credential provider you can use the nuget or dotnet CLI tools to install and publish packages. For more information, see Consume NuGet packages from CodeArtifact and Publish NuGet packages to CodeArtifact.
The codeartifact login command in the AWS CLI adds a repository endpoint and authorization token to your NuGet configuration file enabling nuget or dotnet to connect to your CodeArtifact repository. This will modify the user-level NuGet configuration which is located at %appdata%\NuGet\NuGet.Config for Windows and /.config/NuGet/NuGet.Config or /.nuget/NuGet/NuGet.Config for Mac/Linux. For more information about NuGet configurations, see Common NuGet configurations.
After you create a repository and configure authentication you can use the nuget, dotnet, or msbuild CLI clients to install and publish packages. For more information, see Consume NuGet packages from CodeArtifact and Publish NuGet packages to CodeArtifact.
To consume a package version from a CodeArtifact repository or one of its upstream repositories with nuget or dotnet, run the following command replacing packageName with the name of the package you want to consume and packageSourceName with the source name for your CodeArtifact repository in your NuGet configuration file. If you used the login command to configure your NuGet configuration, the source name is domain_name/repo_name.
When a package is requested, the NuGet client caches which versions of that package exists. Because of this behavior, an install may fail for a package that was previously requested before the desired version became available. To avoid this failure and successfully install a package that exists, you can either clear the NuGet cache ahead of an install with nuget locals all --clear or dotnet nuget locals all --clear, or avoid using the cache during install and restore commands by providing the -NoCache option for nuget or the --no-cache option for dotnet.
Please disconnect the studio robot from orchestrator and publish to get the nuget package created by the studio. You can then make sure the folder Path is followed in your custom build pipeline. Hope it helps.
We create the nuspec file (one off task) whenever we kick off a new project and after that everything is done within out build pipeline (teamcity, nuget server, octopus) to build, package, publish and deploy to orchestrator.
Thanks for your reply. Excuse my ignorance, but does that mean creating the nuspec is a manual process that needs to be completed in oder to allow nuget to build the package? Or is it possible to create the nuspec as part of another automated process? Thanks!
nuspec is created by the studio when a package is published. You can extract a published nuget package and copy the nuspec file. This process can be manual using the UI or you can run uirobot.exe to generate the nuget package and then programmatically extract the file and check into source control. Hope it helps.
Use the following command to authenticate to GitHub Packages in a GitHub Actions workflow using the GITHUB_TOKEN instead of hardcoding a personal access token in a nuget.config file in the repository:
To authenticate to GitHub Packages with the dotnet command-line interface (CLI), create a nuget.config file in your project directory specifying GitHub Packages as a source under packageSources for the dotnet CLI client.
If you specify a RepositoryURL in your nuget.config file, the published package will automatically be connected to the specified repository. For more information, see "Working with the NuGet registry." For information on linking an already-published package to a repository, see "Connecting a repository to a package."
When publishing, if you are linking your package to a repository, the OWNER of the repository specified in your .csproj file must match the NAMESPACE that you use in your nuget.config authentication file. Specify or increment the version number in your .csproj file, then use the dotnet pack command to create a .nuspec file for that version. For more information on creating your package, see "Create and publish a package" in the Microsoft documentation.
Using packages from GitHub in your project is similar to using packages from nuget.org. Add your package dependencies to your .csproj file, specifying the package name and version. For more information on using a .csproj file in your project, see "Working with NuGet packages" in the Microsoft documentation.
Private package sources may exist in the nuget.config file. If this file is located at .nuget/nuget.config (that is, inside a .nuget folder), the dotnet CLI may have difficulty finding and using it. Consequently, the dotnet CLI might be unable to locate a package.
The NuGet CLI tool allows you to easily update and restore NuGet packages in projects and solutions. To execute NuGet CLI commands, you must have the nuget.exe file. You can download it from nuget.org.
Execute the following script using your MyGet feedUrl and MyGet username, password and apikey.Run this from a command line where you have access to nuget.exe (or set the path to your nuget.exe in a system environment variable).
Your MyGet feed's Feed Details tab will provide you with a pre-authenticated feed URL. This URL contains an access token in the URL and will not require setting additional credentials in your nuget.config file. Note that the pre-authenticated feed URL contains a credential that will be displayed in build logs etc., so use this final option with caution!
df19127ead