Skip to content

Commit bc853e0

Browse files
author
Kraig Brockschmidt
committed
Misc code formatting and other corrections
1 parent f7b78b3 commit bc853e0

File tree

9 files changed

+63
-57
lines changed

9 files changed

+63
-57
lines changed

docs/Consume-Packages/Reinstalling-and-Updating-Packages.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,17 @@ There are a number of situations, described below under [When to Reinstall a Pac
3434

3535
Being mindful of the [Considerations](#considerations) described later, you can easily reinstall any package using the following command in the Visual Studio Package Manager Console (**Tools** > **NuGet Package Manager** > **Package Manager Console**):
3636

37+
```ps
3738
Update-Package –reinstall <package_name>
39+
```
3840

3941
Using this command is much easier than removing a package and then trying to locate the same package in the NuGet gallery with the same version.
4042

4143
The same command without `-reinstall` will update a package to a newer version, if applicable:
4244

45+
```ps
4346
Update-Package <package_name>
47+
```
4448

4549
Any updates are subject to version constraints indicated in `packages.config`, as described below in [Constraining upgrade versions](#constraining-upgrade-versions), but do not apply to projects using `project.json`.
4650

docs/Consume-Packages/Team-Foundation-Build.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ NuGet has supported [restoring packages](../consume-packages/package-restore.md)
5252

5353
The cure to this problem is making sure that packages are restored as the first step in the build process. NuGet 2.7+ makes this easy via a simplified command line:
5454

55-
nuget.exe restore path\to\solution.sln
55+
nuget restore path\to\solution.sln
5656

5757
When your build process restores packages before building the code, you don't need to check-in **.targets** files
5858

@@ -86,7 +86,7 @@ The structure of the repository looks as follows:
8686
8787
└───tools
8888
└───NuGet
89-
NuGet.exe
89+
nuget.exe
9090

9191
You can see that we haven't checked-in the `packages` folder nor any **.targets** files.
9292

docs/Create-Packages/project.json-Impact.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ ms.reviewer:
3232

3333
The project.json system used in NuGet 3.x affects package authors in several ways as described in the following sections.
3434

35-
- [Install and uninstall scripts are ignored](#install-and-uninstall-scripts-are-ignored)
36-
37-
3835
## Changes affecting existing packages usage
3936

4037
Traditional NuGet packages support a set of features that are not carried over to the transitive world.

docs/Policies/NuGet-FAQ.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ The console provides a variable named `$DTE` that returns the `DTE` object. See
100100

101101
This is a known issue with how PowerShell interacts with a COM object. Try the following:
102102

103+
```ps
103104
`$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])`
105+
```
104106

105107
`Get-Interface` is a helper function added by the NuGet PowerShell host.
106108

docs/Release-Notes/Known-Issues.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,19 @@ The NuGet.config file in your `%AppData%\NuGet\` folder has accidentally been em
6161

6262
In NuGet 2.7 or above, when you attempt to install any package which contains assembly references, you may receive the error message **"Input string was not in a correct format."**, like below:
6363

64-
PM> install-package log4net
65-
Installing 'log4net 2.0.0'.
66-
Successfully installed 'log4net 2.0.0'.
67-
Adding 'log4net 2.0.0' to Tyson.OperatorUpload.
68-
Install failed. Rolling back...
69-
install-package : Input string was not in a correct format.
70-
At line:1 char:1
71-
◾install-package log4net
72-
◾ ~~~~~~~~~~~~~~~~~~~~~~~
73-
◾CategoryInfo : NotSpecified: (:) [Install-Package], FormatException
74-
◾ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
64+
```ps
65+
install-package log4net
66+
Installing 'log4net 2.0.0'.
67+
Successfully installed 'log4net 2.0.0'.
68+
Adding 'log4net 2.0.0' to Tyson.OperatorUpload.
69+
Install failed. Rolling back...
70+
install-package : Input string was not in a correct format.
71+
At line:1 char:1
72+
install-package log4net
73+
~~~~~~~~~~~~~~~~~~~~~~~
74+
CategoryInfo : NotSpecified: (:) [Install-Package], FormatException
75+
FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
76+
```
7577

7678

7779
This is caused by the type library for the VSLangProj.dll COM component being unregistered on your system. This can happen, for example, when you have two versions of Visual Studio installed side-by-side and you then uninstall the older version. Doing so may inadvertently unregister the above COM library.

docs/Release-Notes/NuGet-2.5.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,15 @@ Starting with NuGet 2.5, if NuGet.exe identifies a UNC/folder source, it will pe
190190

191191
The following command will now work:
192192

193-
NuGet.exe push -source \\mycompany\repo\ mypackage.1.0.0.nupkg
193+
nuget push -source \\mycompany\repo\ mypackage.1.0.0.nupkg
194194

195195
## NuGet.exe supports explicitly-specified Config files
196196

197197
NuGet.exe commands that acccess configuration (all except 'spec' and 'pack') now support a new '-ConfigFile' option, which forces a specific config file to be used in place of the default config file at %AppData%\nuget\nuget.config.
198198

199199
Example:
200200

201-
NuGet.exe sources add -name test -source http://test -ConfigFile C:\test\.nuget\nuget.config
201+
nuget sources add -name test -source http://test -ConfigFile C:\test\.nuget\nuget.config
202202

203203
## Support for Native projects
204204

docs/Schema/msbuild-targets.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -63,33 +63,33 @@ Similarly, you can write an MSBuild task, write your own target and consume NuGe
6363
In order for MSBuild to be able to gather all the inputs, all metadata from `project.json` and `.nuspec` will move into the `.csproj` file. The table below describes the MSBuild properties that can be added to a `.csproj` file within the first &lt;PropertyGroup&gt; node. You can make these edits easily in Visual Studio 2017 and later by right-clicking the project and selecting **Edit {project_name}** on the context menu. For convenience the table is organized by the equivalent property in a [`.nuspec` file](../schema/nuspec.md).
6464

6565

66-
| Attribute/NuSpec Value | MSBuild Property | Default | Notes
67-
| Id | PackageId | AssemblyName | $(AssemblyName) from msbuild
68-
| Version | PackageVersion | Version | New $(Version) property from msbuild, is semver compatible. Could be “1.0.0”, “1.0.0-beta”, or “1.0.0-beta-00345”.
69-
| Authors | Authors | username of the current user will be the default value |
70-
| Owners | N/A | Not present in NuSpec |
71-
| Description | Description | "Package Description" |
72-
| Copyright | Copyright | empty |
73-
| RequireLicenseAcceptance | PackageRequireLicenseAcceptance | false |
74-
| LicenseUrl | PackageLicenseUrl | empty |
75-
| ProjectUrl | PackageProjectUrl | empty |
76-
| IconUrl | PackageIconUrl | empty |
77-
| Tags | PackageTags | empty |
78-
| ReleaseNotes | PackageReleaseNotes | empty |
79-
| RepositoryUrl | RepositoryUrl | empty |
80-
| RepositoryType | RepositoryType | empty |
81-
| PackageType | `&lt;PackageType&gt;DotNetCliTool, 1.0.0.0;Dependency, 2.0.0.0&lt;/PackageType&gt;` | |
82-
| Title | Not supported | |
83-
| Summary | Not supported | |
84-
| n/a | PackageOutputPath | The bin\{configuration} folder |
85-
| n/a | Configuration | Debug |
86-
| n/a | AssemblyName | |
87-
| n/a | IncludeSymbols | |
88-
| n/a | IncludeSource | | If true, there must also be a &lt;SourceFile&gt; node.
89-
| n/a | IsTool | |
90-
| n/a | NoPackageAnalysis | |
91-
| n/a | MinClientVersion | |
92-
| n/a | TargetPath<br>TargetFramework | | See <a href="#cross-targeting">cross-targeting</a> below.
66+
| Attribute/NuSpec Value | MSBuild Property | Default | Notes |
67+
| Id | PackageId | AssemblyName | $(AssemblyName) from msbuild |
68+
| Version | PackageVersion | Version | New $(Version) property from msbuild, is semver compatible. Could be “1.0.0”, “1.0.0-beta”, or “1.0.0-beta-00345”. |
69+
| Authors | Authors | username of the current user will be the default value | |
70+
| Owners | N/A | Not present in NuSpec | |
71+
| Description | Description | "Package Description" | |
72+
| Copyright | Copyright | empty | |
73+
| RequireLicenseAcceptance | PackageRequireLicenseAcceptance | false | |
74+
| LicenseUrl | PackageLicenseUrl | empty | |
75+
| ProjectUrl | PackageProjectUrl | empty | |
76+
| IconUrl | PackageIconUrl | empty | |
77+
| Tags | PackageTags | empty | |
78+
| ReleaseNotes | PackageReleaseNotes | empty | |
79+
| RepositoryUrl | RepositoryUrl | empty | |
80+
| RepositoryType | RepositoryType | empty | |
81+
| PackageType | `<PackageType>DotNetCliTool, 1.0.0.0;Dependency, 2.0.0.0</PackageType>` | | |
82+
| Title | Not supported | | |
83+
| Summary | Not supported | | |
84+
| n/a | PackageOutputPath | The bin\{configuration} folder | |
85+
| n/a | Configuration | Debug | |
86+
| n/a | AssemblyName | | |
87+
| n/a | IncludeSymbols | | |
88+
| n/a | IncludeSource | | If true, there must also be a &lt;SourceFile&gt; node. |
89+
| n/a | IsTool | | |
90+
| n/a | NoPackageAnalysis | | |
91+
| n/a | MinClientVersion | | |
92+
| n/a | TargetPath<br>TargetFramework | | See <a href="#cross-targeting">cross-targeting</a> below. |
9393

9494
## pack scenarios
9595

@@ -190,23 +190,23 @@ As part of the move to MSBuild, package restore becomes an MSBuild target; `nuge
190190

191191
Additional restore settings may come from MSBuild properties; values are set from the command line.
192192

193-
| Property | Description
194-
| RestoreSources | List of package sources separated by semicolons
195-
| RestorePackagesPath | User packages directory path
196-
| RestoreDisableParallel | Limit downloads to one at a time
197-
| RestoreConfigFile | nuget.config file
198-
| RestoreNoCache | If true, avoids using the web cache
199-
| RestoreIgnoreFailedSource | If true, ignores failing or missing package sources
193+
| Property | Description |
194+
| RestoreSources | List of package sources separated by semicolons |
195+
| RestorePackagesPath | User packages directory path |
196+
| RestoreDisableParallel | Limit downloads to one at a time |
197+
| RestoreConfigFile | nuget.config file |
198+
| RestoreNoCache | If true, avoids using the web cache |
199+
| RestoreIgnoreFailedSource | If true, ignores failing or missing package sources |
200200

201201

202202
### Restore outputs
203203

204204
Restore creates the following files in the build `obj` folder:
205205

206-
| File | Description
207-
| project.assets.json | Previously project.lock.json
208-
| {projectName}.projectFileExtension.nuget.g.props | References to msbuild targets contained in packages
209-
| {projectName}.projectFileExtension.nuget.g.targets | References to msbuild props contained in packages
206+
| File | Description |
207+
| project.assets.json | Previously project.lock.json |
208+
| {projectName}.projectFileExtension.nuget.g.props | References to msbuild targets contained in packages |
209+
| {projectName}.projectFileExtension.nuget.g.targets | References to msbuild props contained in packages |
210210

211211
## PackageTargetFallback
212212

docs/Schema/nuget.config-file.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ http_proxy http_proxy.user http_proxy.password no_proxy | Proxy settings to use
8787
## bindingRedirects section
8888

8989
Configures whether NuGet does automatic binding redirects when a package is installed.
90+
9091
Key | Value
9192
--- | ---
9293
skip | A Boolean indicating whether to skip automatic binding redirects. The default is false.

docs/Visual-Studio-Extensibility/Project-System-Support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ For example, you might add the following `case` statement to your `IVsHierarchy:
129129
case __VSHPROPID8.VSHPROPID_ProjectCapabilitiesChecker:
130130
propVal = new VsProjectCapabilitiesPresenceChecker();
131131
return VSConstants.S_OK;
132-
````
132+
```
133133

134134

135135
## DTE Support

0 commit comments

Comments
 (0)