Skip to content

Commit e618857

Browse files
authored
Freshness Pass User Story: 173521 (#3172)
1 parent 14ec794 commit e618857

File tree

8 files changed

+250
-160
lines changed

8 files changed

+250
-160
lines changed

docs/consume-packages/Package-Restore.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ After a successful restore:
4141

4242
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.
4343

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).
4545

4646
<a name="restore-using-visual-studio"></a>
4747
## Restore packages in Visual Studio
@@ -154,7 +154,7 @@ Azure DevOps Server and TFS 2013 and later automatically restore packages during
154154

155155
NuGet restore through any method honors any version constraints you specify in *packages.config* or the project file.
156156

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:
158158

159159
```xml
160160
<package id="Newtonsoft.json" version="6.0.4" allowedVersions="[6,7)" />

docs/consume-packages/Reinstalling-and-Updating-Packages.md

Lines changed: 123 additions & 59 deletions
Large diffs are not rendered by default.

docs/consume-packages/migrate-packages-config-to-package-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Visual Studio 2017 Version 15.7 and later supports migrating a project from the
2525
* Migration is not currently available for C++ and ASP.NET projects.
2626
* Some packages may not be fully compatible with PackageReference. For more information, see [package compatibility issues](#package-compatibility-issues).
2727

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).
2929

3030
### Known Issues
3131

docs/guides/Create-UWP-Packages-CS.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Create NuGet Packages for the UWP Platform (C#)
33
description: An end-to-end walkthrough of creating NuGet packages using a Windows Runtime Component for the Universal Windows Platform in C#.
44
author: rrelyea
55
ms.author: rrelyea
6-
ms.date: 02/28/2020
6+
ms.date: 11/01/2023
77
ms.topic: tutorial
88
---
99

@@ -15,45 +15,46 @@ In this walkthrough you create a NuGet package with a C# UWP component (includin
1515

1616
## Prerequisites
1717

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.
1919

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).
2121

2222
## Create a UWP Windows Runtime component
2323

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.
2525

2626
![Creating a new UWP Windows Runtime Component project](media/UWP-NewProject-CS.png)
2727

28-
1. Right click 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**:
2929

3030
![Adding a new XAML Templated Control item to the project](media/UWP-NewXAMLControl-CS.png)
3131

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

3434
![Setting Generate XML Documentation Files to Yes](media/UWP-GenerateXMLDocFiles-CS.png)
3535

36-
1. Right click the *solution* now, select **Batch Build**, check the five build boxes in 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.
3737

3838
![Batch Build](media/UWP-BatchBuild-CS.png)
3939

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.
4141

4242
> [!Note]
4343
> 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.
4444
4545
## Create and update the .nuspec file
4646

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.
4848

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.
5152

5253
```cli
5354
nuget spec
5455
```
5556
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.
5758
5859
```xml
5960
<?xml version="1.0"?>

docs/includes/install-cli.md

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,53 @@
1-
#### Windows
1+
---
2+
title: Include
3+
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+
---
29

3-
> [!Note]
4-
> NuGet.exe 5.0 and later require .NET Framework 4.7.2 or later to execute.
10+
# [Windows](#tab/windows)
511

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.
913

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.
1117

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.
1319

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/).
1536

1637
1. Execute the following command at a shell prompt:
1738

18-
```bash
19-
# Download the latest stable `nuget.exe` to `/usr/local/bin`
20-
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
21-
```
39+
```bash
40+
# Download the latest stable `nuget.exe` to `/usr/local/bin`
41+
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
42+
```
43+
44+
1. Create an alias by adding the following script to the appropriate file for your operating system (typically `~/.bash_aliases` or `~/.bash_profile`):
2245

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+
```
2450

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.
2952

30-
1. Reload the shell. Test the installation by entering `nuget` with no parameters. NuGet CLI help should display.
53+
---

0 commit comments

Comments
 (0)