You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/consume-packages/Package-Restore.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ After a successful restore:
41
41
42
42
If the package references in your project file or your *packages.config* file are incorrect and don't match your desired state, install or update the correct packages instead of using Package Restore.
43
43
44
-
If you have missing packages or package-related errors after you run Package Restore, such as error icons in Solution Explorer, follow the instructions in [Troubleshooting Package Restore errors](package-restore-troubleshooting.md), or [reinstall or update](../consume-packages/reinstalling-and-updating-packages.md) the packages. In Visual Studio, the Package Manager Console provides several options for reinstalling packages. For more information, see [Use Package-Update](reinstalling-and-updating-packages.md#using-update-package).
44
+
If you have missing packages or package-related errors after you run Package Restore, such as error icons in Solution Explorer, follow the instructions in [Troubleshooting Package Restore errors](package-restore-troubleshooting.md), or [reinstall or update](../consume-packages/reinstalling-and-updating-packages.md) the packages. In Visual Studio, the Package Manager Console provides several options for reinstalling packages. For more information, see [Use Package-Update](reinstalling-and-updating-packages.md#update-package-command).
45
45
46
46
<aname="restore-using-visual-studio"></a>
47
47
## Restore packages in Visual Studio
@@ -154,7 +154,7 @@ Azure DevOps Server and TFS 2013 and later automatically restore packages during
154
154
155
155
NuGet restore through any method honors any version constraints you specify in *packages.config* or the project file.
156
156
157
-
- In *packages.config*, you can specify an `allowedVersions` range in the dependency. For more information, see [Constrain upgrade versions](../consume-packages/reinstalling-and-updating-packages.md#constraining-upgrade-versions). For example:
157
+
- In *packages.config*, you can specify an `allowedVersions` range in the dependency. For more information, see [Constraints on upgrade versions](../consume-packages/reinstalling-and-updating-packages.md#constraints-on-upgrade-versions). For example:
Copy file name to clipboardExpand all lines: docs/consume-packages/migrate-packages-config-to-package-reference.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Visual Studio 2017 Version 15.7 and later supports migrating a project from the
25
25
* Migration is not currently available for C++ and ASP.NET projects.
26
26
* Some packages may not be fully compatible with PackageReference. For more information, see [package compatibility issues](#package-compatibility-issues).
27
27
28
-
In addition, there are some differences in how PackageReferences work compared to packages.config. For example, [constraining upgrade versions](../consume-packages/reinstalling-and-updating-packages.md#constraining-upgrade-versions) is not supported by PackageReference, but PackageReference adds support for [Floating Versions](../consume-packages/package-references-in-project-files.md#floating-versions).
28
+
In addition, there are some differences in how PackageReferences work compared to packages.config. For example, [Constraints on upgrade versions](../consume-packages/reinstalling-and-updating-packages.md#constraints-on-upgrade-versions) is not supported by PackageReference, but PackageReference adds support for [Floating Versions](../consume-packages/package-references-in-project-files.md#floating-versions).
Copy file name to clipboardExpand all lines: docs/guides/Create-UWP-Packages-CS.md
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Create NuGet Packages for the UWP Platform (C#)
3
3
description: An end-to-end walkthrough of creating NuGet packages using a Windows Runtime Component for the Universal Windows Platform in C#.
4
4
author: rrelyea
5
5
ms.author: rrelyea
6
-
ms.date: 02/28/2020
6
+
ms.date: 11/01/2023
7
7
ms.topic: tutorial
8
8
---
9
9
@@ -15,45 +15,46 @@ In this walkthrough you create a NuGet package with a C# UWP component (includin
15
15
16
16
## Prerequisites
17
17
18
-
1. Visual Studio 2019. Install the 2019 Community edition for free from [visualstudio.com](https://www.visualstudio.com/); you can use the Professional and Enterprise editions as well.
18
+
1. Visual Studio 2019. Install the 2019 Community edition for free from [visualstudio.com](https://www.visualstudio.com/). You can also use the Professional and Enterprise editions.
19
19
20
-
1. NuGet CLI. Download the latest version of `nuget.exe` from [nuget.org/downloads](https://nuget.org/downloads), saving it to a location of your choice (the download is the `.exe` directly). Then add that location to your PATH environment variable if it isn't already. [More details](../reference/nuget-exe-cli-reference.md#windows).
20
+
1. NuGet CLI. Download the latest version of `nuget.exe` from [nuget.org/downloads](https://nuget.org/downloads) and save the tool to a location of your choice. (The download is the `.exe`file directly.) Add the tool file location to your PATH environment variable, if it isn't already. For more information, see [Installing nuget.exe](../reference/nuget-exe-cli-reference.md#installing-nugetexe).
21
21
22
22
## Create a UWP Windows Runtime component
23
23
24
-
1. In Visual Studio, choose**File > New > Project**, search for "uwp c#", select the **Windows Runtime Component (Universal Windows)** template, click next, change the name to ImageEnhancer, and click Create. Accept the default values for Target Version and Minimum Version when prompted.
24
+
1. In Visual Studio, select**File > New > Project**, and search for "uwp c#". Select the **Windows Runtime Component (Universal Windows)** template and select **Next**. Change the name to ImageEnhancer, and select **Create**. Accept the default values for Target Version and Minimum Version when prompted.
25
25
26
26

27
27
28
-
1. Rightclick the project in Solution Explorer, select **Add > New Item**, select **Templated Control**, change the name to AwesomeImageControl.cs, and click**Add**:
28
+
1. Right-click the project in Solution Explorer, select **Add > New Item**, select **Templated Control**, change the name to AwesomeImageControl.cs, and select**Add**:
29
29
30
30

31
31
32
32
1. Right-click the project in Solution Explorer and select **Properties.** In the Properties page, choose **Build** tab and enable **XML Documentation File**:
33
33
34
34

35
35
36
-
1. Rightclick the *solution*now, select **Batch Build**, check the five build boxesin the dialog as shown below. This makes sure that when you do a build, you generate a full set of artifacts for each of the target systems that Windows supports.
36
+
1. Right-click the *solution*and select **Batch Build**. Select the five build boxes, as shown in the following image. This makes sure that when you do a build, you generate a full set of artifacts for each of the target systems that Windows supports.
37
37
38
38

39
39
40
-
1. In the Batch Build dialog, and click**Build** to verify the project and create the output files that you need for the NuGet package.
40
+
1. In the Batch Build dialog, and select**Build** to verify the project and create the output files that you need for the NuGet package.
41
41
42
42
> [!Note]
43
43
> In this walkthrough you use the Debug artifacts for the package. For non-debug package, check the Release options in the Batch Build dialog instead, and refer to the resulting Release folders in the steps that follow.
44
44
45
45
## Create and update the .nuspec file
46
46
47
-
To create the initial `.nuspec` file, do the three steps below. The sections that follow then guide you through other necessary updates.
47
+
To create the initial `.nuspec` file, complete the following steps. The subsequent sections guide you through other necessary updates.
48
48
49
-
1. Open a command prompt and navigate to the folder containing `ImageEnhancer.csproj` (this will be a subfolder below where the solution file is).
50
-
1. Run the [`NuGet spec`](../reference/cli-reference/cli-ref-spec.md) command to generate `ImageEnhancer.nuspec` (the name of the file is taken from the name of the `.csroj` file):
49
+
1. Open a command prompt and browse to the folder that contains the `ImageEnhancer.csproj` file, which should be a subfolder of the folder that contains the solution file.
50
+
51
+
1. Run the [`NuGet spec`](../reference/cli-reference/cli-ref-spec.md) command to generate the `ImageEnhancer.nuspec` file. The name of the file is taken from the name of the `.csroj` file.
51
52
52
53
```cli
53
54
nuget spec
54
55
```
55
56
56
-
1. Open `ImageEnhancer.nuspec` in an editor and update it to match the following, replacing YOUR_NAME with an appropriate value. Do not leave any of the $propertyName$ values. The `<id>` value, specifically, must be unique across nuget.org (see the naming conventions described in [Creating a package](../create-packages/creating-a-package.md#choose-a-unique-package-identifier-and-setting-the-version-number)). Also note that you must also update the author and description tags or you get an error during the packing step.
57
+
1. Open `ImageEnhancer.nuspec` in an editor and update it to match the following, replacing YOUR_NAME with an appropriate value. Don't leave any of the $propertyName$ values. The `<id>` value, specifically, must be unique across nuget.org (see the naming conventions described in [Creating a package](../create-packages/creating-a-package.md#choose-a-unique-package-identifier-and-setting-the-version-number)). Also note that you must also update the author and description tags or you get an error during the packing step.
description: Installation steps for the nuget.exe CLI tool on Windows, macOS, and Linux.
4
+
author: JonDouglas
5
+
ms.author: jodou
6
+
ms.date: 11/03/2023
7
+
ms.topic: include
8
+
---
2
9
3
-
> [!Note]
4
-
> NuGet.exe 5.0 and later require .NET Framework 4.7.2 or later to execute.
10
+
# [Windows](#tab/windows)
5
11
6
-
1. Visit [nuget.org/downloads](https://nuget.org/downloads) and select NuGet 3.3 or higher (2.8.6 is not compatible with Mono). The latest version is always recommended, and 4.1.0+ is required to publish packages to nuget.org.
7
-
1. Each download is the `nuget.exe` file directly. Instruct your browser to save the file to a folder of your choice. The file is *not* an installer; you won't see anything if you run it directly from the browser.
8
-
1. Add the folder where you placed `nuget.exe` to your PATH environment variable to use the CLI tool from anywhere.
12
+
Always install the **latest** version of the tool that supports your configuration.
9
13
10
-
#### macOS/Linux
14
+
- You can download the latest recommended version at `https://dist.nuget.org/win-x86-commandline/latest/nuget.exe`.
15
+
- If you already have the `nuget.exe` CLI tool installed, you can update the tool to the latest version with the command `nuget update -self`.
16
+
- For compatibility with older continuous integration systems, a previous URL, `https://nuget.org/nuget.exe` currently provides the [deprecated version 2.8.6](https://github.com/NuGet/NuGetGallery/issues/5381) of the CLI tool.
11
17
12
-
Behaviors may vary slightly by OS distribution.
18
+
1. Visit [nuget.org/downloads](https://nuget.org/downloads) and download NuGet version 3.3 or later.
13
19
14
-
1. Install [Mono 4.4.2 or later](https://www.mono-project.com/docs/getting-started/install/).
20
+
- Version 5.0 and later requires the .NET Framework version 4.7.2 or later.
21
+
- Version 4.1.0 and later is required to publish packages to `nuget.org`.
22
+
- Version 2.8.6 isn't compatible with [Mono](https://www.mono-project.com/docs/getting-started/install/).
23
+
24
+
1. 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.
25
+
26
+
1. To use the CLI tool from anywhere, add the folder location for the `nuget.exe` file to your PATH environment variable.
27
+
28
+
# [macOS / Linux](#tab/macos+linux)
29
+
30
+
Behaviors can vary slightly based on your operating system distribution.
31
+
32
+
> [!NOTE]
33
+
> Visual Studio for Mac is scheduled for retirement by August 31, 2024 in accordance with [Microsoft's Modern Lifecycle Policy](/lifecycle/policies/modern). For more information, see [What's happening to Visual Studio for Mac](/visualstudio/mac/what-happened-to-vs-for-mac).
34
+
35
+
1. Install [Mono version 4.4.2 or later](https://www.mono-project.com/docs/getting-started/install/).
15
36
16
37
1. Execute the following command at a shell prompt:
17
38
18
-
```bash
19
-
# Download the latest stable `nuget.exe` to `/usr/local/bin`
1. Create an alias by adding the following script to the appropriate file for your operating system (typically `~/.bash_aliases` or `~/.bash_profile`):
22
45
23
-
1. Create an alias by adding the following script to the appropriate file for your OS (typically `~/.bash_aliases` or `~/.bash_profile`):
46
+
```bash
47
+
# Create as alias for nuget
48
+
alias nuget="mono /usr/local/bin/nuget.exe"
49
+
```
24
50
25
-
```bash
26
-
# Create as alias for nuget
27
-
alias nuget="mono /usr/local/bin/nuget.exe"
28
-
```
51
+
1. Reload the shell. Test the installation by entering the command `nuget` with no parameters. NuGet CLI help should display.
29
52
30
-
1. Reload the shell. Test the installation by entering `nuget` with no parameters. NuGet CLI help should display.
0 commit comments