From 1ab750ff17e55c763d646c50e7630138804ce8b8 Mon Sep 17 00:00:00 2001 From: Karan Nandwani Date: Wed, 13 Feb 2019 17:34:00 -0800 Subject: [PATCH 0001/1475] Update NuGet-5.0-preview.md --- docs/release-notes/NuGet-5.0-preview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-notes/NuGet-5.0-preview.md b/docs/release-notes/NuGet-5.0-preview.md index 2249364f6..d9cc31993 100644 --- a/docs/release-notes/NuGet-5.0-preview.md +++ b/docs/release-notes/NuGet-5.0-preview.md @@ -16,7 +16,7 @@ ms.topic: conceptual ## Summary: What's New in NuGet 5.0 Preview 3 -### Issues fixed in this release +### Issues fixed in this release **Bugs:** From cf9e49884e80b25319bffb4581e7b4899304c38a Mon Sep 17 00:00:00 2001 From: Rob Relyea Date: Fri, 29 Mar 2019 17:48:05 -0700 Subject: [PATCH 0002/1475] improve nu1605 based on feedback issues in docs. --- docs/reference/errors-and-warnings/NU1605.md | 29 ++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/docs/reference/errors-and-warnings/NU1605.md b/docs/reference/errors-and-warnings/NU1605.md index b9ddcccb0..6b4e11114 100644 --- a/docs/reference/errors-and-warnings/NU1605.md +++ b/docs/reference/errors-and-warnings/NU1605.md @@ -12,10 +12,35 @@ f1_keywords: # NuGet Warning NU1605 +## Example 1 +
Detected package downgrade: 'PackageB' from 4.0.0 to 3.5.0. Reference the package directly from the project to select a different version.
'PackageA' 3.5.0 -> 'PackageB' 3.5.0
'PackageC' 4.0.0 -> 'PackageD' 4.0.0 -> 'PackageB' 4.0.0
### Issue -A dependency package specified a version constraint on a higher version of a package than restore ultimately resolved. That is, because of the "nearest wins" rule when resolving packages, a nearer package in the graph may have overridden a distant package. +A dependency package specified a version constraint on a higher version of a package than restore ultimately resolved. That is, because of the [`nearest-wins`](https://docs.microsoft.com/en-us/nuget/consume-packages/dependency-resolution#nearest-wins) rule when resolving packages, a nearer package in the graph may have overridden a distant package. + +### Solution +To the project exhibiting the restore error, add a package reference to the higher version of the package + +In the example above, you would add a package reference to Package B version 4.0.0: + +
+  'PackageA' 3.5.0 -> 'PackageB' 3.5.0
+ 'PackageC' 4.0.0 -> 'PackageD' 4.0.0 -> 'PackageB' 4.0.0
+ 'PackageB' 4.0.0 +
+ +Since, [`nearest-wins`](https://docs.microsoft.com/en-us/nuget/consume-packages/dependency-resolution#nearest-wins), the direct package reference to PackageB 4.0.0 (made at level 1), will take precedence over PackageB (made at level 2). + +## Example 2 + +
Detected package downgrade: Microsoft.NETCore.App from 2.1.8 to 2.1.0. Reference the package directly from the project to select a different version.
+ test -> mvc -> Microsoft.NETCore.App (>= 2.1.8)
+ test -> Microsoft.NETCore.App (>= 2.1.0)
+
+ +### Issue +The mvc project specified a version constraint on a higher version of a package than restore ultimately resolved. That is, because of the [`nearest-wins`](https://docs.microsoft.com/en-us/nuget/consume-packages/dependency-resolution#nearest-wins) rule when resolving packages, a nearer package in the graph may have overridden a distant package. ### Solution -Add a direct reference to the project for the higher version of the package that you want to use. \ No newline at end of file +This specific error (with Microsoft.NETCore.App package) is improved my moving your .NET Core SDK to 2.2.100 or later. A related doc page about (Self-contained deployment runtime roll forward)[https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-patch-selection] may help. Microsoft.NETCore.App is an auto-referenced package that the .NET Core SDK before version 3.0.100 chooses to bring in automatically. \ No newline at end of file From 654faeddc2d267fa0fc84a380e91584c1e4a18b0 Mon Sep 17 00:00:00 2001 From: Karan Nandwani Date: Wed, 10 Apr 2019 15:55:40 -0700 Subject: [PATCH 0003/1475] Update docs/reference/errors-and-warnings/NU1605.md --- docs/reference/errors-and-warnings/NU1605.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/errors-and-warnings/NU1605.md b/docs/reference/errors-and-warnings/NU1605.md index 6b4e11114..7843c1490 100644 --- a/docs/reference/errors-and-warnings/NU1605.md +++ b/docs/reference/errors-and-warnings/NU1605.md @@ -43,4 +43,4 @@ Since, [`nearest-wins`](https://docs.microsoft.com/en-us/nuget/consume-packages/ The mvc project specified a version constraint on a higher version of a package than restore ultimately resolved. That is, because of the [`nearest-wins`](https://docs.microsoft.com/en-us/nuget/consume-packages/dependency-resolution#nearest-wins) rule when resolving packages, a nearer package in the graph may have overridden a distant package. ### Solution -This specific error (with Microsoft.NETCore.App package) is improved my moving your .NET Core SDK to 2.2.100 or later. A related doc page about (Self-contained deployment runtime roll forward)[https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-patch-selection] may help. Microsoft.NETCore.App is an auto-referenced package that the .NET Core SDK before version 3.0.100 chooses to bring in automatically. \ No newline at end of file +This specific error (with Microsoft.NETCore.App package) is improved by moving your .NET Core SDK to 2.2.100 or later. A related doc page about (Self-contained deployment runtime roll forward)[https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-patch-selection] may help. Microsoft.NETCore.App is an auto-referenced package that the .NET Core SDK before version 3.0.100 chooses to bring in automatically. From 2d1a2c01c2f8ba0f6672938dcfb826d73e98887c Mon Sep 17 00:00:00 2001 From: Karan Nandwani Date: Wed, 10 Apr 2019 17:14:57 -0700 Subject: [PATCH 0004/1475] Apply suggestions from code review --- docs/reference/errors-and-warnings/NU1605.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/reference/errors-and-warnings/NU1605.md b/docs/reference/errors-and-warnings/NU1605.md index 7843c1490..7b2580242 100644 --- a/docs/reference/errors-and-warnings/NU1605.md +++ b/docs/reference/errors-and-warnings/NU1605.md @@ -17,10 +17,10 @@ f1_keywords:
Detected package downgrade: 'PackageB' from 4.0.0 to 3.5.0. Reference the package directly from the project to select a different version.
'PackageA' 3.5.0 -> 'PackageB' 3.5.0
'PackageC' 4.0.0 -> 'PackageD' 4.0.0 -> 'PackageB' 4.0.0
### Issue -A dependency package specified a version constraint on a higher version of a package than restore ultimately resolved. That is, because of the [`nearest-wins`](https://docs.microsoft.com/en-us/nuget/consume-packages/dependency-resolution#nearest-wins) rule when resolving packages, a nearer package in the graph may have overridden a distant package. +A dependency package specified a version constraint on a higher version of a package than restore ultimately resolved. That is because of the [nearest-wins](https://docs.microsoft.com/en-us/nuget/consume-packages/dependency-resolution#nearest-wins) rule - when resolving packages, the version of the nearer package in the graph will override that of the distant package with the same ID. ### Solution -To the project exhibiting the restore error, add a package reference to the higher version of the package +To the project exhibiting the restore error, add a package reference to the higher version of the package. In the example above, you would add a package reference to Package B version 4.0.0: @@ -30,7 +30,7 @@ In the example above, you would add a package reference to Package B version 4.0 'PackageB' 4.0.0 -Since, [`nearest-wins`](https://docs.microsoft.com/en-us/nuget/consume-packages/dependency-resolution#nearest-wins), the direct package reference to PackageB 4.0.0 (made at level 1), will take precedence over PackageB (made at level 2). +Since, [nearest-wins](https://docs.microsoft.com/en-us/nuget/consume-packages/dependency-resolution#nearest-wins), the direct package reference to PackageB v4.0.0, will take precedence over the transitive reference to PackageB v3.5.0. ## Example 2 @@ -40,7 +40,7 @@ Since, [`nearest-wins`](https://docs.microsoft.com/en-us/nuget/consume-packages/ ### Issue -The mvc project specified a version constraint on a higher version of a package than restore ultimately resolved. That is, because of the [`nearest-wins`](https://docs.microsoft.com/en-us/nuget/consume-packages/dependency-resolution#nearest-wins) rule when resolving packages, a nearer package in the graph may have overridden a distant package. +The mvc project specified a version constraint on a higher version of a package than restore ultimately resolved. That is because of the [nearest-wins](https://docs.microsoft.com/en-us/nuget/consume-packages/dependency-resolution#nearest-wins) rule - when resolving packages, the version of the nearer package in the graph will override that of the distant package with the same ID. ### Solution -This specific error (with Microsoft.NETCore.App package) is improved by moving your .NET Core SDK to 2.2.100 or later. A related doc page about (Self-contained deployment runtime roll forward)[https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-patch-selection] may help. Microsoft.NETCore.App is an auto-referenced package that the .NET Core SDK before version 3.0.100 chooses to bring in automatically. +This specific error (with Microsoft.NETCore.App package) is improved my moving your .NET Core SDK to 2.2.100 or later. Microsoft.NETCore.App is an auto-referenced package that the .NET Core SDK before version 3.0.100 chooses to bring in automatically. Also see (Self-contained deployment runtime roll forward)[https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-patch-selection]. From 34d2659af23cd8afcd067211fd231c0bd0b04dcd Mon Sep 17 00:00:00 2001 From: Shawn Kendrot Date: Mon, 8 Jul 2019 12:19:12 -0600 Subject: [PATCH 0005/1475] Update migrate-packages-config-to-package-reference.md migrated projects are not limited to 2017, Update the docs to say that they are supported in 2017 and newer --- docs/reference/migrate-packages-config-to-package-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/migrate-packages-config-to-package-reference.md b/docs/reference/migrate-packages-config-to-package-reference.md index faaf1d130..1786d1e17 100644 --- a/docs/reference/migrate-packages-config-to-package-reference.md +++ b/docs/reference/migrate-packages-config-to-package-reference.md @@ -21,7 +21,7 @@ Visual Studio 2017 Version 15.7 and later supports migrating a project from the ### Limitations -* NuGet PackageReference is not available in Visual Studio 2015 and earlier. Migrated projects can be opened only in Visual Studio 2017. +* NuGet PackageReference is not available in Visual Studio 2015 and earlier. Migrated projects can be opened only in Visual Studio 2017 and above. * Migration is not currently available for C++ and ASP.NET projects. * Some packages may not be fully compatible with PackageReference. For more information, see [package compatibility issues](#package-compatibility-issues). From 623bd80de8bf8104762b1b77840bff7db20d23c2 Mon Sep 17 00:00:00 2001 From: Rob Relyea Date: Thu, 11 Jul 2019 07:40:42 -0700 Subject: [PATCH 0006/1475] release notes 5.2 --- docs/release-notes/NuGet-5.2-RTM.md | 62 +++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 docs/release-notes/NuGet-5.2-RTM.md diff --git a/docs/release-notes/NuGet-5.2-RTM.md b/docs/release-notes/NuGet-5.2-RTM.md new file mode 100644 index 000000000..d11dc2347 --- /dev/null +++ b/docs/release-notes/NuGet-5.2-RTM.md @@ -0,0 +1,62 @@ +#5.2 Release Notes + +[Full Changelog]() + +[Issues List](https://github.com/nuget/home/issues?q=is%3Aissue+is%3Aclosed+milestone%3A%225.2") + +**Bug:** + +* Plugin: NuGet waits full handshake timeout if plugin fails to launch or terminates early - [#8300](https://github.com/NuGet/Home/issues/8300) + +* Plugins: improve diagnosability of plugin launch failure - [#8271](https://github.com/NuGet/Home/issues/8271) + +* Issue with nuget.exe discovery of built in plugins - [#8269](https://github.com/NuGet/Home/issues/8269) + +* Package Manager Console: UI delay updating "Default project" combobox selected value - [#8235](https://github.com/NuGet/Home/issues/8235) + +* Plugins: cache file is never read - [#8210](https://github.com/NuGet/Home/issues/8210) + +* Plugins: "A task was canceled." errors with authentication plugin during restore - [#8198](https://github.com/NuGet/Home/issues/8198) + +* LockFile with ATF has false NU1004 due to a bad target framework equality check - [#8187](https://github.com/NuGet/Home/issues/8187) + +* Restore: installing a tampered signed package results in multiple failed install attempts (with repeated output) - [#8175](https://github.com/NuGet/Home/issues/8175) + +* VS: solution user options fail to deserialize after NuGet update - [#8166](https://github.com/NuGet/Home/issues/8166) + +* '--locked-mode' restore flag not respected if lock file is empty or malformed - [#8160](https://github.com/NuGet/Home/issues/8160) + +* Make the Settings reading in VS lazy - [#8156](https://github.com/NuGet/Home/issues/8156) + +* dotnet-list-package in a UnitTest project returns an error - [#8154](https://github.com/NuGet/Home/issues/8154) + +* Fix tests related to lowercase ids in packages lock file - [#8114](https://github.com/NuGet/Home/issues/8114) + +* Ensure all projects use the same version of Newtonsoft.Json - [#8108](https://github.com/NuGet/Home/issues/8108) + +* Performance improvements in the PM UI - [#8039](https://github.com/NuGet/Home/issues/8039) + +* Create NuGet package group for VS installer - fixing some VSIX setup problems - [#8033](https://github.com/NuGet/Home/issues/8033) + +* Plugins cache not discoverable intermittently on linux platforms - [#7845](https://github.com/NuGet/Home/issues/7845) + +* Make project reference lower case in lock file - [#7840](https://github.com/NuGet/Home/issues/7840) + +* GeneratePackageOnBuild should not set NoBuild. - [#7801](https://github.com/NuGet/Home/issues/7801) + +* The new option "-SymbolPackageFormat snupkg" generates an error when the .nuspec file contains an explicit assembly reference element - [#7638](https://github.com/NuGet/Home/issues/7638) + +* NuGet.targets(498,5): error : Could not find a part of the path '/tmp/NuGetScratch - [#7341](https://github.com/NuGet/Home/issues/7341) + +* UI Delay when reading Default Project in PMC - [#6824](https://github.com/NuGet/Home/issues/6824) + +* [vsfeedback] NuGet Update tab freezes for a local package source - [#6470](https://github.com/NuGet/Home/issues/6470) + +**DCR:** + +* Add an msbuild property that indicates that PackageDownload is supported - [#8106](https://github.com/NuGet/Home/issues/8106) + +* FrameworkReference suppress dependency flow via FrameworkReference.PrivateAssets - [#7988](https://github.com/NuGet/Home/issues/7988) + +* Mechanism for supplying runtime.json outside of a package - [#7351](https://github.com/NuGet/Home/issues/7351) + From f9aef96442525eae55453adda4f28203f0577bca Mon Sep 17 00:00:00 2001 From: Andy Zivkovic Date: Thu, 11 Jul 2019 10:16:39 -0700 Subject: [PATCH 0007/1475] Update NuGet-5.2-RTM.md --- docs/release-notes/NuGet-5.2-RTM.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-notes/NuGet-5.2-RTM.md b/docs/release-notes/NuGet-5.2-RTM.md index d11dc2347..9c74eacf6 100644 --- a/docs/release-notes/NuGet-5.2-RTM.md +++ b/docs/release-notes/NuGet-5.2-RTM.md @@ -30,7 +30,7 @@ * dotnet-list-package in a UnitTest project returns an error - [#8154](https://github.com/NuGet/Home/issues/8154) -* Fix tests related to lowercase ids in packages lock file - [#8114](https://github.com/NuGet/Home/issues/8114) +* Don't lowercase projects with custom assembly names in packages lock file - [#8114](https://github.com/NuGet/Home/issues/8114) * Ensure all projects use the same version of Newtonsoft.Json - [#8108](https://github.com/NuGet/Home/issues/8108) From 6d10283e1306f1f8290389036e0f89a8f6c38d2e Mon Sep 17 00:00:00 2001 From: Nikolche Kolev Date: Thu, 11 Jul 2019 13:05:14 -0700 Subject: [PATCH 0008/1475] Remove https://github.com/NuGet/Home/issues/8156 It got moved to 5.3 --- docs/release-notes/NuGet-5.2-RTM.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/release-notes/NuGet-5.2-RTM.md b/docs/release-notes/NuGet-5.2-RTM.md index 9c74eacf6..803346653 100644 --- a/docs/release-notes/NuGet-5.2-RTM.md +++ b/docs/release-notes/NuGet-5.2-RTM.md @@ -26,8 +26,6 @@ * '--locked-mode' restore flag not respected if lock file is empty or malformed - [#8160](https://github.com/NuGet/Home/issues/8160) -* Make the Settings reading in VS lazy - [#8156](https://github.com/NuGet/Home/issues/8156) - * dotnet-list-package in a UnitTest project returns an error - [#8154](https://github.com/NuGet/Home/issues/8154) * Don't lowercase projects with custom assembly names in packages lock file - [#8114](https://github.com/NuGet/Home/issues/8114) From c8bb141941e10e4b6808656f6e1a40d30d8b686b Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Mon, 15 Jul 2019 14:29:07 -0700 Subject: [PATCH 0009/1475] drafted --- docs/index.md | 416 ++++++++++++++++++++++---------------------------- 1 file changed, 184 insertions(+), 232 deletions(-) diff --git a/docs/index.md b/docs/index.md index 4221df4cc..ed04f3bf6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,240 +5,192 @@ author: karann-msft ms.author: karann ms.date: 02/12/2018 ms.topic: overview -layout: HubPage +layout: HubPage +ms.topic: hub-page hide_bc: true --- +
-
-

NuGet Documentation

- +
+
\ No newline at end of file From 8341b1476d44d7bb0de5832c7f3d6997c30f94f1 Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Mon, 15 Jul 2019 14:38:38 -0700 Subject: [PATCH 0010/1475] updates --- docs/index.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index ed04f3bf6..0f52a4624 100644 --- a/docs/index.md +++ b/docs/index.md @@ -49,6 +49,9 @@ hide_bc: true @@ -136,6 +142,9 @@ hide_bc: true

Create a package (nuget.exe CLI)

+

+ Support multiple target frameworks +

@@ -153,7 +162,10 @@ hide_bc: true From 2d234ddf4cc944e87a454a0eec9998daa9726690 Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Mon, 15 Jul 2019 14:49:58 -0700 Subject: [PATCH 0011/1475] icon updates --- docs/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/index.md b/docs/index.md index 0f52a4624..6c6cc2538 100644 --- a/docs/index.md +++ b/docs/index.md @@ -22,7 +22,7 @@ hide_bc: true
- Get started icon + NuGet logo
@@ -69,7 +69,7 @@ hide_bc: true
- Get started icon + Download and install icon
@@ -128,7 +128,7 @@ hide_bc: true
- Get started icon + Build icon
@@ -156,7 +156,7 @@ hide_bc: true
- Get started icon + Delivery icon
@@ -178,7 +178,7 @@ hide_bc: true
- Get started icon + NuGet logo
From ec1faae0430b6f2822702fcfb1d2feea6962280a Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Mon, 15 Jul 2019 14:55:13 -0700 Subject: [PATCH 0012/1475] updates --- docs/index.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/index.md b/docs/index.md index 6c6cc2538..d4c6bf066 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,7 +13,7 @@ hide_bc: true

NuGet Documentation

-

TBD TBD

+

NuGet allows developers to create, share, and consume useful code. With NuGet, you can bundle code into "packages" that contain compiled code, such as DLLs.

  • @@ -63,34 +63,25 @@ hide_bc: true
-
  • +
  • From 3b790b465cd56afc3432b3adc4bb5ece9cca74c3 Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Mon, 15 Jul 2019 15:02:59 -0700 Subject: [PATCH 0013/1475] minor updates --- docs/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/index.md b/docs/index.md index d4c6bf066..630b01bd9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,7 +13,7 @@ hide_bc: true

    NuGet Documentation

    -

    NuGet allows developers to create, share, and consume useful code. With NuGet, you can bundle code into "packages" that contain compiled code, such as DLLs.

    +

    NuGet allows developers to create, share, and consume useful .NET code. With NuGet, you can bundle code into "packages" that contain compiled code, such as DLLs.

    • @@ -26,7 +26,7 @@ hide_bc: true
    -

    Get started with NuGet

    +

    Introduction to NuGet

    What is NuGet?

    @@ -165,7 +165,7 @@ hide_bc: true Publish to NuGet.org

    - Publish to a private feed - Overview + Publish to a private feed

    From 64e73e206599937a72a9dd6605381d91cb0ed074 Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 16 Jul 2019 09:28:32 -0700 Subject: [PATCH 0014/1475] added Reference sub-section --- docs/index.md | 51 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/docs/index.md b/docs/index.md index 630b01bd9..1cc6629e4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -53,10 +53,10 @@ hide_bc: true Find and choose packages

    - Install and use a package (dotnet CLI) + Install and use a package - dotnet CLI

    - Install and use a package (Visual Studio) + Install and use a package - Visual Studio

  • @@ -75,13 +75,13 @@ hide_bc: true
    @@ -103,16 +103,16 @@ hide_bc: true Workflow (overview)

    - Manage packages (Visual Studio) + Manage packages - Visual Studio

    - Manage packages (dotnet CLI) + Manage packages - dotnet CLI

    - Manage packages (nuget.exe CLI) + Manage packages - nuget.exe CLI

    - Manage packages (Package Manager Console) + Manage packages - Package Manager Console

    Package references in project files @@ -184,7 +184,7 @@ hide_bc: true

    NuGet.org

    - Overview of NuGet.org + Overview

    Individual accounts @@ -203,6 +203,37 @@ hide_bc: true

    +
  • +
    +
    +
    +
    +
    + API icon +
    +
    +
    +

    Reference

    +

    + dotnet CLI +

    +

    + nuget.exe CLI +

    +

    + .nuspec +

    +

    + nuget.config +

    +

    + NuGet API +

    +
    +
    +
    +
    +
  • \ No newline at end of file From e1a34875a8724d8e71a59c919f6f0386e94ceb3a Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 16 Jul 2019 09:31:35 -0700 Subject: [PATCH 0015/1475] minor edit --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 1cc6629e4..8784d2da0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -137,10 +137,10 @@ hide_bc: true Workflow (overview)

    - Create a package (dotnet CLI) + Create a package - dotnet CLI

    - Create a package (nuget.exe CLI) + Create a package - nuget.exe CLI

    Support multiple target frameworks From 208b5c2ec3c5f86aa30c22aa8ce56dd239a85b1b Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 16 Jul 2019 09:33:59 -0700 Subject: [PATCH 0016/1475] link fixes --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 8784d2da0..7ee3821b1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -218,7 +218,7 @@ hide_bc: true dotnet CLI

    - nuget.exe CLI + nuget.exe CLI

    .nuspec @@ -227,7 +227,7 @@ hide_bc: true nuget.config

    - NuGet API + NuGet API

    From 673fc6c0471be8a3effbe938d8d032e0babb3c3c Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 16 Jul 2019 09:37:31 -0700 Subject: [PATCH 0017/1475] link fixes --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 7ee3821b1..059fda7fb 100644 --- a/docs/index.md +++ b/docs/index.md @@ -109,10 +109,10 @@ hide_bc: true Manage packages - dotnet CLI

    - Manage packages - nuget.exe CLI + Manage packages - nuget.exe CLI

    - Manage packages - Package Manager Console + Manage packages - Package Manager Console

    Package references in project files From a23b62086a16daf5f2f25d5364338be87bfa2cb6 Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 16 Jul 2019 09:49:53 -0700 Subject: [PATCH 0018/1475] icon update --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 059fda7fb..03fe8bfe8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -209,7 +209,7 @@ hide_bc: true

    - API icon + API icon
    From 016f66b6aeb88239b4cec8b5221f708ecbdda0d6 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Thu, 18 Jul 2019 19:28:01 +0200 Subject: [PATCH 0019/1475] (GH-1481) Clarify repository elemeent commit attribute * Adjust attribute formatting * Clarify commit SHA-1 hash * Add repository element example * fixes #1481 --- docs/reference/nuspec.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/reference/nuspec.md b/docs/reference/nuspec.md index 86bf19ed3..16d8467e5 100644 --- a/docs/reference/nuspec.md +++ b/docs/reference/nuspec.md @@ -166,7 +166,19 @@ A space-delimited list of tags and keywords that describe the package and aid di *(3.3+)* For internal NuGet use only. #### repository -Repository metadata, consisting of four optional attributes: *type* and *url* *(4.0+)*, and *branch* and *commit* *(4.6+)*. These attributes allow you to map the .nupkg to the repository that built it, with the potential to get as detailed as the individual branch or commit that built the package. This should be a publicly available url that can be invoked directly by a version control software. It should not be an html page as this is meant for the computer. For linking to project page, use the `projectUrl` field, instead. +Repository metadata, consisting of four optional attributes: `type` and `url` *(4.0+)*, and `branch` and `commit` *(4.6+)*. These attributes allow you to map the `.nupkg` to the repository that built it, with the potential to get as detailed as the individual branch name and / or commit SHA-1 hash that built the package. This should be a publicly available url that can be invoked directly by a version control software. It should not be an html page as this is meant for the computer. For linking to project page, use the `projectUrl` field, instead. + +For example: +```xml + + + + ... + + ... + + +``` #### minClientVersion Specifies the minimum version of the NuGet client that can install this package, enforced by nuget.exe and the Visual Studio Package Manager. This is used whenever the package depends on specific features of the `.nuspec` file that were added in a particular version of the NuGet client. For example, a package using the `developmentDependency` attribute should specify "2.8" for `minClientVersion`. Similarly, a package using the `contentFiles` element (see the next section) should set `minClientVersion` to "3.3". Note also that because NuGet clients prior to 2.5 do not recognize this flag, they *always* refuse to install the package no matter what `minClientVersion` contains. From cf9654614bf7b3df27e731c2d5c66f4374a6e99d Mon Sep 17 00:00:00 2001 From: Karan Nandwani Date: Fri, 19 Jul 2019 15:07:19 -0700 Subject: [PATCH 0020/1475] Update NuGet-5.2-RTM.md --- docs/release-notes/NuGet-5.2-RTM.md | 33 +++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/docs/release-notes/NuGet-5.2-RTM.md b/docs/release-notes/NuGet-5.2-RTM.md index 803346653..a54dc64ed 100644 --- a/docs/release-notes/NuGet-5.2-RTM.md +++ b/docs/release-notes/NuGet-5.2-RTM.md @@ -1,10 +1,32 @@ -#5.2 Release Notes +--- +title: NuGet 5.2 RTM Release Notes +description: Release notes for NuGet 5.2 including new features, bug fixes, and DCRs. +author: karann-msft +ms.author: karann +ms.date: 07/23/2019 +ms.topic: conceptual +--- -[Full Changelog]() +# NuGet 5.2 Release Notes -[Issues List](https://github.com/nuget/home/issues?q=is%3Aissue+is%3Aclosed+milestone%3A%225.2") +NuGet distribution vehicles: -**Bug:** +| NuGet version | Available in Visual Studio version| Available in .NET SDK(s)| +|:---|:---|:---| +| [**5.2.0**](https://nuget.org/downloads) | [Visual Studio 2019 version 16.1](https://visualstudio.microsoft.com/downloads/) | [2.1.70X](https://dotnet.microsoft.com/download/dotnet-core/2.1)1, [2.2.30X](https://dotnet.microsoft.com/download/dotnet-core/2.2)2 | + +1Installed with Visual Studio 2019 with .NET Core workload + +2Available as an optional install with Visual Studio 2019 with .NET Core workload + +## Summary: What's New in 5.2 + +**TODO** +* Support to skip a package push if it already exists to allow for better integration with CI/CD workflows - [#1630](https://github.com/NuGet/Home/issues/1630#issuecomment-483461100) + +### Issues fixed in this release + +**Bugs** * Plugin: NuGet waits full handshake timeout if plugin fails to launch or terminates early - [#8300](https://github.com/NuGet/Home/issues/8300) @@ -58,3 +80,6 @@ * Mechanism for supplying runtime.json outside of a package - [#7351](https://github.com/NuGet/Home/issues/7351) +**[List of all issues fixed in this release - 5.2 RTM](https://github.com/nuget/home/issues?q=is%3Aissue+is%3Aclosed+milestone%3A%225.2")** + + From dc6dac72c5dbd545199c9a8c8d729009226ef9fd Mon Sep 17 00:00:00 2001 From: Karan Nandwani Date: Fri, 19 Jul 2019 15:16:50 -0700 Subject: [PATCH 0021/1475] Apply suggestions from code review --- docs/release-notes/NuGet-5.2-RTM.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-notes/NuGet-5.2-RTM.md b/docs/release-notes/NuGet-5.2-RTM.md index a54dc64ed..67c7fcbba 100644 --- a/docs/release-notes/NuGet-5.2-RTM.md +++ b/docs/release-notes/NuGet-5.2-RTM.md @@ -13,7 +13,7 @@ NuGet distribution vehicles: | NuGet version | Available in Visual Studio version| Available in .NET SDK(s)| |:---|:---|:---| -| [**5.2.0**](https://nuget.org/downloads) | [Visual Studio 2019 version 16.1](https://visualstudio.microsoft.com/downloads/) | [2.1.70X](https://dotnet.microsoft.com/download/dotnet-core/2.1)1, [2.2.30X](https://dotnet.microsoft.com/download/dotnet-core/2.2)2 | +| [**5.2.0**](https://nuget.org/downloads) | [Visual Studio 2019 version 16.1](https://visualstudio.microsoft.com/downloads/) | [2.1.80X](https://dotnet.microsoft.com/download/dotnet-core/2.1)1, [2.2.40X](https://dotnet.microsoft.com/download/dotnet-core/2.2)2 | 1Installed with Visual Studio 2019 with .NET Core workload From 427edea07b69d87e784bdd7bf15b1c05bfcc6f5e Mon Sep 17 00:00:00 2001 From: Karan Nandwani Date: Fri, 19 Jul 2019 15:19:32 -0700 Subject: [PATCH 0022/1475] Update NuGet-5.2-RTM.md --- docs/release-notes/NuGet-5.2-RTM.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/NuGet-5.2-RTM.md b/docs/release-notes/NuGet-5.2-RTM.md index 67c7fcbba..57fda38fd 100644 --- a/docs/release-notes/NuGet-5.2-RTM.md +++ b/docs/release-notes/NuGet-5.2-RTM.md @@ -21,7 +21,9 @@ NuGet distribution vehicles: ## Summary: What's New in 5.2 -**TODO** +* Fixed occasional nuget operation failures caused by path issues on Linux & Ma + + * Support to skip a package push if it already exists to allow for better integration with CI/CD workflows - [#1630](https://github.com/NuGet/Home/issues/1630#issuecomment-483461100) ### Issues fixed in this release From 2b8b0114ae8cf7d242092de630c820cf30be44ac Mon Sep 17 00:00:00 2001 From: Karan Nandwani Date: Fri, 19 Jul 2019 15:50:24 -0700 Subject: [PATCH 0023/1475] Update NuGet-5.2-RTM.md --- docs/release-notes/NuGet-5.2-RTM.md | 45 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/docs/release-notes/NuGet-5.2-RTM.md b/docs/release-notes/NuGet-5.2-RTM.md index 57fda38fd..74d5dea15 100644 --- a/docs/release-notes/NuGet-5.2-RTM.md +++ b/docs/release-notes/NuGet-5.2-RTM.md @@ -13,7 +13,7 @@ NuGet distribution vehicles: | NuGet version | Available in Visual Studio version| Available in .NET SDK(s)| |:---|:---|:---| -| [**5.2.0**](https://nuget.org/downloads) | [Visual Studio 2019 version 16.1](https://visualstudio.microsoft.com/downloads/) | [2.1.80X](https://dotnet.microsoft.com/download/dotnet-core/2.1)1, [2.2.40X](https://dotnet.microsoft.com/download/dotnet-core/2.2)2 | +| [**5.2.0**](https://nuget.org/downloads) | [Visual Studio 2019 version 16.2](https://visualstudio.microsoft.com/downloads/) | [2.1.80X](https://dotnet.microsoft.com/download/dotnet-core/2.1)1, [2.2.40X](https://dotnet.microsoft.com/download/dotnet-core/2.2)2 | 1Installed with Visual Studio 2019 with .NET Core workload @@ -21,59 +21,58 @@ NuGet distribution vehicles: ## Summary: What's New in 5.2 -* Fixed occasional nuget operation failures caused by path issues on Linux & Ma +* Fixed a critical bug that caused occasional NuGet operation failures due to path issues on Linux & Mac - [#7341](https://github.com/NuGet/Home/issues/7341) +* Improved UI responsiveness when browsing packages using the NuGet package manager UI in Visual Studio especially noticeable for slow sources - [#8039](https://github.com/NuGet/Home/issues/8039) -* Support to skip a package push if it already exists to allow for better integration with CI/CD workflows - [#1630](https://github.com/NuGet/Home/issues/1630#issuecomment-483461100) +* Tons of reliability fixes for lock file ([#8187](https://github.com/NuGet/Home/issues/8187),[#8160](https://github.com/NuGet/Home/issues/8160),[#8114](https://github.com/NuGet/Home/issues/8114),[#7840](https://github.com/NuGet/Home/issues/7840)) and authentication plugin ([#8300](https://github.com/NuGet/Home/issues/8300),[#8271](https://github.com/NuGet/Home/issues/8271),[#8269](https://github.com/NuGet/Home/issues/8269),[#8210](https://github.com/NuGet/Home/issues/8210),[#8198](https://github.com/NuGet/Home/issues/8198),[#7845](https://github.com/NuGet/Home/issues/7845)) ### Issues fixed in this release **Bugs** -* Plugin: NuGet waits full handshake timeout if plugin fails to launch or terminates early - [#8300](https://github.com/NuGet/Home/issues/8300) +* Perf: Package Manager Console: UI delay updating "Default project" combobox selected value - [#8235](https://github.com/NuGet/Home/issues/8235) -* Plugins: improve diagnosability of plugin launch failure - [#8271](https://github.com/NuGet/Home/issues/8271) +* Perf: Performance improvements in the PM UI - [#8039](https://github.com/NuGet/Home/issues/8039) + +* Perf: UI Delay when reading Default Project in PMC - [#6824](https://github.com/NuGet/Home/issues/6824) + +* Perf: [vsfeedback] NuGet Update tab freezes for a local package source - [#6470](https://github.com/NuGet/Home/issues/6470) + +* Plugins: NuGet waits full handshake timeout if plugin fails to launch or terminates early - [#8300](https://github.com/NuGet/Home/issues/8300) -* Issue with nuget.exe discovery of built in plugins - [#8269](https://github.com/NuGet/Home/issues/8269) +* Plugins: improve diagnosability of plugin launch failure - [#8271](https://github.com/NuGet/Home/issues/8271) -* Package Manager Console: UI delay updating "Default project" combobox selected value - [#8235](https://github.com/NuGet/Home/issues/8235) +* Plugins: Issue with nuget.exe discovery of built in plugins - [#8269](https://github.com/NuGet/Home/issues/8269) * Plugins: cache file is never read - [#8210](https://github.com/NuGet/Home/issues/8210) * Plugins: "A task was canceled." errors with authentication plugin during restore - [#8198](https://github.com/NuGet/Home/issues/8198) -* LockFile with ATF has false NU1004 due to a bad target framework equality check - [#8187](https://github.com/NuGet/Home/issues/8187) +* Plugins cache not discoverable intermittently on linux platforms - [#7845](https://github.com/NuGet/Home/issues/7845) -* Restore: installing a tampered signed package results in multiple failed install attempts (with repeated output) - [#8175](https://github.com/NuGet/Home/issues/8175) +* LockFile: with ATF, it has false NU1004 due to a bad target framework equality check - [#8187](https://github.com/NuGet/Home/issues/8187) -* VS: solution user options fail to deserialize after NuGet update - [#8166](https://github.com/NuGet/Home/issues/8166) +* LockFile: '--locked-mode' restore flag not respected if lock file is empty or malformed - [#8160](https://github.com/NuGet/Home/issues/8160) -* '--locked-mode' restore flag not respected if lock file is empty or malformed - [#8160](https://github.com/NuGet/Home/issues/8160) +* LockFile: Don't lowercase projects with custom assembly names in packages lock file - [#8114](https://github.com/NuGet/Home/issues/8114) -* dotnet-list-package in a UnitTest project returns an error - [#8154](https://github.com/NuGet/Home/issues/8154) +* LockFile: Make project reference lower case in lock file - [#7840](https://github.com/NuGet/Home/issues/7840) -* Don't lowercase projects with custom assembly names in packages lock file - [#8114](https://github.com/NuGet/Home/issues/8114) +* Restore: installing a tampered signed package results in multiple failed install attempts (with repeated output) - [#8175](https://github.com/NuGet/Home/issues/8175) -* Ensure all projects use the same version of Newtonsoft.Json - [#8108](https://github.com/NuGet/Home/issues/8108) +* VS: solution user options fail to deserialize after NuGet update - [#8166](https://github.com/NuGet/Home/issues/8166) -* Performance improvements in the PM UI - [#8039](https://github.com/NuGet/Home/issues/8039) +* dotnet-list-package in a UnitTest project returns an error - [#8154](https://github.com/NuGet/Home/issues/8154) * Create NuGet package group for VS installer - fixing some VSIX setup problems - [#8033](https://github.com/NuGet/Home/issues/8033) -* Plugins cache not discoverable intermittently on linux platforms - [#7845](https://github.com/NuGet/Home/issues/7845) - -* Make project reference lower case in lock file - [#7840](https://github.com/NuGet/Home/issues/7840) - * GeneratePackageOnBuild should not set NoBuild. - [#7801](https://github.com/NuGet/Home/issues/7801) * The new option "-SymbolPackageFormat snupkg" generates an error when the .nuspec file contains an explicit assembly reference element - [#7638](https://github.com/NuGet/Home/issues/7638) * NuGet.targets(498,5): error : Could not find a part of the path '/tmp/NuGetScratch - [#7341](https://github.com/NuGet/Home/issues/7341) -* UI Delay when reading Default Project in PMC - [#6824](https://github.com/NuGet/Home/issues/6824) - -* [vsfeedback] NuGet Update tab freezes for a local package source - [#6470](https://github.com/NuGet/Home/issues/6470) - **DCR:** * Add an msbuild property that indicates that PackageDownload is supported - [#8106](https://github.com/NuGet/Home/issues/8106) From 5051d009dcd119794d63bffca11a2cfa5261afe7 Mon Sep 17 00:00:00 2001 From: Damon Tivel Date: Mon, 22 Jul 2019 09:41:49 -0700 Subject: [PATCH 0024/1475] Add tip --- docs/reference/errors-and-warnings/NU3000.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/reference/errors-and-warnings/NU3000.md b/docs/reference/errors-and-warnings/NU3000.md index bf2d00f9b..42c8b213e 100644 --- a/docs/reference/errors-and-warnings/NU3000.md +++ b/docs/reference/errors-and-warnings/NU3000.md @@ -12,6 +12,9 @@ f1_keywords: # NuGet Warning NU3000 +> [!Tip] +> Use the [verify](../reference/cli-reference/cli-ref-verify.md) command to view package signatures and timestamps. + ## Scenario 1
    Package 'SamplePackage v1.0.0' from source 'https://contoso.com/index.json': The primary signature does not have a timestamp.
    @@ -38,7 +41,7 @@ The package has a signature with multiple timestamps. ### Solution -Please ensure that a package signature contains upto 1 timestamp. +Please ensure that each package signature contains no more than 1 timestamp. From 44cb4cd9e5471994fc23ceca1cef72ec4d292e21 Mon Sep 17 00:00:00 2001 From: Damon Tivel Date: Mon, 22 Jul 2019 09:52:46 -0700 Subject: [PATCH 0025/1475] Fix link --- docs/reference/errors-and-warnings/NU3000.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/errors-and-warnings/NU3000.md b/docs/reference/errors-and-warnings/NU3000.md index 42c8b213e..d3c68799e 100644 --- a/docs/reference/errors-and-warnings/NU3000.md +++ b/docs/reference/errors-and-warnings/NU3000.md @@ -13,7 +13,7 @@ f1_keywords: # NuGet Warning NU3000 > [!Tip] -> Use the [verify](../reference/cli-reference/cli-ref-verify.md) command to view package signatures and timestamps. +> Use the [verify](../cli-reference/cli-ref-verify.md) command to view package signatures and timestamps. ## Scenario 1 From 1ad342712e5a18024d9770c7532a69dd0118621c Mon Sep 17 00:00:00 2001 From: Jan Klass <8045680+ite-klass@users.noreply.github.com> Date: Tue, 23 Jul 2019 10:15:56 +0200 Subject: [PATCH 0026/1475] Mention support for later VS versions than VS 2017 --- docs/reference/migrate-packages-config-to-package-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/migrate-packages-config-to-package-reference.md b/docs/reference/migrate-packages-config-to-package-reference.md index bba29553d..99382aaab 100644 --- a/docs/reference/migrate-packages-config-to-package-reference.md +++ b/docs/reference/migrate-packages-config-to-package-reference.md @@ -21,7 +21,7 @@ Visual Studio 2017 Version 15.7 and later supports migrating a project from the ### Limitations -* NuGet PackageReference is not available in Visual Studio 2015 and earlier. Migrated projects can be opened only in Visual Studio 2017. +* NuGet PackageReference is not available in Visual Studio 2015 and earlier. Migrated projects can be opened only in Visual Studio 2017 and later versions. * Migration is not currently available for C++ and ASP.NET projects. * Some packages may not be fully compatible with PackageReference. For more information, see [package compatibility issues](#package-compatibility-issues). From 44992e27a008cb939244b10b4d764918a04a3f46 Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 23 Jul 2019 08:20:29 -0700 Subject: [PATCH 0027/1475] fixed #1551 --- docs/create-packages/Prerelease-Packages.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/create-packages/Prerelease-Packages.md b/docs/create-packages/Prerelease-Packages.md index 2434bc05a..ce1ba7a35 100644 --- a/docs/create-packages/Prerelease-Packages.md +++ b/docs/create-packages/Prerelease-Packages.md @@ -76,10 +76,10 @@ Whatever suffixes you use, however, NuGet will give them precedence in reverse a 1.0.1-zzz 1.0.1-rc 1.0.1-open - 1.0.1-beta12 - 1.0.1-beta05 + 1.0.1-beta.12 + 1.0.1-beta.05 1.0.1-beta - 1.0.1-alpha2 + 1.0.1-alpha.2 1.0.1-alpha -As shown, the version without any suffix will always take precedence over pre-release versions. Note also that if you use numerical suffixes with pre-release tags that might use double-digit numbers (or more), use leading zeroes as in beta01 and beta05 to ensure that they sort correctly when the numbers get larger. +As shown, the version without any suffix will always take precedence over pre-release versions. Note also that if you use numerical suffixes with pre-release tags that might use double-digit numbers (or more), use leading zeroes as in beta.01 and beta.05 to ensure that they sort correctly when the numbers get larger. From 85005ddb83f0cb04db385904dc9aa78a8e651d3f Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 23 Jul 2019 08:33:35 -0700 Subject: [PATCH 0028/1475] minor fixes --- docs/consume-packages/install-use-packages-visual-studio.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/consume-packages/install-use-packages-visual-studio.md b/docs/consume-packages/install-use-packages-visual-studio.md index cb158e099..d0e870fb1 100644 --- a/docs/consume-packages/install-use-packages-visual-studio.md +++ b/docs/consume-packages/install-use-packages-visual-studio.md @@ -12,7 +12,7 @@ f1_keywords: - "vs.nuget.packagemanager.ui" --- -# Install and manage packages in Visual Studio +# Install and manage packages in Visual Studio using the NuGet Package Manager The NuGet Package Manager UI in Visual Studio on Windows allows you to easily install, uninstall, and update NuGet packages in projects and solutions. For the experience in Visual Studio for Mac, see [Including a NuGet package in your project](/visualstudio/mac/nuget-walkthrough?toc=/nuget/toc.json). The Package Manager UI is not included with Visual Studio Code. From 637f8fcc25f540c0e43a16a4a1b764936c249cf3 Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 23 Jul 2019 09:19:45 -0700 Subject: [PATCH 0029/1475] link update --- docs/reference/msbuild-targets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/msbuild-targets.md b/docs/reference/msbuild-targets.md index 6f5688bc6..1ef9b6b62 100644 --- a/docs/reference/msbuild-targets.md +++ b/docs/reference/msbuild-targets.md @@ -11,7 +11,7 @@ ms.topic: conceptual *NuGet 4.0+* -With the PackageReference format, NuGet 4.0+ can store all manifest metadata directly within a project file rather than using a separate `.nuspec` file. +With the [PackageReference](../consume-packages/package-references-in-project-files.md) format, NuGet 4.0+ can store all manifest metadata directly within a project file rather than using a separate `.nuspec` file. With MSBuild 15.1+, NuGet is also a first-class MSBuild citizen with the `pack` and `restore` targets as described below. These targets allow you to work with NuGet as you would with any other MSBuild task or target. (For NuGet 3.x and earlier, you use the [pack](../reference/cli-reference/cli-ref-pack.md) and [restore](../reference/cli-reference/cli-ref-restore.md) commands through the NuGet CLI instead.) From 4d76875fea018549e33ef7e921deab6e1dcd0e67 Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 23 Jul 2019 09:48:56 -0700 Subject: [PATCH 0030/1475] link updates --- .../managing-the-global-packages-and-cache-folders.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/consume-packages/managing-the-global-packages-and-cache-folders.md b/docs/consume-packages/managing-the-global-packages-and-cache-folders.md index 0fba9e3b3..d2660fae7 100644 --- a/docs/consume-packages/managing-the-global-packages-and-cache-folders.md +++ b/docs/consume-packages/managing-the-global-packages-and-cache-folders.md @@ -13,7 +13,7 @@ Whenever you install, update, or restore a package, NuGet manages packages and p | Name | Description and Location (per user)| | --- | --- | -| global‑packages | The *global-packages* folder is where NuGet installs any downloaded package. Each package is fully expanded into a subfolder that matches the package identifier and version number. Projects using the PackageReference format always use packages directly from this folder. When using the `packages.config`, packages are installed to the *global-packages* folder, then copied into the project's `packages` folder.
    • Windows: `%userprofile%\.nuget\packages`
    • Mac/Linux: `~/.nuget/packages`
    • Override using the NUGET_PACKAGES environment variable, the `globalPackagesFolder` or `repositoryPath` [configuration settings](../reference/nuget-config-file.md#config-section) (when using PackageReference and `packages.config`, respectively), or the `RestorePackagesPath` MSBuild property (MSBuild only). The environment variable takes precedence over the configuration setting.
    | +| global‑packages | The *global-packages* folder is where NuGet installs any downloaded package. Each package is fully expanded into a subfolder that matches the package identifier and version number. Projects using the [PackageReference](package-references-in-project-files.md) format always use packages directly from this folder. When using the [packages.config](../reference/packages-config.md), packages are installed to the *global-packages* folder, then copied into the project's `packages` folder.
    • Windows: `%userprofile%\.nuget\packages`
    • Mac/Linux: `~/.nuget/packages`
    • Override using the NUGET_PACKAGES environment variable, the `globalPackagesFolder` or `repositoryPath` [configuration settings](../reference/nuget-config-file.md#config-section) (when using PackageReference and `packages.config`, respectively), or the `RestorePackagesPath` MSBuild property (MSBuild only). The environment variable takes precedence over the configuration setting.
    | | http‑cache | The Visual Studio Package Manager (NuGet 3.x+) and the `dotnet` tool store copies of downloaded packages in this cache (saved as `.dat` files), organized into subfolders for each package source. Packages are not expanded, and the cache has an expiration time of 30 minutes.
    • Windows: `%localappdata%\NuGet\v3-cache`
    • Mac/Linux: `~/.local/share/NuGet/v3-cache`
    • Override using the NUGET_HTTP_CACHE_PATH environment variable.
    | | temp | A folder where NuGet stores temporary files during its various operations.
  • Windows: `%temp%\NuGetScratch`
  • Mac/Linux: `/tmp/NuGetScratch`
  • | | plugins-cache **4.8+** | A folder where NuGet stores the results from the operation claims request.
    • Windows: `%localappdata%\NuGet\plugins-cache`
    • Mac/Linux: `~/.local/share/NuGet/plugins-cache`
    • Override using the NUGET_PLUGINS_CACHE_PATH environment variable.
    | From 50053e93db21b8fd59ecc727db6dbaa406a3823f Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 23 Jul 2019 11:13:00 -0700 Subject: [PATCH 0031/1475] link update --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 03fe8bfe8..e9d0cf7c4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -143,7 +143,7 @@ hide_bc: true Create a package - nuget.exe CLI

    - Support multiple target frameworks + Support multiple target frameworks

    From b99880c5e46de58d0feb3a681f72afba28c93aaf Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 23 Jul 2019 11:54:26 -0700 Subject: [PATCH 0032/1475] incorporated feedback --- docs/create-packages/Prerelease-Packages.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/create-packages/Prerelease-Packages.md b/docs/create-packages/Prerelease-Packages.md index ce1ba7a35..b282672c7 100644 --- a/docs/create-packages/Prerelease-Packages.md +++ b/docs/create-packages/Prerelease-Packages.md @@ -77,9 +77,11 @@ Whatever suffixes you use, however, NuGet will give them precedence in reverse a 1.0.1-rc 1.0.1-open 1.0.1-beta.12 - 1.0.1-beta.05 + 1.0.1-beta.5 1.0.1-beta 1.0.1-alpha.2 1.0.1-alpha -As shown, the version without any suffix will always take precedence over pre-release versions. Note also that if you use numerical suffixes with pre-release tags that might use double-digit numbers (or more), use leading zeroes as in beta.01 and beta.05 to ensure that they sort correctly when the numbers get larger. +As shown, the version without any suffix will always take precedence over pre-release versions. + +Leading 0s are not needed with semver2, but they are with the old version schema. If you use numerical suffixes with pre-release tags that might use double-digit numbers (or more), use leading zeroes as in beta.01 and beta.05 to ensure that they sort correctly when the numbers get larger. This recommendation only applies to the old version schema. From bc51a26e3a4cc1ae0e5343efa0c8f97bf6fe80dc Mon Sep 17 00:00:00 2001 From: Anand Gaurav Date: Tue, 23 Jul 2019 13:26:27 -0700 Subject: [PATCH 0033/1475] Update Dependency-Resolution.md --- docs/consume-packages/Dependency-Resolution.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/consume-packages/Dependency-Resolution.md b/docs/consume-packages/Dependency-Resolution.md index 90a0d5282..aedfe9d6d 100644 --- a/docs/consume-packages/Dependency-Resolution.md +++ b/docs/consume-packages/Dependency-Resolution.md @@ -19,11 +19,11 @@ When multiple packages have the same dependency, then the same package ID can ap When installing packages into projects using the PackageReference format, NuGet adds references to a flat package graph in the appropriate file and resolves conflicts ahead of time. This process is referred to as *transitive restore*. Reinstalling or restoring packages is then a process of downloading the packages listed in the graph, resulting in faster and more predictable builds. You can also take advantage of wildcard (floating) versions, such as 2.8.\*, avoiding expensive and error prone calls to `nuget update` on the client machines and build servers. -When the NuGet restore process runs prior to a build, it resolves dependencies first in memory, then writes the resulting graph to a file called `project.assets.json`. +When the NuGet restore process runs prior to a build, it resolves dependencies first in memory, then writes the resulting graph to a file called `project.assets.json`. It also writes the resolved dependencies to a lock file named `packages.lock.json`, if the [lock file functionality is enabled](https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#locking-dependencies). The assets file is located at `MSBuildProjectExtensionsPath`, which defaults to the project's 'obj' folder. MSBuild then reads this file and translates it into a set of folders where potential references can be found, and then adds them to the project tree in memory. -The lock file is temporary and should not be added to source control. It's listed by default in both `.gitignore` and `.tfignore`. See [Packages and source control](packages-and-source-control.md). +The `project.assets.json` file is temporary and should not be added to source control. It's listed by default in both `.gitignore` and `.tfignore`. See [Packages and source control](packages-and-source-control.md). ### Dependency resolution rules From 9b5d5fe431526b48c4874a3dc3bb1c246b8f2bf0 Mon Sep 17 00:00:00 2001 From: Mike Jones Date: Tue, 23 Jul 2019 13:31:27 -0700 Subject: [PATCH 0034/1475] Update docs/index.md Co-Authored-By: Karan Nandwani --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index e9d0cf7c4..e986de85c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,7 +13,7 @@ hide_bc: true

    NuGet Documentation

    -

    NuGet allows developers to create, share, and consume useful .NET code. With NuGet, you can bundle code into "packages" that contain compiled code, such as DLLs.

    +

    NuGet is the package manager for .NET. It enables developers to create, share, and consume useful .NET libraries. NuGet client tools provide the ability to produce and consume these libraries as "packages".

    • @@ -236,4 +236,4 @@ hide_bc: true
    -
    \ No newline at end of file +
    From b44eb11bf3b399173a71e7c31ea7438940286ae7 Mon Sep 17 00:00:00 2001 From: Karan Nandwani Date: Tue, 23 Jul 2019 13:35:25 -0700 Subject: [PATCH 0035/1475] clarify NuGet server api --- docs/api/overview.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/overview.md b/docs/api/overview.md index 199b32ba3..7201f6431 100644 --- a/docs/api/overview.md +++ b/docs/api/overview.md @@ -1,6 +1,6 @@ --- -title: Overview of the NuGet API -description: The NuGet API is a set of HTTP endpoints that can be used to download packages, fetch metadata, publish new packages, etc. +title: Overview of the NuGet Server API +description: The NuGet Server API is a set of HTTP endpoints that can be used to download packages, fetch metadata, publish new packages, etc. author: joelverhagen ms.author: jver ms.date: 10/26/2017 @@ -8,9 +8,9 @@ ms.topic: reference ms.reviewer: kraigb --- -# NuGet API +# NuGet Server API -The NuGet API is a set of HTTP endpoints that can be used to download packages, fetch metadata, publish new packages, +The NuGet Server API is a set of HTTP endpoints that can be used to download packages, fetch metadata, publish new packages, and perform most other operations available in the official NuGet clients. This API is used by the NuGet client in Visual Studio, nuget.exe, and the .NET CLI to perform NuGet operations such as From 021662c26d10b6131c9c87c9ee8afb72c63a3746 Mon Sep 17 00:00:00 2001 From: Karan Nandwani Date: Tue, 23 Jul 2019 13:37:34 -0700 Subject: [PATCH 0036/1475] Update TOC.md --- docs/TOC.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/TOC.md b/docs/TOC.md index 05f860e63..53fbeb0a7 100644 --- a/docs/TOC.md +++ b/docs/TOC.md @@ -103,7 +103,7 @@ ### [Sync-Package](reference/ps-reference/ps-ref-sync-package.md) ### [Uninstall-Package](reference/ps-reference/ps-ref-uninstall-package.md) ### [Update-Package](reference/ps-reference/ps-ref-update-package.md) -## NuGet API +## NuGet Server API ### [Overview](api/overview.md) ### Resources #### [Autocomplete](api/search-autocomplete-service-resource.md) From 5d08e7abc03c69b959a9e706fa523bd22d98254f Mon Sep 17 00:00:00 2001 From: Karan Nandwani Date: Tue, 23 Jul 2019 14:03:15 -0700 Subject: [PATCH 0037/1475] Update migrate-packages-config-to-package-reference.md --- docs/reference/migrate-packages-config-to-package-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/migrate-packages-config-to-package-reference.md b/docs/reference/migrate-packages-config-to-package-reference.md index 99382aaab..bab6f4a5b 100644 --- a/docs/reference/migrate-packages-config-to-package-reference.md +++ b/docs/reference/migrate-packages-config-to-package-reference.md @@ -21,7 +21,7 @@ Visual Studio 2017 Version 15.7 and later supports migrating a project from the ### Limitations -* NuGet PackageReference is not available in Visual Studio 2015 and earlier. Migrated projects can be opened only in Visual Studio 2017 and later versions. +* NuGet PackageReference is not available in Visual Studio 2015 and earlier. Migrated projects can be opened only in Visual Studio 2017 and later. * Migration is not currently available for C++ and ASP.NET projects. * Some packages may not be fully compatible with PackageReference. For more information, see [package compatibility issues](#package-compatibility-issues). From 49fc714b1acbd951f9b91e8257aa6b95524f10c2 Mon Sep 17 00:00:00 2001 From: Karan Nandwani Date: Tue, 23 Jul 2019 14:10:03 -0700 Subject: [PATCH 0038/1475] Update cli-ref-config.md resolves https://github.com/NuGet/docs.microsoft.com-nuget/pull/1322 --- docs/reference/cli-reference/cli-ref-config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/cli-reference/cli-ref-config.md b/docs/reference/cli-reference/cli-ref-config.md index 640287c75..627bff590 100644 --- a/docs/reference/cli-reference/cli-ref-config.md +++ b/docs/reference/cli-reference/cli-ref-config.md @@ -31,7 +31,7 @@ In NuGet 3.4+, `` can use [environment variables](cli-ref-environment-var | Option | Description | | --- | --- | | AsPath | Returns the config value as a path, ignored when `-Set` is used. | -| ConfigFile | The NuGet configuration file to modify. If not specified, `%AppData%\NuGet\NuGet.Config` (Windows) or `~/.nuget/NuGet/NuGet.Config` (Mac/Linux) is used.| +| ConfigFile | The NuGet configuration file to modify. If not specified, the default file is used -`%AppData%\NuGet\NuGet.Config` (Windows) or `~/.config/NuGet/NuGet.Config` (Mac/Linux) or `~/.nuget/NuGet/NuGet.Config` (varies by OS distribution).| | ForceEnglishOutput | *(3.5+)* Forces nuget.exe to run using an invariant, English-based culture. | | Help | Displays help information for the command. | | NonInteractive | Suppresses prompts for user input or confirmations. | From c0da7c95c7942a5f68325af6373a344970bf0163 Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 23 Jul 2019 17:23:52 -0700 Subject: [PATCH 0039/1475] incorporated feedback --- docs/index.md | 71 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 28 deletions(-) diff --git a/docs/index.md b/docs/index.md index e986de85c..2f28a67bb 100644 --- a/docs/index.md +++ b/docs/index.md @@ -26,7 +26,7 @@ hide_bc: true
    -

    Introduction to NuGet

    +

    Introduction to NuGet

    What is NuGet?

    @@ -48,7 +48,7 @@ hide_bc: true
    -

    Get started - Consume packages

    +

    Get started

    Find and choose packages

    @@ -58,22 +58,6 @@ hide_bc: true

    Install and use a package - Visual Studio

    -
    - - - - -
  • -
    -
    -
    -
    -
    - Get started icon -
    -
    -
    -

    Get started - Create packages

    Create a package - dotnet CLI

    @@ -88,7 +72,7 @@ hide_bc: true
  • -
  • +
  • -

    Create packages

    +

    Create packages

    Workflow (overview)

    @@ -160,7 +144,7 @@ hide_bc: true
    -

    Publish packages

    +

    Publish packages

    Publish to NuGet.org

    @@ -182,7 +166,7 @@ hide_bc: true
    -

    NuGet.org

    +

    NuGet.org

    Overview

    @@ -213,7 +197,7 @@ hide_bc: true
    -

    Reference

    +

    Reference

    dotnet CLI

    @@ -234,6 +218,37 @@ hide_bc: true
  • +
  • +
    +
    +
    +
    +
    + Multi-connect icon +
    +
    +
    +

    Resources

    +

    + Policies - NuGet +

    +

    + Policies - NuGet.org +

    +

    + Release notes +

    +

    + FAQ - NuGet +

    +

    + FAQ - NuGet.org +

    +
    +
    +
    +
    +
  • From ea8e768de0730f8ba4e71c3d652d79695991c885 Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 23 Jul 2019 17:35:29 -0700 Subject: [PATCH 0040/1475] incorporated feedback --- docs/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/index.md b/docs/index.md index 2f28a67bb..c26e06b8f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -48,7 +48,7 @@ hide_bc: true @@ -203,6 +200,9 @@ hide_bc: true

    nuget.exe CLI +

    + Package references +

    .nuspec @@ -228,7 +228,7 @@ hide_bc: true

    -

    Resources

    +

    Resource

    Policies - NuGet

    From 21e14e6d8615be25cfbe28c1e5a4e160fdecdaaf Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 23 Jul 2019 17:38:31 -0700 Subject: [PATCH 0041/1475] link fix --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index c26e06b8f..7738f3acf 100644 --- a/docs/index.md +++ b/docs/index.md @@ -233,7 +233,7 @@ hide_bc: true Policies - NuGet

    - Policies - NuGet.org + Policies - NuGet.org

    Release notes From 3b0872854ceba28237ef6743b483b24532637c65 Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 23 Jul 2019 17:41:42 -0700 Subject: [PATCH 0042/1475] typo fix --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 7738f3acf..cc4bc5c12 100644 --- a/docs/index.md +++ b/docs/index.md @@ -228,7 +228,7 @@ hide_bc: true

    -

    Resource

    +

    Resources

    Policies - NuGet

    From 6f240d5363eab6d34a3befb67c0e384986abd1ce Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Tue, 23 Jul 2019 17:46:18 -0700 Subject: [PATCH 0043/1475] rearranging a few links --- docs/index.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/index.md b/docs/index.md index cc4bc5c12..ace41f23f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -49,9 +49,6 @@ hide_bc: true
    From 20718327bff3f4d8cc043bf3631aa42dde2b6ed6 Mon Sep 17 00:00:00 2001 From: Karan Nandwani Date: Tue, 23 Jul 2019 20:32:56 -0700 Subject: [PATCH 0044/1475] Apply suggestions from code review --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index ace41f23f..5dca3017c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -236,7 +236,7 @@ hide_bc: true Policies - NuGet.org

    - Release notes + Release notes

    FAQ - NuGet From d6033a860d7a59cd4c64c61aab7fecbdc7320b47 Mon Sep 17 00:00:00 2001 From: "Mike Jones (DEVUE)" Date: Wed, 24 Jul 2019 10:30:02 -0700 Subject: [PATCH 0045/1475] refresh --- ...tall-and-use-a-package-in-visual-studio.md | 44 +++++++++++------- .../media/QS_Use-02-ManageNuGetPackages.png | Bin 12008 -> 37199 bytes .../media/QS_Use-03-NewtonsoftJson.png | Bin 29581 -> 86838 bytes docs/quickstart/media/QS_Use-06-AppStart.png | Bin 3332 -> 13841 bytes docs/quickstart/media/QS_Use-07-AppEnd.png | Bin 4734 -> 21519 bytes docs/quickstart/media/QS_Use-08-Console1.png | Bin 16069 -> 39664 bytes 6 files changed, 26 insertions(+), 18 deletions(-) diff --git a/docs/quickstart/install-and-use-a-package-in-visual-studio.md b/docs/quickstart/install-and-use-a-package-in-visual-studio.md index 74b9eb836..645be25c1 100644 --- a/docs/quickstart/install-and-use-a-package-in-visual-studio.md +++ b/docs/quickstart/install-and-use-a-package-in-visual-studio.md @@ -3,25 +3,24 @@ title: Install and use a NuGet package in Visual Studio description: A walkthrough tutorial on the process of installing and using a NuGet package in a Visual Studio project. author: karann-msft ms.author: karann -ms.date: 01/23/2018 +ms.date: 07/24/2018 ms.topic: quickstart --- -# Quickstart: Install and use a package in Visual Studio +# Quickstart: Install and use a package in Visual Studio (Windows only) -NuGet packages contain reusable code that other developers make available to you for use in your projects. See [What is NuGet?](../What-is-NuGet.md) for background. Packages are installed into a Visual Studio project using the Package Manager UI or the Package Manager Console. This article demonstrates the process using the popular [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) package and a Universal Windows Platform (UWP) project. The same process applies to any other .NET or .NET Core project. +NuGet packages contain reusable code that other developers make available to you for use in your projects. See [What is NuGet?](../What-is-NuGet.md) for background. Packages are installed into a Visual Studio project using the NuGet Package Manager or the Package Manager Console. This article demonstrates the process using the popular [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) package and a Windows Presentation Foundation (WPF) project. The same process applies to any other .NET or .NET Core project. Once installed, refer to the package in code with `using ` where \ is specific to the package you're using. Once the reference is made, you can call the package through its API. > [!Tip] -> **Start with nuget.org**: Browsing nuget.org is how .NET developers typically find components they can reuse in their own applications. You can search nuget.org directly or find and install packages within Visual Studio as shown in this article. +> **Start with nuget.org**: Browsing *nuget.org* is how .NET developers typically find components they can reuse in their own applications. You can search *nuget.org* directly or find and install packages within Visual Studio as shown in this article. ## Prerequisites -- Visual Studio 2017 with the Universal Windows Platform development workload, or -- Visual Studio 2015 Update 3 with Tools for Universal Windows Apps. +- Visual Studio 2019 with the .NET Desktop Development workload. -You can install the 2017 Community edition for free from [visualstudio.com](https://www.visualstudio.com/) or use the Professional or Enterprise editions. +You can install the 2019 Community edition for free from [visualstudio.com](https://www.visualstudio.com/) or use the Professional or Enterprise editions. If you're using Visual Studio for Mac, see [Include a NuGet package in your project](/visualstudio/mac/nuget-walkthrough). @@ -29,13 +28,15 @@ If you're using Visual Studio for Mac, see [Include a NuGet package in your proj NuGet packages can be installed into any .NET project, provided that the package supports the same target framework as the project. -For this walkthrough, use a simple Universal Windows (UWP) app. Create a project in Visual Studio using **File > New Project...** and selecting the **Windows Universal > Blank App (Universal Windows)**. Accept the default values for Target Version and Minimum Version when prompted. +For this walkthrough, use a simple WPF app. Create a project in Visual Studio using **File > New Project...**, typing **.NET** in the search box, and then selecting the **WPF App (.NET Framework)**. Click **Next**. Accept the default values for **Framework** when prompted. + +Visual Studio creates the project, which opens in Solution Explorer. ## Add the Newtonsoft.Json NuGet package -To install the package, you can use either the Package Manager UI or the Package Manager Console. When you install a package, NuGet records the dependency in either your project file or a `packages.config` file. For more information, see [Package consumption overview and workflow](../consume-packages/Overview-and-Workflow.md). +To install the package, you can use either the NuGet Package Manager or the Package Manager Console. When you install a package, NuGet records the dependency in either your project file or a `packages.config` file (depending on the project format). For more information, see [Package consumption overview and workflow](../consume-packages/Overview-and-Workflow.md). -### Package Manager UI +### NuGet Package Manager 1. In Solution Explorer, right-click **References** and choose **Manage NuGet Packages**. @@ -45,9 +46,11 @@ To install the package, you can use either the Package Manager UI or the Package ![Locating Newtonsoft.Json package](media/QS_Use-03-NewtonsoftJson.png) + If you want more information on the NuGet Package Manager, see [Install and manage packages using Visual Studio](../consume-packages/install-use-packages-visual-studio.md). + 1. Accept any license prompts. -1. (Visual Studio 2017) If prompted to select a package management format, select **PackageReference in project file**: +1. (Visual Studio 2017 only) If prompted to select a package management format, select **PackageReference in project file**: ![Selecting a package management format](media/QS_Use-03b-SelectFormat.png) @@ -63,22 +66,24 @@ To install the package, you can use either the Package Manager UI or the Package 1. Enter the command `Install-Package Newtonsoft.Json` (see [Install-Package](../reference/ps-reference/ps-ref-install-package.md)). The console window shows output for the command. Errors typically indicate that the package isn't compatible with the project's target framework. + If you want more information on the Package Manager Console, see [Install and manage packages using Package Manager Console](../consume-packages/install-use-packages-powershell.md). + ## Use the Newtonsoft.Json API in the app With the Newtonsoft.Json package in the project, you can call its `JsonConvert.SerializeObject` method to convert an object to a human-readable string. -1. Open `MainPage.xaml` and replace the existing `Grid` element with the following: +1. Open `MainWindow.xaml` and replace the existing `Grid` element with the following: ```xaml - + -