You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Preview 3 edits
* Added migrate to the list of commands
* Used docfx syntax for notes
* Fixed heading levels in new articles
* Made pseudo-variables in csproj consistent in dependencies
* Remove references to project.json sections from deploying
* Remove F# from dotnet new, since it's not supported
* Added back missing --framework to dotnet test
* Typos, grammar and other small fixes
* Removed unnecessary Overview headings
Copy file name to clipboardExpand all lines: docs/core/preview3/deploying/index.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ Deploying a framework-dependent deployment with one or more third-party dependen
118
118
</ItemGroup>
119
119
```
120
120
121
-
Note that the SDK dependency remains in the above example. This is by design, since this depdendency is required to restore all the needed targets to allow the command line tools to function.
121
+
Note that the SDK dependency remains in the above example. This is by design, since this depdendency is required to restore all the needed targets to allow the command line tools to function.
122
122
123
123
2. If you haven't already, download the NuGet package containing the third-party dependency. To download the package, execute the `dotnet restore` command after adding the dependency. Because the dependency is resolved out of the local NuGet cache at publish time, it must be available on your system.
124
124
@@ -186,7 +186,7 @@ Deploying a self-contained deployment with no third-party dependencies involves
@@ -316,16 +316,14 @@ If the availability of adequate storage space on target systems is likely to be
316
316
317
317
Tocreateaself-containeddeploymentwithasmallerfootprint, startbyfollowingthefirsttwostepsforcreatingaself-containeddeployment. Onceyou've run the `dotnet new` command and added the C# source code to your app, do the following:
# Managing dependencies in .NET Core Preview 3 tooling
17
16
18
-
# Overview
19
17
With the move of .NET Core projects from project.json to csproj and MSBuild, a significant invesment also happened that resulted in unification of the project file and assets that allow tracking of depenencies. For .NET Core projects this is similar to what project.json did. There is no separate JSON or XML file that tracks NuGet dependencies. With this change, we've also introduced another type of *reference* into the csproj syntax called the `<PackageReference>`.
20
18
21
19
This document describes the new reference type. It also shows how to add a package dependency using this new reference type to your project.
22
20
23
-
# The new <PackageReference> element
21
+
##The new <PackageReference> element
24
22
The `<PackageReference>` has the following basic structure:
25
23
26
24
```xml
27
-
<PackageReferenceInclude="<Package_ID>">
25
+
<PackageReferenceInclude="PACKAGE_ID">
28
26
<Version>PACKAGE_VERSION</Version>
29
27
</PackageReference>
30
28
```
31
29
32
-
If you are familiar with MSBuild, it will look familiar to the other [reference types]() that already exist. The key is the `Include` statement which specifies the package id that you wish to add to the project. The `<Version>` child element specified the version to get. The versions are specified as per [NuGet version rules](https://docs.nuget.org/ndocs/create-packages/dependency-versions#version-ranges).
30
+
If you are familiar with MSBuild, it will look familiar to the other [reference types]() that already exist. The key is the `Include` statement which specifies the package id that you wish to add to the project. The `<Version>` child element specifies the version to get. The versions are specified as per [NuGet version rules](https://docs.nuget.org/ndocs/create-packages/dependency-versions#version-ranges).
33
31
34
-
> **Note:** if you are not faimilar with the overall `csproj` syntax, you can use the [MSBuild project reference documentation]() to get acquainted.
32
+
> [!NOTE]
33
+
> If you are not familiar with the overall `csproj` syntax, you can use the [MSBuild project reference documentation]() to get acquainted.
35
34
36
35
Adding a dependency that is available only in a specific target is done using conditions:
The above means that the dependency will only be valid if the build is happening for that given target. The `$(TargetFramework)` in the condition is a MSBuild property that is being set in the project. For most common .NET Core applications, you will not need to do this.
45
44
46
-
# Adding a dependency to your project
47
-
Adding a dependency to your project is straightforward. Here is an example of how to add `JSON.net` version `9.0.1` to your project. Of course, it is applicable to any other NuGet dependency.
45
+
##Adding a dependency to your project
46
+
Adding a dependency to your project is straightforward. Here is an example of how to add Json.NET version `9.0.1` to your project. Of course, it is applicable to any other NuGet dependency.
48
47
49
48
When you open your project file, you will see two or more `<ItemGroup>` nodes. You will notice that one of the nodes already has `<PackageReference>` elements in it. You can add your new dependency to this node, or create a new one; it is completely up to you as the result will be the same.
50
49
@@ -90,7 +89,7 @@ The full project looks like this:
90
89
</Project>
91
90
```
92
91
93
-
# Removing a dependency from the project
92
+
##Removing a dependency from the project
94
93
Removing a dependency from the project file involves simply removing the `<PackageReference>` from the project file.
0 commit comments