Merge branch 'master' into merge_master_into_3xx

* master: (49 commits)
  Add back 'nuget-build' feed for: NuGet.Versioning 4.7.0-rtm.5081
  Slight re-ordering...
  Add back 'Roslyn' feed for: Microsoft.NETCore.Compilers 2.8.0-beta4-62811-05
  Trim back the 'unnecessary' nuget feeds.
  Insert NuGet Build 4.7.0-rtm.5081 into cli
  Terminate the 'StartsWith' string in the badge existence check. (#9049)
  Update coresetup, coresetup, coresetup, roslyn to preview3-26411-06, preview3-26411-06, preview3-26411-06, beta4-62811-05, respectively
  consume bring your own shim(byos) (#9018)
  Fixing typos...
  Updating the dev-certs message displayed in the first run experience.
  Fix merge to only update core-setup and Roslyn versions.
  LOC CHECKIN | dotnet/cli master | 20180409
  Add TryGetMostFitRuntimeIdentifier (#8997)
  Adapt to no config file Apphost shim
  Update CoreSetup, CoreSetup, CoreSetup, Roslyn to preview3-26406-06, preview3-26406-06, preview3-26406-06, beta4-62806-08, respectively
  Revert links on Readme to master
  Add test cases per PR feedback
  Tweak --no-build messages based on PR feedback
  Update CoreSetup, CoreSetup, CoreSetup, Roslyn to preview3-26405-02, preview3-26405-02, preview3-26405-02, beta4-62805-01, respectively
  Disabling msbuild node reuse for CLI full build.
  ...

 Conflicts:
	build/DependencyVersions.props
This commit is contained in:
Livar Cunha 2018-04-16 11:55:09 -07:00
commit d6c0890696
303 changed files with 6030 additions and 1762 deletions

View file

@ -0,0 +1,90 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet add package command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet add package
.PP
.SH NAME
.PP
\f[C]dotnet\ add\ package\f[] \- Adds a package reference to a project file.
.SH SYNOPSIS
.PP
\f[C]dotnet\ add\ [<PROJECT>]\ package\ <PACKAGE_NAME>\ [\-h|\-\-help]\ [\-v|\-\-version]\ [\-f|\-\-framework]\ [\-n|\-\-no\-restore]\ [\-s|\-\-source]\ [\-\-package\-directory]\f[]
.SH DESCRIPTION
.PP
The \f[C]dotnet\ add\ package\f[] command provides a convenient option to add a package reference to a project file.
After running the command, there's a compatibility check to ensure the package is compatible with the frameworks in the project.
If the check passes, a \f[C]<PackageReference>\f[] element is added to the project file and dotnet restore is run.
.PP
.PP
For example, adding \f[C]Newtonsoft.Json\f[] to \f[I]ToDo.csproj\f[] produces output similar to the following example:
.IP
.nf
\f[C]
\ \ Writing\ C:\\Users\\mairaw\\AppData\\Local\\Temp\\tmp95A8.tmp
info\ :\ Adding\ PackageReference\ for\ package\ \[aq]Newtonsoft.Json\[aq]\ into\ project\ \[aq]C:\\projects\\ToDo\\ToDo.csproj\[aq].
log\ \ :\ Restoring\ packages\ for\ C:\\projects\\ToDo\\ToDo.csproj...
info\ :\ \ \ GET\ https://api.nuget.org/v3\-flatcontainer/newtonsoft.json/index.json
info\ :\ \ \ OK\ https://api.nuget.org/v3\-flatcontainer/newtonsoft.json/index.json\ 235ms
info\ :\ Package\ \[aq]Newtonsoft.Json\[aq]\ is\ compatible\ with\ all\ the\ specified\ frameworks\ in\ project\ \[aq]C:\\projects\\ToDo\\ToDo.csproj\[aq].
info\ :\ PackageReference\ for\ package\ \[aq]Newtonsoft.Json\[aq]\ version\ \[aq]10.0.3\[aq]\ added\ to\ file\ \[aq]C:\\projects\\ToDo\\ToDo.csproj\[aq].
\f[]
.fi
.PP
The \f[I]ToDo.csproj\f[] file now contains a \f[C]<PackageReference>\f[] element for the referenced package.
.IP
.nf
\f[C]
<PackageReference\ Include="Newtonsoft.Json"\ Version="9.0.1"\ />
\f[]
.fi
.SS Arguments
.PP
\f[C]PROJECT\f[]
.PP
Specifies the project file.
If not specified, the command searches the current directory for one.
.PP
\f[C]PACKAGE_NAME\f[]
.PP
The package reference to add.
.SH OPTIONS
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-v|\-\-version\ <VERSION>\f[]
.PP
Version of the package.
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
Adds a package reference only when targeting a specific framework.
.PP
\f[C]\-n|\-\-no\-restore\f[]
.PP
Adds a package reference without performing a restore preview and compatibility check.
.PP
\f[C]\-s|\-\-source\ <SOURCE>\f[]
.PP
Uses a specific NuGet package source during the restore operation.
.PP
\f[C]\-\-package\-directory\ <PACKAGE_DIRECTORY>\f[]
.PP
Restores the package to the specified directory.
.SH EXAMPLES
.PP
Add \f[C]Newtonsoft.Json\f[] NuGet package to a project:
.PP
\f[C]dotnet\ add\ package\ Newtonsoft.Json\f[]
.PP
Add a specific version of a package to a project:
.PP
\f[C]dotnet\ add\ ToDo.csproj\ package\ Microsoft.Azure.DocumentDB.Core\ \-v\ 1.0.0\f[]
.PP
Add a package using a specific NuGet source:
.PP
\f[C]dotnet\ add\ package\ Microsoft.AspNetCore.StaticFiles\ \-s\ https://dotnet.myget.org/F/dotnet\-core/api/v3/index.json\f[]
.SH AUTHORS
mairaw.

View file

@ -0,0 +1,62 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet\-add reference command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet\-add reference
.PP
.SH NAME
.PP
\f[C]dotnet\ add\ reference\f[] \- Adds project\-to\-project (P2P) references.
.SH SYNOPSIS
.PP
\f[C]dotnet\ add\ [<PROJECT>]\ reference\ [\-f|\-\-framework]\ <PROJECT_REFERENCES>\ [\-h|\-\-help]\f[]
.SH DESCRIPTION
.PP
The \f[C]dotnet\ add\ reference\f[] command provides a convenient option to add project references to a project.
After running the command, the \f[C]<ProjectReference>\f[] elements are added to the project file.
.IP
.nf
\f[C]
<ItemGroup>
\ \ <ProjectReference\ Include="app.csproj"\ />
\ \ <ProjectReference\ Include="..\\lib2\\lib2.csproj"\ />
\ \ <ProjectReference\ Include="..\\lib1\\lib1.csproj"\ />
</ItemGroup>
\f[]
.fi
.SS Arguments
.PP
\f[C]PROJECT\f[]
.PP
Specifies the project file.
If not specified, the command searches the current directory for one.
.PP
\f[C]PROJECT_REFERENCES\f[]
.PP
Project\-to\-project (P2P) references to add.
Specify one or more projects.
Glob patterns are supported on Unix/Linux\-based systems.
.SH OPTIONS
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
Adds project references only when targeting a specific framework.
.SH EXAMPLES
.PP
Add a project reference:
.PP
\f[C]dotnet\ add\ app/app.csproj\ reference\ lib/lib.csproj\f[]
.PP
Add multiple project references to the project in the current directory:
.PP
\f[C]dotnet\ add\ reference\ lib1/lib1.csproj\ lib2/lib2.csproj\f[]
.PP
Add multiple project references using a globbing pattern on Linux/Unix:
.PP
\f[C]dotnet\ add\ app/app.csproj\ reference\ **/*.csproj\f[]
.SH AUTHORS
mairaw.

View file

@ -1,96 +1,195 @@
.\" Automatically generated by Pandoc 1.15.1
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet build command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.TH "DOTNET\-BUILD" "1" "April 2016" "" ""
.SS NAME
.SH dotnet\-build
.PP
dotnet\-build \-\- Builds a project and all of its dependencies
.SS SYNOPSIS
.SH NAME
.PP
\f[C]dotnet\ build\ [\-\-output]\ \ \ \ \ \ \ [\-\-build\-base\-path]\ [\-\-framework]\ \ \ \ \ \ \ [\-\-configuration]\ \ [\-\-runtime]\ [\-\-version\-suffix]\ \ \ \ \ [\-\-build\-profile]\ \ [\-\-no\-incremental]\ [\-\-no\-dependencies]\ \ \ \ \ [<project>]\f[]
.SS DESCRIPTION
.PP
The \f[C]dotnet\ build\f[] command builds multiple source file from a
source project and its dependencies into a binary.
The binary will be in Intermediate Language (IL) by default and will
have a DLL extension.
\f[C]dotnet\ build\f[] will also drop a \f[C]\\*.deps\f[] file which
outlines what the host needs to run the application.
.PP
Building requires the existence of a lock file, which means that you
have to run \f[C]dotnet\ restore\f[] (dotnet-restore.md) prior to
building your code.
.PP
Before any compilation begins, the build verb analyzes the project and
its dependencies for incremental safety checks.
If all checks pass, then build proceeds with incremental compilation of
the project and its dependencies; otherwise, it falls back to
non\-incremental compilation.
Via a profile flag, users can choose to receive additional information
on how they can improve their build times.
.PP
All projects in the dependency graph that need compilation must pass the
following safety checks in order for the compilation process to be
incremental: \- not use pre/post compile scripts \- not load compilation
tools from PATH (for example, resgen, compilers) \- use only known
compilers (csc, vbc, fsc)
.PP
In order to build an executable application, you need a special
configuration section in your project.json file:
\f[C]dotnet\ build\f[] \- Builds a project and all of its dependencies.
.SH SYNOPSIS
.SS .NET Core 2.x
.IP
.nf
\f[C]
{\
\ \ \ \ "compilerOptions":\ {
\ \ \ \ \ \ "emitEntryPoint":\ true
\ \ \ \ }
}
dotnet\ build\ [<PROJECT>]\ [\-c|\-\-configuration]\ [\-f|\-\-framework]\ [\-\-force]\ [\-\-no\-dependencies]\ [\-\-no\-incremental]
\ \ \ \ [\-\-no\-restore]\ [\-o|\-\-output]\ [\-r|\-\-runtime]\ [\-v|\-\-verbosity]\ [\-\-version\-suffix]
dotnet\ build\ [\-h|\-\-help]
\f[]
.fi
.SS .NET Core 1.x
.IP
.nf
\f[C]
dotnet\ build\ [<PROJECT>]\ [\-c|\-\-configuration]\ [\-f|\-\-framework]\ [\-\-no\-dependencies]\ [\-\-no\-incremental]\ [\-o|\-\-output]
\ \ \ \ [\-r|\-\-runtime]\ [\-v|\-\-verbosity]\ [\-\-version\-suffix]
dotnet\ build\ [\-h|\-\-help]
\f[]
.fi
.SS OPTIONS
.PP
\f[C]\-o\f[], \f[C]\-\-output\f[] [DIR]
* * * * *
.SH DESCRIPTION
.PP
Directory in which to place the built binaries.
The \f[C]dotnet\ build\f[] command builds the project and its dependencies into a set of binaries.
The binaries include the project's code in Intermediate Language (IL) files with a \f[I].dll\f[] extension and symbol files used for debugging with a \f[I].pdb\f[] extension.
A dependencies JSON file (\f[I]*.deps.json\f[]) is produced that lists the dependencies of the application.
A \f[I]*.runtimeconfig.json\f[] file is produced, which specifies the shared runtime and its version for the application.
.PP
\f[C]\-b\f[], \f[C]\-\-build\-base\-path\f[] [DIR]
If the project has third\-party dependencies, such as libraries from NuGet, they're resolved from the NuGet cache and aren't available with the project's built output.
With that in mind, the product of \f[C]dotnet\ build\f[] isn't ready to be transferred to another machine to run.
This is in contrast to the behavior of the .NET Framework in which building an executable project (an application) produces output that's runnable on any machine where the .NET Framework is installed.
To have a similar experience with .NET Core, you need to use the dotnet publish command.
For more information, see .NET Core Application Deployment.
.PP
Directory in which to place temporary outputs.
Building requires the \f[I]project.assets.json\f[] file, which lists the dependencies of your application.
The file is created when \f[C]dotnet\ restore\f[] is executed.
Without the assets file in place, the tooling cannot resolve reference assemblies, which results in errors.
With .NET Core 1.x SDK, you needed to explicitily run the \f[C]dotnet\ restore\f[] before running \f[C]dotnet\ build\f[].
Starting with .NET Core 2.0 SDK, \f[C]dotnet\ restore\f[] runs implicitily when you run \f[C]dotnet\ build\f[].
If you want to disable implicit restore when running the build command, you can pass the \f[C]\-\-no\-restore\f[] option.
.PP
\f[C]\-f\f[], \f[C]\-\-framework\f[] [FRAMEWORK]
.PP
\f[C]dotnet\ build\f[] uses MSBuild to build the project; thus, it supports both parallel and incremental builds.
Refer to Incremental Builds for more information.
.PP
In addition to its options, the \f[C]dotnet\ build\f[] command accepts MSBuild options, such as \f[C]/p\f[] for setting properties or \f[C]/l\f[] to define a logger.
Learn more about these options in the MSBuild Command\-Line Reference.
.PP
Whether the project is executable or not is determined by the \f[C]<OutputType>\f[] property in the project file.
The following example shows a project that will produce executable code:
.IP
.nf
\f[C]
<PropertyGroup>
\ \ <OutputType>Exe</OutputType>
</PropertyGroup>
\f[]
.fi
.PP
In order to produce a library, omit the \f[C]<OutputType>\f[] property.
The main difference in built output is that the IL DLL for a library doesn't contain entry points and can't be executed.
.SS Arguments
.PP
\f[C]PROJECT\f[]
.PP
The project file to build.
If a project file is not specified, MSBuild searches the current working directory for a file that has a file extension that ends in \f[I]proj\f[] and uses that file.
.SH OPTIONS
.SS .NET Core 2.x
.PP
\f[C]\-c|\-\-configuration\ {Debug|Release}\f[]
.PP
Defines the build configuration.
The default value is \f[C]Debug\f[].
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
Compiles for a specific framework.
The framework needs to be defined in the project.json file.
The framework must be defined in the project file.
.PP
\f[C]\-c\f[], \f[C]\-\-configuration\f[] [Debug|Release]
\f[C]\-\-force\f[]
.PP
Defines a configuration under which to build.
If omitted, it defaults to Debug.
Forces all dependencies to be resolved even if the last restore was successful.
This is equivalent to deleting the \f[I]project.assets.json\f[] file.
.PP
\f[C]\-r\f[], \f[C]\-\-runtime\f[] [RUNTIME_IDENTIFIER]
\f[C]\-h|\-\-help\f[]
.PP
Target runtime to build for.
Prints out a short help for the command.
.PP
\-\-version\-suffix [VERSION_SUFFIX]
\f[C]\-\-no\-dependencies\f[]
.PP
Defines what \f[C]*\f[] should be replaced with in the version field in
the project.json file.
The format follows NuGet\[aq]s version guidelines.
.PP
\f[C]\-\-build\-profile\f[]
.PP
Prints out the incremental safety checks that users need to address in
order for incremental compilation to be automatically turned on.
Ignores project\-to\-project (P2P) references and only builds the root project specified to build.
.PP
\f[C]\-\-no\-incremental\f[]
.PP
Marks the build as unsafe for incremental build.
This turns off incremental compilation and forces a clean rebuild of the
project dependency graph.
This turns off incremental compilation and forces a clean rebuild of the project's dependency graph.
.PP
\f[C]\-\-no\-restore\f[]
.PP
Doesn't perform an implicit restore during build.
.PP
\f[C]\-o|\-\-output\ <OUTPUT_DIRECTORY>\f[]
.PP
Directory in which to place the built binaries.
You also need to define \f[C]\-\-framework\f[] when you specify this option.
.PP
\f[C]\-r|\-\-runtime\ <RUNTIME_IDENTIFIER>\f[]
.PP
Specifies the target runtime.
For a list of Runtime Identifiers (RIDs), see the RID catalog.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
.PP
\f[C]\-\-version\-suffix\ <VERSION_SUFFIX>\f[]
.PP
Defines the version suffix for an asterisk (\f[C]*\f[]) in the version field of the project file.
The format follows NuGet's version guidelines.
.SS .NET Core 1.x
.PP
\f[C]\-c|\-\-configuration\ {Debug|Release}\f[]
.PP
Defines the build configuration.
The default value is \f[C]Debug\f[].
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
Compiles for a specific framework.
The framework must be defined in the project file.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-\-no\-dependencies\f[]
.PP
Ignores project\-to\-project references and only builds the root project
specified to build.
Ignores project\-to\-project (P2P) references and only builds the root project specified to build.
.PP
\f[C]\-\-no\-incremental\f[]
.PP
Marks the build as unsafe for incremental build.
This turns off incremental compilation and forces a clean rebuild of the project's dependency graph.
.PP
\f[C]\-o|\-\-output\ <OUTPUT_DIRECTORY>\f[]
.PP
Directory in which to place the built binaries.
You also need to define \f[C]\-\-framework\f[] when you specify this option.
.PP
\f[C]\-r|\-\-runtime\ <RUNTIME_IDENTIFIER>\f[]
.PP
Specifies the target runtime.
For a list of Runtime Identifiers (RIDs), see the RID catalog.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
.PP
\f[C]\-\-version\-suffix\ <VERSION_SUFFIX>\f[]
.PP
Defines the version suffix for an asterisk (\f[C]*\f[]) in the version field of the project file.
The format follows NuGet's version guidelines.
.PP
* * * * *
.SH EXAMPLES
.PP
Build a project and its dependencies:
.PP
\f[C]dotnet\ build\f[]
.PP
Build a project and its dependencies using Release configuration:
.PP
\f[C]dotnet\ build\ \-\-configuration\ Release\f[]
.PP
Build a project and its dependencies for a specific runtime (in this example, Ubuntu 16.04):
.PP
\f[C]dotnet\ build\ \-\-runtime\ ubuntu.16.04\-x64\f[]
.PP
Build the project and use the specified NuGet package source during the restore operation (.NET Core SDK 2.0 and later versions):
.PP
\f[C]dotnet\ build\ \-\-source\ c:\\packages\\mypackages\f[]
.SH AUTHORS
Microsoft Corporation dotnetclifeedback\@microsoft.com.
mairaw.

View file

@ -0,0 +1,113 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet clean command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet\-clean
.PP
.SH NAME
.PP
\f[C]dotnet\ clean\f[] \- Cleans the output of a project.
.SH SYNOPSIS
.SS .NET Core 2.x
.IP
.nf
\f[C]
dotnet\ clean\ [<PROJECT>]\ [\-c|\-\-configuration]\ [\-f|\-\-framework]\ [\-o|\-\-output]\ [\-r|\-\-runtime]\ [\-v|\-\-verbosity]
dotnet\ clean\ [\-h|\-\-help]
\f[]
.fi
.SS .NET Core 1.x
.IP
.nf
\f[C]
dotnet\ clean\ [<PROJECT>]\ [\-c|\-\-configuration]\ [\-f|\-\-framework]\ [\-o|\-\-output]\ [\-v|\-\-verbosity]
dotnet\ clean\ [\-h|\-\-help]
\f[]
.fi
.PP
* * * * *
.SH DESCRIPTION
.PP
The \f[C]dotnet\ clean\f[] command cleans the output of the previous build.
It's implemented as an MSBuild target, so the project is evaluated when the command is run.
Only the outputs created during the build are cleaned.
Both intermediate (\f[I]obj\f[]) and final output (\f[I]bin\f[]) folders are cleaned.
.SS Arguments
.PP
\f[C]PROJECT\f[]
.PP
The MSBuild project to clean.
If a project file is not specified, MSBuild searches the current working directory for a file that has a file extension that ends in \f[I]proj\f[] and uses that file.
.SH OPTIONS
.SS .NET Core 2.x
.PP
\f[C]\-c|\-\-configuration\ {Debug|Release}\f[]
.PP
Defines the build configuration.
The default value is \f[C]Debug\f[].
This option is only required when cleaning if you specified it during build time.
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
The framework that was specified at build time.
The framework must be defined in the project file.
If you specified the framework at build time, you must specify the framework when cleaning.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-o|\-\-output\ <OUTPUT_DIRECTORY>\f[]
.PP
Directory in which the build outputs are placed.
Specify the \f[C]\-f|\-\-framework\ <FRAMEWORK>\f[] switch with the output directory switch if you specified the framework when the project was built.
.PP
\f[C]\-r|\-\-runtime\ <RUNTIME_IDENTIFIER>\f[]
.PP
Cleans the output folder of the specified runtime.
This is used when a self\-contained deployment was created.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed levels are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].
.SS .NET Core 1.x
.PP
\f[C]\-c|\-\-configuration\ {Debug|Release}\f[]
.PP
Defines the build configuration.
The default value is \f[C]Debug\f[].
This option is only required when cleaning if you specified it during build time.
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
The framework that was specified at build time.
The framework must be defined in the project file.
If you specified the framework at build time, you must specify the framework when cleaning.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-o|\-\-output\ <OUTPUT_DIRECTORY>\f[]
.PP
Directory in which the build outputs are placed.
Specify the \f[C]\-f|\-\-framework\ <FRAMEWORK>\f[] switch with the output directory switch if you specified the framework when the project was built.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed levels are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].
.PP
* * * * *
.SH EXAMPLES
.PP
Clean a default build of the project:
.PP
\f[C]dotnet\ clean\f[]
.PP
Clean a project built using the Release configuration:
.PP
\f[C]dotnet\ clean\ \-\-configuration\ Release\f[]
.SH AUTHORS
mairaw.

View file

@ -0,0 +1,33 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet help command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet help reference
.PP
.SH NAME
.PP
\f[C]dotnet\ help\f[] \- Shows more detailed documentation online for the specified command.
.SH SYNOPSIS
.PP
\f[C]dotnet\ help\ <COMMAND_NAME>\ [\-h|\-\-help]\f[]
.SH DESCRIPTION
.PP
The \f[C]dotnet\ help\f[] command opens up the reference page for more detailed information about the specified command at docs.microsoft.com.
.SS Arguments
.PP
\f[C]COMMAND_NAME\f[]
.PP
Name of the .NET Core CLI command.
For a list of the valid CLI commands, see CLI commands.
.SH OPTIONS
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.SH EXAMPLES
.PP
Opens the documentation page for the dotnet new command:
.PP
\f[C]dotnet\ help\ new\f[]
.SH AUTHORS
mairaw.

View file

@ -0,0 +1,175 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet\-install scripts" "1" "" "" ".NET Core"
.hy
.SH dotnet\-install scripts reference
.SH NAME
.PP
\f[C]dotnet\-install.ps1\f[] | \f[C]dotnet\-install.sh\f[] \- Script used to install the .NET Core CLI tools and the shared runtime.
.SH SYNOPSIS
.PP
Windows:
.PP
\f[C]dotnet\-install.ps1\ [\-Channel]\ [\-Version]\ [\-InstallDir]\ [\-Architecture]\ [\-SharedRuntime]\ [\-DryRun]\ [\-NoPath]\ [\-AzureFeed]\ [\-ProxyAddress]\ [\-\-Verbose]\ [\-\-Help]\f[]
.PP
macOS/Linux:
.PP
\f[C]dotnet\-install.sh\ [\-\-channel]\ [\-\-version]\ [\-\-install\-dir]\ [\-\-architecture]\ [\-\-shared\-runtime]\ [\-\-dry\-run]\ [\-\-no\-path]\ [\-\-azure\-feed]\ [\-\-verbose]\ [\-\-help]\f[]
.SH DESCRIPTION
.PP
The \f[C]dotnet\-install\f[] scripts are used to perform a non\-admin installation of the .NET Core SDK, which includes the .NET Core CLI tools and the shared runtime.
.PP
We recommend that you use the stable version that is hosted on .NET Core main website.
The direct paths to the scripts are:
.IP \[bu] 2
https://dot.net/v1/dotnet\-install.sh (bash, UNIX)
.IP \[bu] 2
https://dot.net/v1/dotnet\-install.ps1 (Powershell, Windows)
.PP
The main usefulness of these scripts is in automation scenarios and non\-admin installations.
There are two scripts: One is a PowerShell script that works on Windows.
The other script is a bash script that works on Linux/macOS.
Both scripts have the same behavior.
The bash script also reads PowerShell switches, so you can use PowerShell switches with the script on Linux/macOS systems.
.PP
The installation scripts download the ZIP/tarball file from the CLI build drops and proceed to install it in either the default location or in a location specified by \f[C]\-InstallDir|\-\-install\-dir\f[].
By default, the installation scripts download the SDK and install it.
If you wish to only obtain the shared runtime, specify the \f[C]\-\-shared\-runtime\f[] argument.
.PP
By default, the script adds the install location to the $PATH for the current session.
Override this default behavior by specifying the \f[C]\-\-no\-path\f[] argument.
.PP
Before running the script, install the required dependencies.
.PP
You can install a specific version using the \f[C]\-\-version\f[] argument.
The version must be specified as a 3\-part version (for example, 1.0.0\-13232).
If omitted, it uses the \f[C]latest\f[] version.
.SH OPTIONS
.PP
\f[C]\-Channel\ <CHANNEL>\f[]
.PP
Specifies the source channel for the installation.
The possible values are:
.IP \[bu] 2
\f[C]Current\f[] \- Current release
.IP \[bu] 2
\f[C]LTS\f[] \- Long\-Term Support channel (current supported release)
.IP \[bu] 2
Two\-part version in X.Y format representing a specific release (for example, \f[C]2.0\f[] or \f[C]1.0\f[])
.IP \[bu] 2
Branch name [for example, \f[C]release/2.0.0\f[], \f[C]release/2.0.0\-preview2\f[], or \f[C]master\f[] for the latest from the \f[C]master\f[] branch (\[lq]bleeding edge\[rq] nightly releases)]
.PP
The default value is \f[C]LTS\f[].
For more information on .NET support channels, see the .NET Core Support Lifecycle topic.
.PP
\f[C]\-Version\ <VERSION>\f[]
.PP
Represents a specific build version.
The possible values are:
.IP \[bu] 2
\f[C]latest\f[] \- Latest build on the channel (used with the \f[C]\-Channel\f[] option)
.IP \[bu] 2
\f[C]coherent\f[] \- Latest coherent build on the channel; uses the latest stable package combination (used with Branch name \f[C]\-Channel\f[] options)
.IP \[bu] 2
Three\-part version in X.Y.Z format representing a specific build version; supersedes the \f[C]\-Channel\f[] option.
For example: \f[C]2.0.0\-preview2\-006120\f[]
.PP
If omitted, \f[C]\-Version\f[] defaults to \f[C]latest\f[].
.PP
\f[C]\-InstallDir\ <DIRECTORY>\f[]
.PP
Specifies the installation path.
The directory is created if it doesn't exist.
The default value is \f[I]%LocalAppData%.dotnet\f[].
Note that binaries are placed directly in the directory.
.PP
\f[C]\-Architecture\ <ARCHITECTURE>\f[]
.PP
Architecture of the .NET Core binaries to install.
Possible values are \f[C]auto\f[], \f[C]x64\f[], and \f[C]x86\f[].
The default value is \f[C]auto\f[], which represents the currently running OS architecture.
.PP
\f[C]\-SharedRuntime\f[]
.PP
If set, this switch limits installation to the shared runtime.
The entire SDK isn't installed.
.PP
\f[C]\-DryRun\f[]
.PP
If set, the script won't perform the installation; but instead, it displays what command line to use to consistently install the currently requested version of the .NET Core CLI.
For example if you specify version \f[C]latest\f[], it displays a link with the specific version so that this command can be used deterministically in a build script.
It also displays the binary's location if you prefer to install or download it yourself.
.PP
\f[C]\-NoPath\f[]
.PP
If set, the prefix/installdir are not exported to the path for the current session.
By default, the script will modify the PATH, which makes the CLI tools available immediately after install.
.PP
\f[C]\-AzureFeed\f[]
.PP
Specifies the URL for the Azure feed to the installer.
It isn't recommended that you change this value.
The default is \f[C]https://dotnetcli.azureedge.net/dotnet\f[].
.PP
\f[C]\-ProxyAddress\f[]
.PP
If set, the installer uses the proxy when making web requests.
(Only valid for Windows)
.PP
\f[C]\-\-verbose\f[]
.PP
Display diagnostics information.
.PP
\f[C]\-\-help\f[]
.PP
Prints out help for the script.
.SH EXAMPLES
.PP
Install the latest long\-term supported (LTS) version to the default location:
.PP
Windows:
.PP
\f[C]\&./dotnet\-install.ps1\ \-Channel\ LTS\f[]
.PP
macOS/Linux:
.PP
\f[C]\&./dotnet\-install.sh\ \-\-channel\ LTS\f[]
.PP
Install the latest version from 2.0 channel to the specified location:
.PP
Windows:
.PP
\f[C]\&./dotnet\-install.ps1\ \-Channel\ 2.0\ \-InstallDir\ C:\\cli\f[]
.PP
macOS/Linux:
.PP
\f[C]\&./dotnet\-install.sh\ \-\-channel\ 2.0\ \-\-install\-dir\ ~/cli\f[]
.PP
Install the 1.1.0 version of the shared runtime:
.PP
Windows:
.PP
\f[C]\&./dotnet\-install.ps1\ \-SharedRuntime\ \-Version\ 1.1.0\f[]
.PP
macOS/Linux:
.PP
\f[C]\&./dotnet\-install.sh\ \-\-shared\-runtime\ \-\-version\ 1.1.0\f[]
.PP
Obtain script and install .NET Core CLI one\-liner examples:
.PP
Windows:
.PP
\f[C]\@powershell\ \-NoProfile\ \-ExecutionPolicy\ unrestricted\ \-Command\ "&([scriptblock]::Create((Invoke\-WebRequest\ \-useb\ \[aq]https://dot.net/v1/dotnet\-install.ps1\[aq])))\ <additional\ install\-script\ args>"\f[]
.PP
macOS/Linux:
.PP
\f[C]curl\ \-sSL\ https://dot.net/v1/dotnet\-install.sh\ |\ bash\ /dev/stdin\ <additional\ install\-script\ args>\f[]
.SS See also
.PP
\&.NET Core releases
.PD 0
.P
.PD
\&.NET Core Runtime and SDK download archive
.SH AUTHORS
blackdwarf.

View file

@ -0,0 +1,37 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet list reference command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet list reference
.PP
.SH NAME
.PP
\f[C]dotnet\ list\ reference\f[] \- Lists project to project references.
.SH SYNOPSIS
.PP
\f[C]dotnet\ list\ [<PROJECT>]\ reference\ [\-h|\-\-help]\f[]
.SH DESCRIPTION
.PP
The \f[C]dotnet\ list\ reference\f[] command provides a convenient option to list project references for a given project.
.SS Arguments
.PP
\f[C]PROJECT\f[]
.PP
Specifies the project file to use for listing references.
If not specified, the command will search the current directory for a project file.
.SH OPTIONS
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.SH EXAMPLES
.PP
List the project references for the specified project:
.PP
\f[C]dotnet\ list\ app/app.csproj\ reference\f[]
.PP
List the project references for the project in the current directory:
.PP
\f[C]dotnet\ list\ reference\f[]
.SH AUTHORS
mairaw.

View file

@ -0,0 +1,106 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet migrate command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet migrate
.PP
.SH NAME
.PP
\f[C]dotnet\ migrate\f[] \- Migrates a Preview 2 .NET Core project to a .NET Core SDK 1.0 project.
.SH SYNOPSIS
.PP
\f[C]dotnet\ migrate\ [<SOLUTION_FILE|PROJECT_DIR>]\ [\-t|\-\-template\-file]\ [\-v|\-\-sdk\-package\-version]\ [\-x|\-\-xproj\-file]\ [\-s|\-\-skip\-project\-references]\ [\-r|\-\-report\-file]\ [\-\-format\-report\-file\-json]\ [\-\-skip\-backup]\ [\-h|\-\-help]\f[]
.SH DESCRIPTION
.PP
The \f[C]dotnet\ migrate\f[] command migrates a valid Preview 2 \f[I]project.json\f[]\-based project to a valid .NET Core SDK 1.0 \f[I]csproj\f[] project.
.PP
By default, the command migrates the root project and any project references that the root project contains.
This behavior is disabled using the \f[C]\-\-skip\-project\-references\f[] option at runtime.
.PP
Migration is performed on the following:
.IP \[bu] 2
A single project by specifying the \f[I]project.json\f[] file to migrate.
.IP \[bu] 2
All of the directories specified in the \f[I]global.json\f[] file by passing in a path to the \f[I]global.json\f[] file.
.IP \[bu] 2
A \f[I]solution.sln\f[] file, where it migrates the projects referenced in the solution.
.IP \[bu] 2
On all sub\-directories of the given directory recursively.
.PP
The \f[C]dotnet\ migrate\f[] command keeps the migrated \f[I]project.json\f[] file inside a \f[C]backup\f[] directory, which it creates if the directory doesn't exist.
This behavior is overridden using the \f[C]\-\-skip\-backup\f[] option.
.PP
By default, the migration operation outputs the state of the migration process to standard output (STDOUT).
If you use the \f[C]\-\-report\-file\ <REPORT_FILE>\f[] option, the output is saved to the file specify.
.PP
The \f[C]dotnet\ migrate\f[] command only supports valid Preview 2 \f[I]project.json\f[]\-based projects.
This means that you cannot use it to migrate DNX or Preview 1 \f[I]project.json\f[]\-based projects directly to MSBuild/csproj projects.
You first need to manually migrate the project to a Preview 2 \f[I]project.json\f[]\-based project and then use the \f[C]dotnet\ migrate\f[] command to migrate the project.
.SS Arguments
.PP
\f[C]PROJECT_JSON/GLOBAL_JSON/SOLUTION_FILE/PROJECT_DIR\f[]
.PP
The path to one of the following:
.IP \[bu] 2
a \f[I]project.json\f[] file to migrate.
.IP \[bu] 2
a \f[I]global.json\f[] file, it will migrate the folders specified in \f[I]global.json\f[].
.IP \[bu] 2
a \f[I]solution.sln\f[] file, it will migrate the projects referenced in the solution.
.IP \[bu] 2
a directory to migrate, it will recursively search for \f[I]project.json\f[] files to migrate.
.PP
Defaults to current directory if nothing is specified.
.SH OPTIONS
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-t|\-\-template\-file\ <TEMPLATE_FILE>\f[]
.PP
Template csproj file to use for migration.
By default, the same template as the one dropped by \f[C]dotnet\ new\ console\f[] is used.
.PP
\f[C]\-v|\-\-sdk\-package\-version\ <VERSION>\f[]
.PP
The version of the sdk package that's referenced in the migrated app.
The default is the version of the SDK in \f[C]dotnet\ new\f[].
.PP
\f[C]\-x|\-\-xproj\-file\ <FILE>\f[]
.PP
The path to the xproj file to use.
Required when there is more than one xproj in a project directory.
.PP
\f[C]\-s|\-\-skip\-project\-references\ [Debug|Release]\f[]
.PP
Skip migrating project references.
By default, project references are migrated recursively.
.PP
\f[C]\-r|\-\-report\-file\ <REPORT_FILE>\f[]
.PP
Output migration report to a file in addition to the console.
.PP
\f[C]\-\-format\-report\-file\-json\ <REPORT_FILE>\f[]
.PP
Output migration report file as JSON rather than user messages.
.PP
\f[C]\-\-skip\-backup\f[]
.PP
Skip moving \f[I]project.json\f[], \f[I]global.json\f[], and \f[I]*.xproj\f[] to a \f[C]backup\f[] directory after successful migration.
.SH EXAMPLES
.PP
Migrate a project in the current directory and all of its project\-to\-project dependencies:
.PP
\f[C]dotnet\ migrate\f[]
.PP
Migrate all projects that \f[I]global.json\f[] file includes:
.PP
\f[C]dotnet\ migrate\ path/to/global.json\f[]
.PP
Migrate only the current project and no project\-to\-project (P2P) dependencies.
Also, use a specific SDK version:
.PP
\f[C]dotnet\ migrate\ \-s\ \-v\ 1.0.0\-preview4\f[]
.SH AUTHORS
mairaw.

View file

@ -0,0 +1,38 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet msbuild command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet msbuild
.PP
.SH NAME
.PP
\f[C]dotnet\ msbuild\f[] \- Builds a project and all of its dependencies.
.SH SYNOPSIS
.PP
\f[C]dotnet\ msbuild\ <msbuild_arguments>\ [\-h]\f[]
.SH DESCRIPTION
.PP
The \f[C]dotnet\ msbuild\f[] command allows access to a fully functional MSBuild.
.PP
The command has the exact same capabilities as existing MSBuild command\-line client.
The options are all the same.
Use the MSBuild Command\-Line Reference to obtain information on the available options.
.SH EXAMPLES
.PP
Build a project and its dependencies:
.PP
\f[C]dotnet\ msbuild\f[]
.PP
Build a project and its dependencies using Release configuration:
.PP
\f[C]dotnet\ msbuild\ /p:Configuration=Release\f[]
.PP
Run the publish target and publish for the \f[C]osx.10.11\-x64\f[] RID:
.PP
\f[C]dotnet\ msbuild\ /t:Publish\ /p:RuntimeIdentifiers=osx.10.11\-x64\f[]
.PP
See the whole project with all targets included by the SDK:
.PP
\f[C]dotnet\ msbuild\ /pp\f[]
.SH AUTHORS
mairaw.

View file

@ -1,81 +1,588 @@
.\" Automatically generated by Pandoc 1.15.1
.\"t
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet new command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.TH "DOTNET\-NEW" "1" "June 2016" "" ""
.SS NAME
.SH dotnet new
.PP
dotnet\-new \-\- Create a new sample .NET Core project
.SS SYNOPSIS
.SH NAME
.PP
dotnet new [\-\-type] [\-\-lang]
.SS DESCRIPTION
\f[C]dotnet\ new\f[] \- Creates a new project, configuration file, or solution based on the specified template.
.SH SYNOPSIS
.SS .NET Core 2.0
.IP
.nf
\f[C]
dotnet\ new\ <TEMPLATE>\ [\-\-force]\ [\-i|\-\-install]\ [\-lang|\-\-language]\ [\-n|\-\-name]\ [\-o|\-\-output]\ [\-u|\-\-uninstall]\ [Template\ options]
dotnet\ new\ <TEMPLATE>\ [\-l|\-\-list]\ [\-\-type]
dotnet\ new\ [\-h|\-\-help]
\f[]
.fi
.SS .NET Core 1.x
.IP
.nf
\f[C]
dotnet\ new\ <TEMPLATE>\ [\-lang|\-\-language]\ [\-n|\-\-name]\ [\-o|\-\-output]\ [\-all|\-\-show\-all]\ [\-h|\-\-help]\ [Template\ options]
dotnet\ new\ <TEMPLATE>\ [\-l|\-\-list]
dotnet\ new\ [\-all|\-\-show\-all]
dotnet\ new\ [\-h|\-\-help]
\f[]
.fi
.PP
The \f[C]dotnet\ new\f[] command provides a convenient way to initialize
a valid .NET Core project and sample source code to try out the Command
Line Interface (CLI) toolset.
* * * * *
.SH DESCRIPTION
.PP
This command is invoked in the context of a directory.
When invoked, the command will result in two main artifacts being
dropped to the directory:
.IP "1." 3
A \f[C]Program.cs\f[] (or \f[C]Program.fs\f[]) file that contains a
sample "Hello World" program.
.IP "2." 3
A valid \f[C]project.json\f[] file.
The \f[C]dotnet\ new\f[] command provides a convenient way to initialize a valid .NET Core project.
.PP
After this, the project is ready to be compiled and/or edited further.
.SS Options
The command calls the template engine to create the artifacts on disk based on the specified template and options.
.SS Arguments
.PP
\f[C]\-l\f[], \f[C]\-\-lang\ [C#|F#]\f[]
\f[C]TEMPLATE\f[]
.PP
Language of the project.
Defaults to \f[C]C#\f[].
\f[C]csharp\f[] (\f[C]fsharp\f[]) or \f[C]cs\f[] (\f[C]fs\f[]) are also
valid options.
The template to instantiate when the command is invoked.
Each template might have specific options you can pass.
For more information, see Template options.
.SS .NET Core 2.0
.PP
\f[C]\-t\f[], \f[C]\-\-type\f[]
The command contains a default list of templates.
Use \f[C]dotnet\ new\ \-l\f[] to obtain a list of the available templates.
The following table shows the templates that come pre\-installed with the .NET Core 2.0 SDK.
The default language for the template is shown inside the brackets.
.PP
Type of the project.
Valid values for C# are:
.IP \[bu] 2
.TS
tab(@);
l l l.
T{
Template description
T}@T{
Template name
T}@T{
Languages
T}
_
T{
Console application
T}@T{
\f[C]console\f[]
.IP \[bu] 2
T}@T{
[C#], F#, VB
T}
T{
Class library
T}@T{
\f[C]classlib\f[]
T}@T{
[C#], F#, VB
T}
T{
Unit test project
T}@T{
\f[C]mstest\f[]
T}@T{
[C#], F#, VB
T}
T{
xUnit test project
T}@T{
\f[C]xunit\f[]
T}@T{
[C#], F#, VB
T}
T{
ASP.NET Core empty
T}@T{
\f[C]web\f[]
.IP \[bu] 2
\f[C]lib\f[]
.IP \[bu] 2
\f[C]xunittest\f[]
T}@T{
[C#], F#
T}
T{
ASP.NET Core Web App (Model\-View\-Controller)
T}@T{
\f[C]mvc\f[]
T}@T{
[C#], F#
T}
T{
ASP.NET Core Web App
T}@T{
\f[C]razor\f[]
T}@T{
[C#]
T}
T{
ASP.NET Core with Angular
T}@T{
\f[C]angular\f[]
T}@T{
[C#]
T}
T{
ASP.NET Core with React.js
T}@T{
\f[C]react\f[]
T}@T{
[C#]
T}
T{
ASP.NET Core with React.js and Redux
T}@T{
\f[C]reactredux\f[]
T}@T{
[C#]
T}
T{
ASP.NET Core Web API
T}@T{
\f[C]webapi\f[]
T}@T{
[C#], F#
T}
T{
global.json file
T}@T{
\f[C]globaljson\f[]
T}@T{
T}
T{
Nuget config
T}@T{
\f[C]nugetconfig\f[]
T}@T{
T}
T{
Web config
T}@T{
\f[C]webconfig\f[]
T}@T{
T}
T{
Solution file
T}@T{
\f[C]sln\f[]
T}@T{
T}
T{
Razor page
T}@T{
\f[C]page\f[]
T}@T{
T}
T{
MVC ViewImports
T}@T{
\f[C]viewimports\f[]
T}@T{
T}
T{
MVC ViewStart
T}@T{
\f[C]viewstart\f[]
T}@T{
T}
.TE
.SS .NET Core 1.x
.PP
Valid values for F# are:
.IP \[bu] 2
The command contains a default list of templates.
Use \f[C]dotnet\ new\ \-all\f[] to obtain a list of the available templates.
The following table shows the templates that come pre\-installed with the .NET Core 1.x SDK.
The default language for the template is shown inside the brackets.
.PP
.TS
tab(@);
l l l.
T{
Template description
T}@T{
Template name
T}@T{
Languages
T}
_
T{
Console application
T}@T{
\f[C]console\f[]
.SS EXAMPLES
T}@T{
[C#], F#
T}
T{
Class library
T}@T{
\f[C]classlib\f[]
T}@T{
[C#], F#
T}
T{
Unit test project
T}@T{
\f[C]mstest\f[]
T}@T{
[C#], F#
T}
T{
xUnit test project
T}@T{
\f[C]xunit\f[]
T}@T{
[C#], F#
T}
T{
ASP.NET Core empty
T}@T{
\f[C]web\f[]
T}@T{
[C#]
T}
T{
ASP.NET Core Web App
T}@T{
\f[C]mvc\f[]
T}@T{
[C#], F#
T}
T{
ASP.NET Core Web API
T}@T{
\f[C]webapi\f[]
T}@T{
[C#]
T}
T{
Nuget config
T}@T{
\f[C]nugetconfig\f[]
T}@T{
T}
T{
Web config
T}@T{
\f[C]webconfig\f[]
T}@T{
T}
T{
Solution file
T}@T{
\f[C]sln\f[]
T}@T{
T}
.TE
.PP
\f[C]dotnet\ new\f[]
.IP
.nf
\f[C]
Drops\ a\ sample\ C##\ project\ in\ the\ current\ directory.
\f[]
.fi
* * * * *
.SH OPTIONS
.SS .NET Core 2.0
.PP
\f[C]dotnet\ new\ \-\-lang\ f##\f[]
.IP
.nf
\f[C]
Drops\ a\ sample\ F##\ project\ in\ the\ current\ directory.
\f[]
.fi
\f[C]\-\-force\f[]
.PP
\f[C]dotnet\ new\ \-\-lang\ c##\f[]
.IP
.nf
\f[C]
Drops\ a\ sample\ C##\ project\ in\ the\ current\ directory.
\f[]
.fi
.SH SEE ALSO
Forces content to be generated even if it would change existing files.
This is required when the output directory already contains a project.
.PP
dotnet\-run(1)
\f[C]\-h|\-\-help\f[]
.PP
Prints out help for the command.
It can be invoked for the \f[C]dotnet\ new\f[] command itself or for any template, such as \f[C]dotnet\ new\ mvc\ \-\-help\f[].
.PP
\f[C]\-i|\-\-install\ <PATH|NUGET_ID>\f[]
.PP
Installs a source or template pack from the \f[C]PATH\f[] or \f[C]NUGET_ID\f[] provided.
If you want to install a prerelease version of a template package, you need to specify the version in the format of \f[C]<package\-name>::<package\-version>\f[].
By default, \f[C]dotnet\ new\f[] passes * for the version, which represents the last stable package version.
See an example at the Examples section.
.PP
For information on creating custom templates, see Custom templates for dotnet new.
.PP
\f[C]\-l|\-\-list\f[]
.PP
Lists templates containing the specified name.
If invoked for the \f[C]dotnet\ new\f[] command, it lists the possible templates available for the given directory.
For example if the directory already contains a project, it doesn't list all project templates.
.PP
\f[C]\-lang|\-\-language\ {C#|F#|VB}\f[]
.PP
The language of the template to create.
The language accepted varies by the template (see defaults in the arguments section).
Not valid for some templates.
.PP
\f[C]\-n|\-\-name\ <OUTPUT_NAME>\f[]
.PP
The name for the created output.
If no name is specified, the name of the current directory is used.
.PP
\f[C]\-o|\-\-output\ <OUTPUT_DIRECTORY>\f[]
.PP
Location to place the generated output.
The default is the current directory.
.PP
\f[C]\-\-type\f[]
.PP
Filters templates based on available types.
Predefined values are \[lq]project\[rq], \[lq]item\[rq] or \[lq]other\[rq].
.PP
\f[C]\-u|\-\-uninstall\ <PATH|NUGET_ID>\f[]
.PP
Uninstalls a source or template pack at the \f[C]PATH\f[] or \f[C]NUGET_ID\f[] provided.
.RS
.PP
[!NOTE] To uninstall a template using a \f[C]PATH\f[], you need to fully qualify the path.
For example, \f[I]C:/Users/<USER>/Documents/Templates/GarciaSoftware.ConsoleTemplate.CSharp\f[] will work, but \f[I]./GarciaSoftware.ConsoleTemplate.CSharp\f[] from the containing folder will not.
Additionally, do not include a final terminating directory slash on your template path.
.RE
.SS .NET Core 1.x
.PP
\f[C]\-all|\-\-show\-all\f[]
.PP
Shows all templates for a specific type of project when running in the context of the \f[C]dotnet\ new\f[] command alone.
When running in the context of a specific template, such as \f[C]dotnet\ new\ web\ \-all\f[], \f[C]\-all\f[] is interpreted as a force creation flag.
This is required when the output directory already contains a project.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out help for the command.
It can be invoked for the \f[C]dotnet\ new\f[] command itself or for any template, such as \f[C]dotnet\ new\ mvc\ \-\-help\f[].
.PP
\f[C]\-l|\-\-list\f[]
.PP
Lists templates containing the specified name.
If invoked for the \f[C]dotnet\ new\f[] command, it lists the possible templates available for the given directory.
For example if the directory already contains a project, it doesn't list all project templates.
.PP
\f[C]\-lang|\-\-language\ {C#|F#}\f[]
.PP
The language of the template to create.
The language accepted varies by the template (see defaults in the arguments section).
Not valid for some templates.
.PP
\f[C]\-n|\-\-name\ <OUTPUT_NAME>\f[]
.PP
The name for the created output.
If no name is specified, the name of the current directory is used.
.PP
\f[C]\-o|\-\-output\ <OUTPUT_DIRECTORY>\f[]
.PP
Location to place the generated output.
The default is the current directory.
.PP
* * * * *
.SS Template options
.PP
Each project template may have additional options available.
The core templates have the following additional options:
.SS .NET Core 2.0
.PP
\f[B]console, angular, react, reactredux\f[]
.PP
\f[C]\-\-no\-restore\f[] \- Doesn't perform an implicit restore during project creation.
.PP
\f[B]classlib\f[]
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[] \- Specifies the framework to target.
Values: \f[C]netcoreapp2.0\f[] to create a .NET Core Class Library or \f[C]netstandard2.0\f[] to create a .NET Standard Class Library.
The default value is \f[C]netstandard2.0\f[].
.PP
\f[C]\-\-no\-restore\f[] \- Doesn't perform an implicit restore during project creation.
.PP
\f[B]mstest, xunit\f[]
.PP
\f[C]\-p|\-\-enable\-pack\f[] \- Enables packaging for the project using dotnet pack.
.PP
\f[C]\-\-no\-restore\f[] \- Doesn't perform an implicit restore during project creation.
.PP
\f[B]globaljson\f[]
.PP
\f[C]\-\-sdk\-version\ <VERSION_NUMBER>\f[] \- Specifies the version of the .NET Core SDK to use in the \f[I]global.json\f[] file.
.PP
\f[B]web\f[]
.PP
\f[C]\-\-use\-launch\-settings\f[] \- Includes \f[I]launchSettings.json\f[] in the generated template output.
.PP
\f[C]\-\-no\-restore\f[] \- Doesn't perform an implicit restore during project creation.
.PP
\f[B]webapi\f[]
.PP
\f[C]\-au|\-\-auth\ <AUTHENTICATION_TYPE>\f[] \- The type of authentication to use.
The possible values are:
.IP \[bu] 2
\f[C]None\f[] \- No authentication (Default).
.IP \[bu] 2
\f[C]IndividualB2C\f[] \- Individual authentication with Azure AD B2C.
.IP \[bu] 2
\f[C]SingleOrg\f[] \- Organizational authentication for a single tenant.
.IP \[bu] 2
\f[C]Windows\f[] \- Windows authentication.
.PP
\f[C]\-\-aad\-b2c\-instance\ <INSTANCE>\f[] \- The Azure Active Directory B2C instance to connect to.
Use with \f[C]IndividualB2C\f[] authentication.
The default value is \f[C]https://login.microsoftonline.com/tfp/\f[].
.PP
\f[C]\-ssp|\-\-susi\-policy\-id\ <ID>\f[] \- The sign\-in and sign\-up policy ID for this project.
Use with \f[C]IndividualB2C\f[] authentication.
.PP
\f[C]\-\-aad\-instance\ <INSTANCE>\f[] \- The Azure Active Directory instance to connect to.
Use with \f[C]SingleOrg\f[] authentication.
The default value is \f[C]https://login.microsoftonline.com/\f[].
.PP
\f[C]\-\-client\-id\ <ID>\f[] \- The Client ID for this project.
Use with \f[C]IndividualB2C\f[] or \f[C]SingleOrg\f[] authentication.
The default value is \f[C]11111111\-1111\-1111\-11111111111111111\f[].
.PP
\f[C]\-\-domain\ <DOMAIN>\f[] \- The domain for the directory tenant.
Use with \f[C]SingleOrg\f[] or \f[C]IndividualB2C\f[] authentication.
The default value is \f[C]qualified.domain.name\f[].
.PP
\f[C]\-\-tenant\-id\ <ID>\f[] \- The TenantId ID of the directory to connect to.
Use with \f[C]SingleOrg\f[] authentication.
The default value is \f[C]22222222\-2222\-2222\-2222\-222222222222\f[].
.PP
\f[C]\-r|\-\-org\-read\-access\f[] \- Allows this application read\-access to the directory.
Only applies to \f[C]SingleOrg\f[] or \f[C]MultiOrg\f[] authentication.
.PP
\f[C]\-\-use\-launch\-settings\f[] \- Includes \f[I]launchSettings.json\f[] in the generated template output.
.PP
\f[C]\-uld|\-\-use\-local\-db\f[] \- Specifies LocalDB should be used instead of SQLite.
Only applies to \f[C]Individual\f[] or \f[C]IndividualB2C\f[] authentication.
.PP
\f[C]\-\-no\-restore\f[] \- Doesn't perform an implicit restore during project creation.
.PP
\f[B]mvc, razor\f[]
.PP
\f[C]\-au|\-\-auth\ <AUTHENTICATION_TYPE>\f[] \- The type of authentication to use.
The possible values are:
.IP \[bu] 2
\f[C]None\f[] \- No authentication (Default).
.IP \[bu] 2
\f[C]Individual\f[] \- Individual authentication.
.IP \[bu] 2
\f[C]IndividualB2C\f[] \- Individual authentication with Azure AD B2C.
.IP \[bu] 2
\f[C]SingleOrg\f[] \- Organizational authentication for a single tenant.
.IP \[bu] 2
\f[C]MultiOrg\f[] \- Organizational authentication for multiple tenants.
.IP \[bu] 2
\f[C]Windows\f[] \- Windows authentication.
.PP
\f[C]\-\-aad\-b2c\-instance\ <INSTANCE>\f[] \- The Azure Active Directory B2C instance to connect to.
Use with \f[C]IndividualB2C\f[] authentication.
The default value is \f[C]https://login.microsoftonline.com/tfp/\f[] .
.PP
\f[C]\-ssp|\-\-susi\-policy\-id\ <ID>\f[] \- The sign\-in and sign\-up policy ID for this project.
Use with \f[C]IndividualB2C\f[] authentication.
.PP
\f[C]\-rp|\-\-reset\-password\-policy\-id\ <ID>\f[] \- The reset password policy ID for this project.
Use with \f[C]IndividualB2C\f[] authentication.
.PP
\f[C]\-ep|\-\-edit\-profile\-policy\-id\ <ID>\f[] \- The edit profile policy ID for this project.
Use with \f[C]IndividualB2C\f[] authentication.
.PP
\f[C]\-\-aad\-instance\ <INSTANCE>\f[] \- The Azure Active Directory instance to connect to.
Use with \f[C]SingleOrg\f[] or \f[C]MultiOrg\f[] authentication.
The default value is \f[C]https://login.microsoftonline.com/\f[].
.PP
\f[C]\-\-client\-id\ <ID>\f[] \- The Client ID for this project.
Use with \f[C]IndividualB2C\f[], \f[C]SingleOrg\f[], or \f[C]MultiOrg\f[] authentication.
The default value is \f[C]11111111\-1111\-1111\-11111111111111111\f[].
.PP
\f[C]\-\-domain\ <DOMAIN>\f[] \- The domain for the directory tenant.
Use with \f[C]SingleOrg\f[] or \f[C]IndividualB2C\f[] authentication..
The default value is \f[C]qualified.domain.name\f[].
.PP
\f[C]\-\-tenant\-id\ <ID>\f[] \- The TenantId ID of the directory to connect to.
Use with \f[C]SingleOrg\f[] authentication..
The default value is \f[C]22222222\-2222\-2222\-2222\-222222222222\f[].
.PP
\f[C]\-\-callback\-path\ <PATH>\f[] \- The request path within the application's base path of the redirect URI.
Use with \f[C]SingleOrg\f[] or \f[C]IndividualB2C\f[] authentication..
The default value is \f[C]/signin\-oidc\f[].
.PP
\f[C]\-r|\-\-org\-read\-access\f[] \- Allows this application read\-access to the directory.
Only applies to \f[C]SingleOrg\f[] or \f[C]MultiOrg\f[] authentication.
.PP
\f[C]\-\-use\-launch\-settings\f[] \- Includes \f[I]launchSettings.json\f[] in the generated template output.
.PP
\f[C]\-\-use\-browserlink\f[] \- Includes BrowserLink in the project.
.PP
\f[C]\-uld|\-\-use\-local\-db\f[] \- Specifies LocalDB should be used instead of SQLite.
Only applies to \f[C]Individual\f[] or \f[C]IndividualB2C\f[] authentication.
.PP
\f[C]\-\-no\-restore\f[] \- Doesn't perform an implicit restore during project creation.
.PP
\f[B]page\f[]
.PP
\f[C]\-na|\-\-namespace\ <NAMESPACE_NAME>\f[]\- Namespace for the generated code.
The default value is \f[C]MyApp.Namespace\f[].
.PP
\f[C]\-np|\-\-no\-pagemodel\f[] \- Creates the page without a PageModel.
.PP
\f[B]viewimports\f[]
.PP
\f[C]\-na|\-\-namespace\ <NAMESPACE_NAME>\f[]\- Namespace for the generated code.
The default value is \f[C]MyApp.Namespace\f[].
.SS .NET Core 1.x
.PP
\f[B]console, xunit, mstest, web, webapi\f[]
.PP
\f[C]\-f|\-\-framework\f[] \- Specifies the framework to target.
Values: \f[C]netcoreapp1.0\f[] or \f[C]netcoreapp1.1\f[].
The default value is \f[C]netcoreapp1.0\f[].
.PP
\f[B]classlib\f[]
.PP
\f[C]\-f|\-\-framework\f[] \- Specifies the framework to target.
Values: \f[C]netcoreapp1.0\f[], \f[C]netcoreapp1.1\f[], or \f[C]netstandard1.0\f[] to \f[C]netstandard1.6\f[].
The default value is \f[C]netstandard1.4\f[].
.PP
\f[B]mvc\f[]
.PP
\f[C]\-f|\-\-framework\f[] \- Specifies the framework to target.
Values: \f[C]netcoreapp1.0\f[] or \f[C]netcoreapp1.1\f[].
The default value is \f[C]netcoreapp1.0\f[].
.PP
\f[C]\-au|\-\-auth\f[] \- The type of authentication to use.
Values: \f[C]None\f[] or \f[C]Individual\f[].
The default value is \f[C]None\f[].
.PP
\f[C]\-uld|\-\-use\-local\-db\f[] \- Specifies whether or not to use LocalDB instead of SQLite.
Values: \f[C]true\f[] or \f[C]false\f[].
The default value is \f[C]false\f[].
.PP
* * * * *
.SH EXAMPLES
.PP
Create an F# console application project in the current directory:
.PP
\f[C]dotnet\ new\ console\ \-lang\ f#\f[]
.PP
Create a .NET Standard class library project in the specified directory (available only with .NET Core 2.0 SDK or later versions):
.PP
\f[C]dotnet\ new\ classlib\ \-lang\ VB\ \-o\ MyLibrary\f[]
.PP
Create a new ASP.NET Core C# MVC application project in the current directory with no authentication targeting .NET Core 2.0:
.PP
\f[C]dotnet\ new\ mvc\ \-au\ None\ \-f\ netcoreapp2.0\f[]
.PP
Create a new xUnit application targeting .NET Core 2.0:
.PP
\f[C]dotnet\ new\ xunit\ \-\-framework\ netcoreapp2.0\f[]
.PP
List all templates available for MVC:
.PP
\f[C]dotnet\ new\ mvc\ \-l\f[]
.PP
Install version 2.0 of the Single Page Application templates for ASP.NET Core (command option available for .NET Core SDK 1.1 and later versions only):
.PP
\f[C]dotnet\ new\ \-i\ Microsoft.DotNet.Web.Spa.ProjectTemplates::2.0.0\f[]
.SS See also
.PP
Custom templates for dotnet new
.PD 0
.P
.PD
Create a custom template for dotnet new
.PD 0
.P
.PD
dotnet/dotnet\-template\-samples GitHub repo
.PD 0
.P
.PD
Available templates for dotnet new
.SH AUTHORS
Microsoft Corporation dotnetclifeedback\@microsoft.com.
mairaw.

View file

@ -0,0 +1,59 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet nuget delete command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet nuget delete
.PP
.SH NAME
.PP
\f[C]dotnet\ nuget\ delete\f[] \- Deletes or unlists a package from the server.
.SH SYNOPSIS
.PP
\f[C]dotnet\ nuget\ delete\ [<PACKAGE_NAME>\ <PACKAGE_VERSION>]\ [\-s|\-\-source]\ [\-\-non\-interactive]\ [\-k|\-\-api\-key]\ [\-\-force\-english\-output]\ [\-h|\-\-help]\f[]
.SH DESCRIPTION
.PP
The \f[C]dotnet\ nuget\ delete\f[] command deletes or unlists a package from the server.
For nuget.org, the action is to unlist the package.
.SS Arguments
.PP
\f[C]PACKAGE_NAME\f[]
.PP
Package to delete.
.PP
\f[C]PACKAGE_VERSION\f[]
.PP
Version of the package to delete.
.SH OPTIONS
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-s|\-\-source\ <SOURCE>\f[]
.PP
Specifies the server URL.
Supported URLs for nuget.org include \f[C]http://www.nuget.org\f[], \f[C]http://www.nuget.org/api/v3\f[], and \f[C]http://www.nuget.org/api/v2/package\f[].
For private feeds, substitute the host name (for example, \f[C]%hostname%/api/v3\f[]).
.PP
\f[C]\-\-non\-interactive\f[]
.PP
Doesn't prompt for user input or confirmations.
.PP
\f[C]\-k|\-\-api\-key\ <API_KEY>\f[]
.PP
The API key for the server.
.PP
\f[C]\-\-force\-english\-output\f[]
.PP
Forces command\-line output in English.
.SH EXAMPLES
.PP
Deletes version 1.0 of package \f[C]Microsoft.AspNetCore.Mvc\f[]:
.PP
\f[C]dotnet\ nuget\ delete\ Microsoft.AspNetCore.Mvc\ 1.0\f[]
.PP
Deletes version 1.0 of package \f[C]Microsoft.AspNetCore.Mvc\f[], not prompting user for credentials or other input:
.PP
\f[C]dotnet\ nuget\ delete\ Microsoft.AspNetCore.Mvc\ 1.0\ \-\-non\-interactive\f[]
.SH AUTHORS
karann\-msft.

View file

@ -0,0 +1,77 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet nuget locals command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet nuget locals
.PP
.SH NAME
.PP
\f[C]dotnet\ nuget\ locals\f[] \- Clears or lists local NuGet resources.
.SH SYNOPSIS
.PP
\f[C]dotnet\ nuget\ locals\ <CACHE_LOCATION>\ [(\-c|\-\-clear)|(\-l|\-\-list)]\ [\-\-force\-english\-output]\ [\-h|\-\-help]\f[]
.SH DESCRIPTION
.PP
The \f[C]dotnet\ nuget\ locals\f[] command clears or lists local NuGet resources in the http\-request cache, temporary cache, or machine\-wide global packages folder.
.SS Arguments
.PP
\f[C]CACHE_LOCATION\f[]
.PP
One of the following values:
.IP \[bu] 2
\f[C]all\f[] \- Indicates that the specified operation is applied to all cache types: http\-request cache, global packages cache, and the temporary cache.
.IP \[bu] 2
\f[C]http\-cache\f[] \- Indicates that the specified operation is applied only to the http\-request cache.
The other cache locations are not affected.
.IP \[bu] 2
\f[C]global\-packages\f[] \- Indicates that the specified operation is applied only to the global packages cache.
The other cache locations are not affected.
.IP \[bu] 2
\f[C]temp\f[] \- Indicates that the specified operation is applied only to the temporary cache.
The other cache locations are not affected.
.SH OPTIONS
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-c|\-\-clear\f[]
.PP
The clear option performs a clear operation on the specified cache type.
The contents of the cache directories are deleted recursively.
The executing user/group must have permission to the files in the cache directories.
If not, an error is displayed indicating the files/folders which were not cleared.
.PP
\f[C]\-l|\-\-list\f[]
.PP
The list option is used to display the location of the specified cache type.
.PP
\f[C]\-\-force\-english\-output\f[]
.PP
Forces command\-line output in English.
.SH EXAMPLES
.PP
Displays the paths of all the local cache directories (http\-cache directory, global\-packages cache directory, and temporary cache directory):
.PP
\f[C]dotnet\ nuget\ locals\ \[en]l\ all\f[]
.PP
Displays the path for the local http\-cache directory:
.PP
\f[C]dotnet\ nuget\ locals\ \-\-list\ http\-cache\f[]
.PP
Clears all files from all local cache directories (http\-cache directory, global\-packages cache directory, and temporary cache directory):
.PP
\f[C]dotnet\ nuget\ locals\ \-\-clear\ all\f[]
.PP
Clears all files in local global\-packages cache directory:
.PP
\f[C]dotnet\ nuget\ locals\ \-c\ global\-packages\f[]
.PP
Clears all files in local temporary cache directory:
.PP
\f[C]dotnet\ nuget\ locals\ \-c\ temp\f[]
.SS Troubleshooting
.PP
For information on common problems and errors while using the \f[C]dotnet\ nuget\ locals\f[] command, see Managing the NuGet cache.
.SH AUTHORS
karann\-msft.

View file

@ -0,0 +1,94 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet nuget push command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet nuget push
.PP
.SH NAME
.PP
\f[C]dotnet\ nuget\ push\f[] \- Pushes a package to the server and publishes it.
.SH SYNOPSIS
.PP
\f[C]dotnet\ nuget\ push\ [<ROOT>]\ [\-s|\-\-source]\ [\-ss|\-\-symbol\-source]\ [\-t|\-\-timeout]\ [\-k|\-\-api\-key]\ [\-sk|\-\-symbol\-api\-key]\ [\-d|\-\-disable\-buffering]\ [\-n|\-\-no\-symbols]\ [\-\-force\-english\-output]\ [\-h|\-\-help]\f[]
.SH DESCRIPTION
.PP
The \f[C]dotnet\ nuget\ push\f[] command pushes a package to the server and publishes it.
The push command uses server and credential details found in the system's NuGet config file or chain of config files.
For more information on config files, see Configuring NuGet Behavior.
NuGet's default configuration is obtained by loading \f[I]%AppData%.config\f[] (Windows) or \f[I]$HOME/.local/share\f[] (Linux/macOS), then loading any \f[I]nuget.config\f[] or \f[I].nuget.config\f[] starting from the root of drive and ending in the current directory.
.SS Arguments
.PP
\f[C]ROOT\f[]
.PP
Specifies the file path to the package to be pushed.
.SH OPTIONS
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-s|\-\-source\ <SOURCE>\f[]
.PP
Specifies the server URL.
This option is required unless \f[C]DefaultPushSource\f[] config value is set in the NuGet config file.
.PP
\f[C]\-\-symbol\-source\ <SOURCE>\f[]
.PP
Specifies the symbol server URL.
.PP
\f[C]\-t|\-\-timeout\ <TIMEOUT>\f[]
.PP
Specifies the timeout for pushing to a server in seconds.
Defaults to 300 seconds (5 minutes).
Specifying 0 (zero seconds) applies the default value.
.PP
\f[C]\-k|\-\-api\-key\ <API_KEY>\f[]
.PP
The API key for the server.
.PP
\f[C]\-\-symbol\-api\-key\ <API_KEY>\f[]
.PP
The API key for the symbol server.
.PP
\f[C]\-d|\-\-disable\-buffering\f[]
.PP
Disables buffering when pushing to an HTTP(S) server to decrease memory usage.
.PP
\f[C]\-n|\-\-no\-symbols\f[]
.PP
Doesn't push symbols (even if present).
.PP
\f[C]\-\-force\-english\-output\f[]
.PP
Forces all logged output in English.
.SH EXAMPLES
.PP
Pushes \f[I]foo.nupkg\f[] to the default push source, providing an API key:
.PP
\f[C]dotnet\ nuget\ push\ foo.nupkg\ \-k\ 4003d786\-cc37\-4004\-bfdf\-c4f3e8ef9b3a\f[]
.PP
Push \f[I]foo.nupkg\f[] to the custom push source \f[C]http://customsource\f[], providing an API key:
.PP
\f[C]dotnet\ nuget\ push\ foo.nupkg\ \-k\ 4003d786\-cc37\-4004\-bfdf\-c4f3e8ef9b3a\ \-s\ http://customsource/\f[]
.PP
Pushes \f[I]foo.nupkg\f[] to the default push source:
.PP
\f[C]dotnet\ nuget\ push\ foo.nupkg\f[]
.PP
Pushes \f[I]foo.symbols.nupkg\f[] to the default symbols source:
.PP
\f[C]dotnet\ nuget\ push\ foo.symbols.nupkg\f[]
.PP
Pushes \f[I]foo.nupkg\f[] to the default push source, specifying a 360 second timeout:
.PP
\f[C]dotnet\ nuget\ push\ foo.nupkg\ \-\-timeout\ 360\f[]
.PP
Pushes all \f[I].nupkg\f[] files in the current directory to the default push source:
.PP
\f[C]dotnet\ nuget\ push\ *.nupkg\f[]
.PP
Pushes all \f[I].nupkg\f[] files in the current directory to the default push source, specifying a custom config file \f[I]./config/My.Config\f[]:
.PP
\f[C]dotnet\ nuget\ push\ *.nupkg\ \-\-config\-file\ ./config/My.Config\f[]
.SH AUTHORS
karann\-msft.

View file

@ -1,91 +1,190 @@
.\" Automatically generated by Pandoc 1.15.1
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet pack command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.TH "DOTNET\-PACK" "1" "June 2016" "" ""
.SS NAME
.SH dotnet pack
.PP
\f[C]dotnet\-pack\f[] \- Packs the code into a NuGet package
.SS SYNOPSIS
.SH NAME
.PP
\f[C]dotnet\ pack\ [\-\-output]\ \ \ \ \ \ \ [\-\-no\-build]\ [\-\-build\-base\-path]\ \ \ \ \ \ \ [\-\-configuration]\ \ [\-\-version\-suffix]\ \ \ \ \ [<project>]\f[]
.SS DESCRIPTION
.PP
The \f[C]dotnet\ pack\f[] command builds the project and creates NuGet
packages.
The result of this operation is two packages with the \f[C]nupkg\f[]
extension.
One package contains the code and the other contains the debug symbols.
.PP
NuGet dependencies of the project being packed are added to the nuspec
file, so they are able to be resolved when the package is installed.
Project\-to\-project references are not packaged inside the project by
default.
If you wish to do this, you need to reference the required project in
your dependencies node with a \f[C]type\f[] set to "build" like in the
following example:
\f[C]dotnet\ pack\f[] \- Packs the code into a NuGet package.
.SH SYNOPSIS
.SS .NET Core 2.x
.IP
.nf
\f[C]
{
\ \ \ \ "version":\ "1.0.0\-*",
\ \ \ \ "dependencies":\ {
\ \ \ \ \ \ \ \ "ProjectA":\ {
\ \ \ \ \ \ \ \ \ \ \ \ "target":\ "project",
\ \ \ \ \ \ \ \ \ \ \ \ "type":\ "build"
\ \ \ \ \ \ \ \ }
\ \ \ \ }
}
dotnet\ pack\ [<PROJECT>]\ [\-c|\-\-configuration]\ [\-\-force]\ [\-\-include\-source]\ [\-\-include\-symbols]\ [\-\-no\-build]\ [\-\-no\-dependencies]
\ \ \ \ [\-\-no\-restore]\ [\-o|\-\-output]\ [\-\-runtime]\ [\-s|\-\-serviceable]\ [\-v|\-\-verbosity]\ [\-\-version\-suffix]
dotnet\ pack\ [\-h|\-\-help]
\f[]
.fi
.SS .NET Core 1.x
.IP
.nf
\f[C]
dotnet\ pack\ [<PROJECT>]\ [\-c|\-\-configuration]\ [\-\-include\-source]\ [\-\-include\-symbols]\ [\-\-no\-build]\ [\-o|\-\-output]\ [\-s|\-\-serviceable]\ [\-v|\-\-verbosity]\ [\-\-version\-suffix]
dotnet\ pack\ [\-h|\-\-help]
\f[]
.fi
.PP
\f[C]dotnet\ pack\f[] by default first builds the project.
If you wish to avoid this, pass the \f[C]\-\-no\-build\f[] option.
This can be useful in Continuous Integration (CI) build scenarios in
which you know the code was just previously built, for example.
.SS OPTIONS
* * * * *
.SH DESCRIPTION
.PP
\f[C][project]\f[]
The \f[C]dotnet\ pack\f[] command builds the project and creates NuGet packages.
The result of this command is a NuGet package.
If the \f[C]\-\-include\-symbols\f[] option is present, another package containing the debug symbols is created.
.PP
NuGet dependencies of the packed project are added to the \f[I].nuspec\f[] file, so they're properly resolved when the package is installed.
Project\-to\-project references aren't packaged inside the project.
Currently, you must have a package per project if you have project\-to\-project dependencies.
.PP
By default, \f[C]dotnet\ pack\f[] builds the project first.
If you wish to avoid this behavior, pass the \f[C]\-\-no\-build\f[] option.
This is often useful in Continuous Integration (CI) build scenarios where you know the code was previously built.
.PP
You can provide MSBuild properties to the \f[C]dotnet\ pack\f[] command for the packing process.
For more information, see NuGet metadata properties and the MSBuild Command\-Line Reference.
The Examples section shows how to use the MSBuild /p switch for a couple of different scenarios.
.PP
.SS Arguments
.PP
\f[C]PROJECT\f[]
.PP
The project to pack.
It can be either a path to a \f[C]project.json\f[] file or to a
directory.
If omitted, it will default to the current directory.
It's either a path to a csproj file or to a directory.
If omitted, it defaults to the current directory.
.SH OPTIONS
.SS .NET Core 2.x
.PP
\f[C]\-o\f[], \f[C]\-\-output\f[] [DIR]
\f[C]\-c|\-\-configuration\ {Debug|Release}\f[]
.PP
Places the built packages in the directory specified.
Defines the build configuration.
The default value is \f[C]Debug\f[].
.PP
\f[C]\-\-force\f[] Forces all dependencies to be resolved even if the last restore was successful.
This is equivalent to deleting the \f[I]project.assets.json\f[] file.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-\-include\-source\f[]
.PP
Includes the source files in the NuGet package.
The sources files are included in the \f[C]src\f[] folder within the \f[C]nupkg\f[].
.PP
\f[C]\-\-include\-symbols\f[]
.PP
Generates the symbols \f[C]nupkg\f[].
.PP
\f[C]\-\-no\-build\f[]
.PP
Skips the building phase of the packing process.
Doesn't build the project before packing.
.PP
\f[C]\-\-build\-base\-path\f[]
\f[C]\-\-no\-dependencies\f[]
.PP
Places the temporary build artifacts in the specified directory.
By default, they go to the obj directory in the current directory.
Ignores project\-to\-project references and only restores the root project.
.PP
\f[C]\-c\f[], \f[C]\-\-configuration\ [Debug|Release]\f[]
\f[C]\-\-no\-restore\f[]
.PP
Configuration to use when building the project.
If not specified, will default to "Debug".
.SS EXAMPLES
Doesn't perform an implicit restore when running the command.
.PP
\f[C]\-o|\-\-output\ <OUTPUT_DIRECTORY>\f[]
.PP
Places the built packages in the directory specified.
.PP
\f[C]\-r|\-\-runtime\ <RUNTIME_IDENTIFIER>\f[]
.PP
Specifies the target runtime to restore packages for.
For a list of Runtime Identifiers (RIDs), see the RID catalog.
.PP
\f[C]\-s|\-\-serviceable\f[]
.PP
Sets the serviceable flag in the package.
For more information, see .NET Blog: .NET 4.5.1 Supports Microsoft Security Updates for .NET NuGet Libraries.
.PP
\f[C]\-\-version\-suffix\ <VERSION_SUFFIX>\f[]
.PP
Defines the value for the \f[C]$(VersionSuffix)\f[] MSBuild property in the project.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
.SS .NET Core 1.x
.PP
\f[C]\-c|\-\-configuration\ {Debug|Release}\f[]
.PP
Defines the build configuration.
The default value is \f[C]Debug\f[].
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-\-include\-source\f[]
.PP
Includes the source files in the NuGet package.
The sources files are included in the \f[C]src\f[] folder within the \f[C]nupkg\f[].
.PP
\f[C]\-\-include\-symbols\f[]
.PP
Generates the symbols \f[C]nupkg\f[].
.PP
\f[C]\-\-no\-build\f[]
.PP
Doesn't build the project before packing.
.PP
\f[C]\-o|\-\-output\ <OUTPUT_DIRECTORY>\f[]
.PP
Places the built packages in the directory specified.
.PP
\f[C]\-s|\-\-serviceable\f[]
.PP
Sets the serviceable flag in the package.
For more information, see .NET Blog: .NET 4.5.1 Supports Microsoft Security Updates for .NET NuGet Libraries.
.PP
\f[C]\-\-version\-suffix\ <VERSION_SUFFIX>\f[]
.PP
Defines the value for the \f[C]$(VersionSuffix)\f[] MSBuild property in the project.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
.PP
* * * * *
.SH EXAMPLES
.PP
Pack the project in the current directory:
.PP
\f[C]dotnet\ pack\f[]
.PP
Packs the current project.
Pack the \f[C]app1\f[] project:
.PP
\f[C]dotnet\ pack\ ~/projects/app1/project.json\f[]
\f[C]dotnet\ pack\ ~/projects/app1/project.csproj\f[]
.PP
Packs the app1 project.
Pack the project in the current directory and place the resulting packages into the \f[C]nupkgs\f[] folder:
.PP
\f[C]dotnet\ pack\ \-\-output\ nupkgs\f[]
.PP
Packs the current application and place the resulting packages into the
specified folder.
Pack the project in the current directory into the \f[C]nupkgs\f[] folder and skip the build step:
.PP
\f[C]dotnet\ pack\ \-\-no\-build\ \-\-output\ nupkgs\f[]
.PP
Packs the current project into the specified folder and skips the build
step.
With the project's version suffix configured as \f[C]<VersionSuffix>$(VersionSuffix)</VersionSuffix>\f[] in the \f[I].csproj\f[] file, pack the current project and update the resulting package version with the given suffix:
.PP
\f[C]dotnet\ pack\ \-\-version\-suffix\ "ci\-1234"\f[]
.PP
Set the package version to \f[C]2.1.0\f[] with the \f[C]PackageVersion\f[] MSBuild property:
.PP
\f[C]dotnet\ pack\ /p:PackageVersion=2.1.0\f[]
.PP
Pack the project for a specific target framework:
.PP
\f[C]dotnet\ pack\ /p:TargetFrameworks=net45\f[]
.PP
Pack the project and use a specific runtime (Windows 10) for the restore operation (.NET Core SDK 2.0 and later versions):
.PP
\f[C]dotnet\ pack\ \-\-runtime\ win10\-x64\f[]
.SH AUTHORS
Microsoft Corporation dotnetclifeedback\@microsoft.com.
mairaw.

View file

@ -1,107 +1,190 @@
.\" Automatically generated by Pandoc 1.15.1
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet publish command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.TH "DOTNET\-PUBLISH" "1" "June 2016" "" ""
.SS NAME
.SH dotnet publish
.PP
\f[C]dotnet\-publish\f[] \- Packs the application and all of its
dependencies into a folder getting it ready for publishing
.SS SYNOPSIS
.SH NAME
.PP
\f[C]dotnet\ publish\ [\-\-framework]\ \ \ \ \ \ \ [\-\-runtime]\ [\-\-build\-base\-path]\ [\-\-output]\ \ \ \ \ \ \ [\-\-version\-suffix]\ [\-\-configuration]\ \ \ \ \ \ \ [<project>]\f[]
.SS DESCRIPTION
\f[C]dotnet\ publish\f[] \- Packs the application and its dependencies into a folder for deployment to a hosting system.
.SH SYNOPSIS
.SS .NET Core 2.x
.IP
.nf
\f[C]
dotnet\ publish\ [<PROJECT>]\ [\-c|\-\-configuration]\ [\-f|\-\-framework]\ [\-\-force]\ [\-\-manifest]\ [\-\-no\-dependencies]\ [\-\-no\-restore]\ [\-o|\-\-output]\ [\-r|\-\-runtime]\ [\-\-self\-contained]\ [\-v|\-\-verbosity]\ [\-\-version\-suffix]
dotnet\ publish\ [\-h|\-\-help]
\f[]
.fi
.SS .NET Core 1.x
.IP
.nf
\f[C]
dotnet\ publish\ [<PROJECT>]\ [\-c|\-\-configuration]\ [\-f|\-\-framework]\ [\-o|\-\-output]\ [\-r|\-\-runtime]\ [\-v|\-\-verbosity]\ [\-\-version\-suffix]
dotnet\ publish\ [\-h|\-\-help]
\f[]
.fi
.PP
\f[C]dotnet\ publish\f[] compiles the application, reads through its
dependencies specified in the \f[C]project.json\f[] file and publishes
the resulting set of files to a directory.
* * * * *
.SH DESCRIPTION
.PP
Depending on the type of portable app, the resulting directory will
contain the following:
.IP "1." 3
\f[B]Portable application\f[] \- application\[aq]s intermediate language
(IL) code and all of application\[aq]s managed dependencies.
.RS 4
\f[C]dotnet\ publish\f[] compiles the application, reads through its dependencies specified in the project file, and publishes the resulting set of files to a directory.
The output will contain the following:
.IP \[bu] 2
\f[B]Portable application with native dependencies\f[] \- same as above
with a sub\-directory for the supported platform of each native
dependency.
.RE
.IP "2." 3
\f[B]Self\-contained application\f[] \- same as above plus the entire
runtime for the targeted platform.
Intermediate Language (IL) code in an assembly with a \f[I]dll\f[] extension.
.IP \[bu] 2
\f[I].deps.json\f[] file that contains all of the dependencies of the project.
.IP \[bu] 2
\f[I].runtime.config.json\f[] file that specifies the shared runtime that the application expects, as well as other configuration options for the runtime (for example, garbage collection type).
.IP \[bu] 2
The application's dependencies.
These are copied from the NuGet cache into the output folder.
.PP
The above types are covered in more details in the types of portable
applications (../../app-types.md) topic.
.SS OPTIONS
The \f[C]dotnet\ publish\f[] command's output is ready for deployment to a hosting system (for example, a server, PC, Mac, laptop) for execution and is the only officially supported way to prepare the application for deployment.
Depending on the type of deployment that the project specifies, the hosting system may or may not have the .NET Core shared runtime installed on it.
For more information, see .NET Core Application Deployment.
For the directory structure of a published application, see Directory structure.
.PP
\f[C][project]\f[]
.SS Arguments
.PP
\f[C]dotnet\ publish\f[] needs access to the \f[C]project.json\f[] file
to work.
If it is not specified on invocation via [project],
\f[C]project.json\f[] in the current directory will be the default.
.PD 0
.P
.PD
If no \f[C]project.json\f[] can be found, \f[C]dotnet\ publish\f[] will
throw an error.
\f[C]PROJECT\f[]
.PP
\f[C]\-f\f[], \f[C]\-\-framework\f[] [FID]
The project to publish, which defaults to the current directory if not specified.
.SH OPTIONS
.SS .NET Core 2.x
.PP
Publishes the application for a given framework identifier (FID).
If not specified, FID is read from \f[C]project.json\f[].
In no valid framework is found, the command will throw an error.
If multiple valid frameworks are found, the command will publish for all
valid frameworks.
\f[C]\-c|\-\-configuration\ {Debug|Release}\f[]
.PP
\f[C]\-r\f[], \f[C]\-\-runtime\f[] [RID]
Defines the build configuration.
The default value is \f[C]Debug\f[].
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
Publishes the application for the specified target framework.
You must specify the target framework in the project file.
.PP
\f[C]\-\-force\f[]
.PP
Forces all dependencies to be resolved even if the last restore was successful.
This is equivalent to deleting the \f[I]project.assets.json\f[] file.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-\-manifest\ <PATH_TO_MANIFEST_FILE>\f[]
.PP
Specifies one or several target manifests to use to trim the set of packages published with the app.
The manifest file is part of the output of the \f[C]dotnet\ store\f[].
To specify multiple manifests, add a \f[C]\-\-manifest\f[] option for each manifest.
This option is available starting with .NET Core 2.0 SDK.
.PP
\f[C]\-\-no\-dependencies\f[]
.PP
Ignores project\-to\-project references and only restores the root project.
.PP
\f[C]\-\-no\-restore\f[]
.PP
Doesn't perform an implicit restore when running the command.
.PP
\f[C]\-o|\-\-output\ <OUTPUT_DIRECTORY>\f[]
.PP
Specifies the path for the output directory.
If not specified, it defaults to \f[I]./bin/[configuration]/[framework]/\f[] for a framework\-dependent deployment or \f[I]./bin/[configuration]/[framework]/[runtime]\f[] for a self\-contained deployment.
If a relative path is provided, the output directory generated is relative to the project file location, not to the current working directory.
.PP
\f[C]\-\-self\-contained\f[]
.PP
Publishes the .NET Core runtime with your application so the runtime doesn't need to be installed on the target machine.
If a runtime identifier is specified, its default value is \f[C]true\f[].
For more information about the different deployment types, see .NET Core application deployment.
.PP
\f[C]\-r|\-\-runtime\ <RUNTIME_IDENTIFIER>\f[]
.PP
Publishes the application for a given runtime.
This is used when creating a self\-contained deployment (SCD).
For a list of Runtime Identifiers (RIDs), see the RID catalog.
Default is to publish a framework\-dependent deployment (FDD).
.PP
\f[C]\-b\f[], \f[C]\-\-build\-base\-path\f[] [DIR]
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Directory in which to place temporary outputs.
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
.PP
\f[C]\-o\f[], \f[C]\-\-output\f[]
\f[C]\-\-version\-suffix\ <VERSION_SUFFIX>\f[]
.PP
Specify the path where to place the directory.
If not specified, it will default to
\f[I]\&./bin/[configuration]/[framework]/\f[] for portable applications
or \f[I]\&./bin/[configuration]/[framework]/[runtime]\f[] for
self\-contained applications.
Defines the version suffix to replace the asterisk (\f[C]*\f[]) in the version field of the project file.
.SS .NET Core 1.x
.PP
\-\-version\-suffix [VERSION_SUFFIX]
\f[C]\-c|\-\-configuration\ {Debug|Release}\f[]
.PP
Defines what \f[C]*\f[] should be replaced with in the version field in
the project.json file.
Defines the build configuration.
The default value is \f[C]Debug\f[].
.PP
\f[C]\-c\f[], \f[C]\-\-configuration\ [Debug|Release]\f[]
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
Configuration to use when publishing.
The default value is Debug.
.SS EXAMPLES
Publishes the application for the specified target framework.
You must specify the target framework in the project file.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-\-manifest\ <PATH_TO_MANIFEST_FILE>\f[]
.PP
Specifies one or several target manifests to use to trim the set of packages published with the app.
The manifest file is part of the output of the \f[C]dotnet\ store\f[].
To specify multiple manifests, add a \f[C]\-\-manifest\f[] option for each manifest.
This option is available starting with .NET Core 2.0 SDK.
.PP
\f[C]\-o|\-\-output\ <OUTPUT_DIRECTORY>\f[]
.PP
Specifies the path for the output directory.
If not specified, it defaults to \f[I]./bin/[configuration]/[framework]/\f[] for a framework\-dependent deployment or \f[I]./bin/[configuration]/[framework]/[runtime]\f[] for a self\-contained deployment.
If a relative path is provided, the output directory generated is relative to the project file location, not to the current working directory.
.PP
\f[C]\-r|\-\-runtime\ <RUNTIME_IDENTIFIER>\f[]
.PP
Publishes the application for a given runtime.
This is used when creating a self\-contained deployment (SCD).
For a list of Runtime Identifiers (RIDs), see the RID catalog.
Default is to publish a framework\-dependent deployment (FDD).
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
.PP
\f[C]\-\-version\-suffix\ <VERSION_SUFFIX>\f[]
.PP
Defines the version suffix to replace the asterisk (\f[C]*\f[]) in the version field of the project file.
.PP
* * * * *
.SH EXAMPLES
.PP
Publish the project in the current directory:
.PP
\f[C]dotnet\ publish\f[]
.PP
Publishes an application using the framework found in
\f[C]project.json\f[].
If \f[C]project.json\f[] contains \f[C]runtimes\f[] node, publish for
the RID of the current platform.
Publish the application using the specified project file:
.PP
\f[C]dotnet\ publish\ ~/projects/app1/project.json\f[]
\f[C]dotnet\ publish\ ~/projects/app1/app1.csproj\f[]
.PP
Publishes the application using the specified \f[C]project.json\f[].
Publish the project in the current directory using the \f[C]netcoreapp1.1\f[] framework:
.PP
\f[C]dotnet\ publish\ \-\-framework\ netcoreapp1.0\f[]
\f[C]dotnet\ publish\ \-\-framework\ netcoreapp1.1\f[]
.PP
Publishes the current application using the \f[C]netcoreapp1.0\f[]
framework.
Publish the current application using the \f[C]netcoreapp1.1\f[] framework and the runtime for \f[C]OS\ X\ 10.10\f[] (you must list this RID in the project file).
.PP
\f[C]dotnet\ publish\ \-\-framework\ netcoreapp1.0\ \-\-runtime\ osx.10.11\-x64\f[]
\f[C]dotnet\ publish\ \-\-framework\ netcoreapp1.1\ \-\-runtime\ osx.10.11\-x64\f[]
.PP
Publishes the current application using the \f[C]netcoreapp1.0\f[]
framework and runtime for \f[C]OS\ X\ 10.10\f[].
This RID has to exist in the \f[C]project.json\f[] \f[C]runtimes\f[]
node.
Publish the current application but don't restore project\-to\-project (P2P) references, just the root project during the restore operation (.NET Core SDK 2.0 and later versions):
.PP
\f[C]dotnet\ publish\ \-\-no\-dependencies\f[]
.SS See also
.IP \[bu] 2
Target frameworks
.IP \[bu] 2
Runtime IDentifier (RID) catalog
.SH AUTHORS
Microsoft Corporation dotnetclifeedback\@microsoft.com.
mairaw.

View file

@ -0,0 +1,37 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet remove package command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet remove package
.PP
.SH NAME
.PP
\f[C]dotnet\ remove\ package\f[] \- Removes package reference from a project file.
.SH SYNOPSIS
.PP
\f[C]dotnet\ remove\ [<PROJECT>]\ package\ <PACKAGE_NAME>\ [\-h|\-\-help]\f[]
.SH DESCRIPTION
.PP
The \f[C]dotnet\ remove\ package\f[] command provides a convenient option to remove a NuGet package reference from a project.
.SS Arguments
.PP
\f[C]PROJECT\f[]
.PP
Specifies the project file.
If not specified, the command will search the current directory for one.
.PP
\f[C]PACKAGE_NAME\f[]
.PP
The package reference to remove.
.SH OPTIONS
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.SH EXAMPLES
.PP
Removes \f[C]Newtonsoft.Json\f[] NuGet package from a project in the current directory:
.PP
\f[C]dotnet\ remove\ package\ Newtonsoft.Json\f[]
.SH AUTHORS
mairaw.

View file

@ -0,0 +1,51 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet remove reference command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet remove reference
.PP
.SH NAME
.PP
\f[C]dotnet\ remove\ reference\f[] \- Removes project\-to\-project references.
.SH SYNOPSIS
.PP
\f[C]dotnet\ remove\ [<PROJECT>]\ reference\ [\-f|\-\-framework]\ <PROJECT_REFERENCES>\ [\-h|\-\-help]\f[]
.SH DESCRIPTION
.PP
The \f[C]dotnet\ remove\ reference\f[] command provides a convenient option to remove project references from a project.
.SS Arguments
.PP
\f[C]PROJECT\f[]
.PP
Target project file.
If not specified, the command searches the current directory for one.
.PP
\f[C]PROJECT_REFERENCES\f[]
.PP
Project to project (P2P references to remove.
You can specify one or multiple projects.
Glob patterns are supported on Unix/Linux based terminals.
.SH OPTIONS
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
Removes the reference only when targeting a specific framework.
.SH EXAMPLES
.PP
Remove a project reference from the specified project:
.PP
\f[C]dotnet\ remove\ app/app.csproj\ reference\ lib/lib.csproj\f[]
.PP
Remove multiple project references from the project in the current directory:
.PP
\f[C]dotnet\ remove\ reference\ lib1/lib1.csproj\ lib2/lib2.csproj\f[]
.PP
Remove multiple project references using a glob pattern on Unix/Linux:
.PP
\f[C]dotnet\ remove\ app/app.csproj\ reference\ **/*.csproj\f[]
.SH AUTHORS
mairaw.

View file

@ -1,97 +1,198 @@
.\" Automatically generated by Pandoc 1.15.1
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet restore command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.TH "DOTNET\-RESTORE" "1" "June 2016" "" ""
.SS NAME
.SH dotnet restore
.PP
\f[C]dotnet\-restore\f[] \- Restores the dependencies and tools of a
project
.SS SYNOPSIS
.SH NAME
.PP
\f[C]dotnet\ restore\ [\-\-source]\ \ \ \ \ \ \ [\-\-packages]\ [\-\-disable\-parallel]\ \ \ \ \ \ \ [\-\-fallbacksource]\ [\-\-configfile]\ [\-\-verbosity]\ \ \ \ \ [<root>]\f[]
.SS DESCRIPTION
\f[C]dotnet\ restore\f[] \- Restores the dependencies and tools of a project.
.SH SYNOPSIS
.SS .NET Core 2.x
.IP
.nf
\f[C]
dotnet\ restore\ [<ROOT>]\ [\-\-configfile]\ [\-\-disable\-parallel]\ [\-\-force]\ [\-\-ignore\-failed\-sources]\ [\-\-no\-cache]\ [\-\-no\-dependencies]\ [\-\-packages]\ [\-r|\-\-runtime]\ [\-s|\-\-source]\ [\-v|\-\-verbosity]
dotnet\ restore\ [\-h|\-\-help]
\f[]
.fi
.SS .NET Core 1.x
.IP
.nf
\f[C]
dotnet\ restore\ [<ROOT>]\ [\-\-configfile]\ [\-\-disable\-parallel]\ [\-\-ignore\-failed\-sources]\ [\-\-no\-cache]\ [\-\-no\-dependencies]\ [\-\-packages]\ [\-r|\-\-runtime]\ [\-s|\-\-source]\ [\-v|\-\-verbosity]
dotnet\ restore\ [\-h|\-\-help]
\f[]
.fi
.PP
The \f[C]dotnet\ restore\f[] command uses NuGet to restore dependencies
as well as project\-specific tools that are specified in the
project.json file.
By default, the restoration of dependencies and tools are done in
parallel.
* * * * *
.SH DESCRIPTION
.PP
In order to restore the dependencies, NuGet needs the feeds where the
packages are located.
Feeds are usually provided via the NuGet.config configuration file; a
default one is present when the CLI tools are installed.
You can specify more feeds by creating your own NuGet.config file in the
project directory.
Feeds can also be specified per invocation on the command line.
The \f[C]dotnet\ restore\f[] command uses NuGet to restore dependencies as well as project\-specific tools that are specified in the project file.
By default, the restoration of dependencies and tools are performed in parallel.
.PP
For dependencies, you can specify where the restored packages are placed
during the restore operation using the \f[C]\-\-packages\f[] argument.
If not specified, the default NuGet package cache is used.
It is found in the \f[C]\&.nuget/packages\f[] directory in the
user\[aq]s home directory on all operating systems (for example,
\f[C]/home/user1\f[] on Linux or \f[C]C:\\Users\\user1\f[] on Windows).
.PP
For project\-specific tooling, \f[C]dotnet\ restore\f[] first restores
the package in which the tool is packed, and then proceeds to restore
the tool\[aq]s dependencies as specified in its project.json.
.SS OPTIONS
In order to restore the dependencies, NuGet needs the feeds where the packages are located.
Feeds are usually provided via the \f[I]NuGet.config\f[] configuration file.
A default configuration file is provided when the CLI tools are installed.
You specify additional feeds by creating your own \f[I]NuGet.config\f[] file in the project directory.
You also specify additional feeds per invocation at a command prompt.
.PP
\f[C][root]\f[]
For dependencies, you specify where the restored packages are placed during the restore operation using the \f[C]\-\-packages\f[] argument.
If not specified, the default NuGet package cache is used, which is found in the \f[C]\&.nuget/packages\f[] directory in the user's home directory on all operating systems (for example, \f[I]/home/user1\f[] on Linux or \f[I]C:1\f[] on Windows).
.PP
A list of projects or project folders to restore.
The list can contain either a path to a \f[C]project.json\f[] file, or a
path to \f[C]global.json\f[] file or folder.
The restore operation runs recursively for all subdirectories and
restores for each given project.json file it finds.
For project\-specific tooling, \f[C]dotnet\ restore\f[] first restores the package in which the tool is packed, and then proceeds to restore the tool's dependencies as specified in its project file.
.PP
\f[C]\-s\f[], \f[C]\-\-source\f[] [SOURCE]
The behavior of the \f[C]dotnet\ restore\f[] command is affected by some of the settings in the \f[I]Nuget.Config\f[] file, if present.
For example, setting the \f[C]globalPackagesFolder\f[] in \f[I]NuGet.Config\f[] places the restored NuGet packages in the specified folder.
This is an alternative to specifying the \f[C]\-\-packages\f[] option on the \f[C]dotnet\ restore\f[] command.
For more information, see the NuGet.Config reference.
.SS Implicit \f[C]dotnet\ restore\f[]
.PP
Specifies a source to use during the restore operation.
This overrides all of the sources specified in the NuGet.config file(s).
Starting with .NET Core 2.0, \f[C]dotnet\ restore\f[] is run implicitly if necessary when you issue the following commands:
.IP \[bu] 2
\f[C]dotnet\ new\f[]
.IP \[bu] 2
\f[C]dotnet\ build\f[]
.IP \[bu] 2
\f[C]dotnet\ run\f[]
.IP \[bu] 2
\f[C]dotnet\ test\f[]
.IP \[bu] 2
\f[C]dotnet\ publish\f[]
.IP \[bu] 2
\f[C]dotnet\ pack\f[]
.PP
\f[C]\-\-packages\f[] [DIR]
In most cases, you no longer need to explicitly use the \f[C]dotnet\ restore\f[] command.
.PP
Specifies the directory to place the restored packages in.
In some cases, it is inconvenient for \f[C]dotnet\ restore\f[] to run implicitly.
For example, some automated systems, such as build systems, need to call \f[C]dotnet\ restore\f[] explicitly to control when the restore occurs so that they can control network usage.
To prevent \f[C]dotnet\ restore\f[] from running implicitly, you can use the \f[C]\-\-no\-restore\f[] switch with any of these commands to disable implicit restore.
.SS Arguments
.PP
\f[C]ROOT\f[]
.PP
Optional path to the project file to restore.
.SH OPTIONS
.SS .NET Core 2.x
.PP
\f[C]\-\-configfile\ <FILE>\f[]
.PP
The NuGet configuration file (\f[I]NuGet.config\f[]) to use for the restore operation.
.PP
\f[C]\-\-disable\-parallel\f[]
.PP
Disables restoring multiple projects in parallel.
.PP
\f[C]\-f\f[], \f[C]\-\-fallbacksource\f[] [FEED]
\f[C]\-\-force\f[]
.PP
Specifies a fallback source that will be used in the restore operation
if all other sources fail.
All valid feed formats are allowed.
Forces all dependencies to be resolved even if the last restore was successful.
This is equivalent to deleting the \f[I]project.assets.json\f[] file.
.PP
\f[C]\-\-configfile\f[] [FILE]
\f[C]\-h|\-\-help\f[]
.PP
Configuration file (NuGet.config) to use for the restore operation.
Prints out a short help for the command.
.PP
\f[C]\-\-verbosity\f[] [LEVEL]
\f[C]\-\-ignore\-failed\-sources\f[]
.PP
The verbosity of logging to use.
Allowed values: Debug, Verbose, Information, Minimal, Warning, or Error.
.SS EXAMPLES
Only warn about failed sources if there are packages meeting the version requirement.
.PP
\f[C]\-\-no\-cache\f[]
.PP
Specifies to not cache packages and HTTP requests.
.PP
\f[C]\-\-no\-dependencies\f[]
.PP
When restoring a project with project\-to\-project (P2P) references, restores the root project and not the references.
.PP
\f[C]\-\-packages\ <PACKAGES_DIRECTORY>\f[]
.PP
Specifies the directory for restored packages.
.PP
\f[C]\-r|\-\-runtime\ <RUNTIME_IDENTIFIER>\f[]
.PP
Specifies a runtime for the package restore.
This is used to restore packages for runtimes not explicitly listed in the \f[C]<RuntimeIdentifiers>\f[] tag in the \f[I].csproj\f[] file.
For a list of Runtime Identifiers (RIDs), see the RID catalog.
Provide multiple RIDs by specifying this option multiple times.
.PP
\f[C]\-s|\-\-source\ <SOURCE>\f[]
.PP
Specifies a NuGet package source to use during the restore operation.
This overrides all of the sources specified in the \f[I]NuGet.config\f[] files.
Multiple sources can be provided by specifying this option multiple times.
.PP
\f[C]\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
.SS .NET Core 1.x
.PP
\f[C]\-\-configfile\ <FILE>\f[]
.PP
The NuGet configuration file (\f[I]NuGet.config\f[]) to use for the restore operation.
.PP
\f[C]\-\-disable\-parallel\f[]
.PP
Disables restoring multiple projects in parallel.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-\-ignore\-failed\-sources\f[]
.PP
Only warn about failed sources if there are packages meeting the version requirement.
.PP
\f[C]\-\-no\-cache\f[]
.PP
Specifies to not cache packages and HTTP requests.
.PP
\f[C]\-\-no\-dependencies\f[]
.PP
When restoring a project with project\-to\-project (P2P) references, restores the root project and not the references.
.PP
\f[C]\-\-packages\ <PACKAGES_DIRECTORY>\f[]
.PP
Specifies the directory for restored packages.
.PP
\f[C]\-r|\-\-runtime\ <RUNTIME_IDENTIFIER>\f[]
.PP
Specifies a runtime for the package restore.
This is used to restore packages for runtimes not explicitly listed in the \f[C]<RuntimeIdentifiers>\f[] tag in the \f[I].csproj\f[] file.
For a list of Runtime Identifiers (RIDs), see the RID catalog.
Provide multiple RIDs by specifying this option multiple times.
.PP
\f[C]\-s|\-\-source\ <SOURCE>\f[]
.PP
Specifies a NuGet package source to use during the restore operation.
This overrides all of the sources specified in the \f[I]NuGet.config\f[] files.
Multiple sources can be provided by specifying this option multiple times.
.PP
\f[C]\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
.SH EXAMPLES
.PP
Restore dependencies and tools for the project in the current directory:
.PP
\f[C]dotnet\ restore\f[]
.PP
Restores dependencies and tools for the project in the current
directory.
Restore dependencies and tools for the \f[C]app1\f[] project found in the given path:
.PP
\f[C]dotnet\ restore\ ~/projects/app1/project.json\f[]
\f[C]dotnet\ restore\ ~/projects/app1/app1.csproj\f[]
.PP
Restores dependencies and tools for the \f[C]app1\f[] project found in
the given path.
Restore the dependencies and tools for the project in the current directory using the file path provided as the source:
.PP
\f[C]dotnet\ restore\ \-\-f\ c:\\packages\\mypackages\f[]
\f[C]dotnet\ restore\ \-s\ c:\\packages\\mypackages\f[]
.PP
Restores the dependencies and tools for the project in the current
directory using the file path provided as the fallback source.
Restore the dependencies and tools for the project in the current directory using the two file paths provided as sources:
.PP
\f[C]dotnet\ restore\ \-\-verbosity\ Error\f[]
\f[C]dotnet\ restore\ \-s\ c:\\packages\\mypackages\ \-s\ c:\\packages\\myotherpackages\f[]
.PP
Restores dependencies and tools for the project in the current directory
and shows only errors in the output.
Restore dependencies and tools for the project in the current directory and shows only minimal output:
.PP
\f[C]dotnet\ restore\ \-\-verbosity\ minimal\f[]
.SH AUTHORS
Microsoft Corporation dotnetclifeedback\@microsoft.com.
mairaw.

View file

@ -1,88 +1,168 @@
.\" Automatically generated by Pandoc 1.15.1
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet run command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.TH "DOTNET\-RUN" "1" "June 2016" "" ""
.SS NAME
.SH dotnet run
.PP
dotnet\-run \-\- Runs source code \[aq]in\-place\[aq] without any
explicit compile or launch commands.
.SS SYNOPSIS
.SH NAME
.PP
\f[C]dotnet\ run\ [\-\-framework]\ [\-\-configuration]\ \ \ \ \ [\-\-project]\ [\-\-help]\ [\-\-]\f[]
.SS DESCRIPTION
\f[C]dotnet\ run\f[] \- Runs source code without any explicit compile or launch commands.
.SH SYNOPSIS
.SS .NET Core 2.x
.IP
.nf
\f[C]
dotnet\ run\ [\-c|\-\-configuration]\ [\-f|\-\-framework]\ [\-\-force]\ [\-\-launch\-profile]\ [\-\-no\-build]\ [\-\-no\-dependencies]\ [\-\-no\-launch\-profile]\ [\-\-no\-restore]\ [\-p|\-\-project]\ [\-\-runtime]\ [[\-\-]\ [application\ arguments]]
dotnet\ run\ [\-h|\-\-help]
\f[]
.fi
.SS .NET Core 1.x
.IP
.nf
\f[C]
dotnet\ run\ [\-c|\-\-configuration]\ [\-f|\-\-framework]\ [\-p|\-\-project]\ [[\-\-]\ [application\ arguments]]
dotnet\ run\ [\-h|\-\-help]
\f[]
.fi
.PP
The \f[C]dotnet\ run\f[] command provides a convenient option to run
your application from the source code with one command.
It compiles source code, generates an output program and then runs that
program.
This command is useful for fast iterative development and can also be
used to run a source\-distributed program (for example, a website).
* * * * *
.SH DESCRIPTION
.PP
This command relies on \f[C]dotnet\ build\f[] (dotnet-build.md) to build
source inputs to a .NET assembly, before launching the program.
The requirements for this command and the handling of source inputs are
all inherited from the build command.
The documentation for the build command provides more information on
those requirements.
The \f[C]dotnet\ run\f[] command provides a convenient option to run your application from the source code with one command.
It's useful for fast iterative development from the command line.
The command depends on the \f[C]dotnet\ build\f[] command to build the code.
Any requirements for the build, such as that the project must be restored first, apply to \f[C]dotnet\ run\f[] as well.
.PP
Output files are written to the child \f[C]bin\f[] folder, which will be
created if it doesn\[aq]t exist.
Files will be overwritten as needed.
Temporary files are written to the child \f[C]obj\f[] folder.
Output files are written into the default location, which is \f[C]bin/<configuration>/<target>\f[].
For example if you have a \f[C]netcoreapp1.0\f[] application and you run \f[C]dotnet\ run\f[], the output is placed in \f[C]bin/Debug/netcoreapp1.0\f[].
Files are overwritten as needed.
Temporary files are placed in the \f[C]obj\f[] directory.
.PP
In case of a project with multiple specified frameworks,
\f[C]dotnet\ run\f[] will first select the .NET Core frameworks.
If those do not exist, it will error out.
To specify other frameworks, use the \f[C]\-\-framework\f[] argument.
If the project specifies multiple frameworks, executing \f[C]dotnet\ run\f[] results in an error unless the \f[C]\-f|\-\-framework\ <FRAMEWORK>\f[] option is used to specify the framework.
.PP
The \f[C]dotnet\ run\f[] command must be used in the context of
projects, not built assemblies.
If you\[aq]re trying to execute a DLL instead, you should use
\f[C]dotnet\f[] (dotnet.md) without any command like in the following
example:
The \f[C]dotnet\ run\f[] command is used in the context of projects, not built assemblies.
If you're trying to run a framework\-dependent application DLL instead, you must use dotnet without a command.
For example, to run \f[C]myapp.dll\f[], use:
.IP
.nf
\f[C]
dotnet\ myapp.dll
\f[]
.fi
.PP
\f[C]dotnet\ myapp.dll\f[]
For more information on the \f[C]dotnet\f[] driver, see the .NET Core Command Line Tools (CLI) topic.
.PP
For more information about the \f[C]dotnet\f[] driver, see the \&.NET
Core Command Line Tools (CLI) (overview.md) topic.
.SS OPTIONS
In order to run the application, the \f[C]dotnet\ run\f[] command resolves the dependencies of the application that are outside of the shared runtime from the NuGet cache.
Because it uses cached dependencies, it's not recommended to use \f[C]dotnet\ run\f[] to run applications in production.
Instead, create a deployment using the \f[C]dotnet\ publish\f[] command and deploy the published output.
.PP
.SH OPTIONS
.SS .NET Core 2.x
.PP
\f[C]\-\-\f[]
.PP
Delimits arguments to \f[C]dotnet\ run\f[] from arguments for the
application being run.
All arguments after this one will be passed to the application being
run.
Delimits arguments to \f[C]dotnet\ run\f[] from arguments for the application being run.
All arguments after this one are passed to the application run.
.PP
\f[C]\-f\f[], \f[C]\-\-framework\f[] [FID]
\f[C]\-c|\-\-configuration\ {Debug|Release}\f[]
.PP
Runs the application for a given framework identifier (FID).
Defines the build configuration.
The default value is \f[C]Debug\f[].
.PP
\f[C]\-c\f[], \f[C]\-\-configuration\ [Debug|Release]\f[]
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
Configuration to use when publishing.
The default value is "Debug".
Builds and runs the app using the specified framework.
The framework must be specified in the project file.
.PP
\f[C]\-p\f[], \f[C]\-\-project\ [PATH]\f[]
\f[C]\-\-force\f[]
.PP
Specifies which project to run.
It can be a path to a project.json file or to a directory containing a
project.json file.
It defaults to current directory if not specified.
.SS EXAMPLES
Forces all dependencies to be resolved even if the last restore was successful.
This is equivalent to deleting \f[I]project.assets.json\f[].
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-\-launch\-profile\ <NAME>\f[]
.PP
The name of the launch profile (if any) to use when launching the application.
Launch profiles are defined in the \f[I]launchSettings.json\f[] file and are typically called \f[C]Development\f[], \f[C]Staging\f[] and \f[C]Production\f[].
For more information, see Working with multiple environments.
.PP
\f[C]\-\-no\-build\f[]
.PP
Doesn't build the project before running.
.PP
\f[C]\-\-no\-dependencies\f[]
.PP
When restoring a project with project\-to\-project (P2P) references, restores the root project and not the references.
.PP
\f[C]\-\-no\-launch\-profile\f[]
.PP
Doesn't attempt to use \f[I]launchSettings.json\f[] to configure the application.
.PP
\f[C]\-\-no\-restore\f[]
.PP
Doesn't perform an implicit restore when running the command.
.PP
\f[C]\-p|\-\-project\ <PATH>\f[]
.PP
Specifies the path of the project file to run (folder name or full path).
It defaults to the current directory if not specified.
.PP
\f[C]\-\-runtime\ <RUNTIME_IDENTIFIER>\f[]
.PP
Specifies the target runtime to restore packages for.
For a list of Runtime Identifiers (RIDs), see the RID catalog.
.SS .NET Core 1.x
.PP
\f[C]\-\-\f[]
.PP
Delimits arguments to \f[C]dotnet\ run\f[] from arguments for the application being run.
All arguments after this one are passed to the application run.
.PP
\f[C]\-c|\-\-configuration\ {Debug|Release}\f[]
.PP
Defines the build configuration.
The default value is \f[C]Debug\f[].
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
Builds and runs the app using the specified framework.
The framework must be specified in the project file.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-p|\-\-project\ <PATH/PROJECT.csproj>\f[]
.PP
Specifies the path and name of the project file.
(See the NOTE.) It defaults to the current directory if not specified.
.RS
.PP
[!NOTE] Use the path and name of the project file with the \f[C]\-p|\-\-project\f[] option.
A regression in the CLI prevents providing a folder path with .NET Core SDK 1.x.
For more information about this issue, see dotnet run \-p, can not start a project (dotnet/cli #5992).
.RE
.PP
* * * * *
.SH EXAMPLES
.PP
Run the project in the current directory:
.PP
\f[C]dotnet\ run\f[]
.PP
Runs the project in the current directory.
Run the specified project:
.PP
\f[C]dotnet\ run\ \-\-project\ /projects/proj1/project.json\f[]
\f[C]dotnet\ run\ \-\-project\ /projects/proj1/proj1.csproj\f[]
.PP
Runs the project specified.
Run the project in the current directory (the \f[C]\-\-help\f[] argument in this example is passed to the application, since the \f[C]\-\-\f[] argument is used):
.PP
\f[C]dotnet\ run\ \-\-configuration\ Release\ \-\-\ \-\-help\f[]
.PP
Runs the project in the current directory.
The \f[C]\-\-help\f[] argument above is passed to the application being
run, since the \f[C]\-\-\f[] argument was used.
Restore dependencies and tools for the project in the current directory only showing minimal output and then run the project: (.NET Core SDK 2.0 and later versions):
.PP
\f[C]dotnet\ run\ \-\-verbosity\ m\f[]
.SH AUTHORS
Microsoft Corporation dotnetclifeedback\@microsoft.com.
mairaw.

View file

@ -0,0 +1,82 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet sln command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet sln
.PP
.SH NAME
.PP
\f[C]dotnet\ sln\f[] \- Modifies a .NET Core solution file.
.SH SYNOPSIS
.IP
.nf
\f[C]
dotnet\ sln\ [<SOLUTION_NAME>]\ add\ <PROJECT>\ <PROJECT>\ ...
dotnet\ sln\ [<SOLUTION_NAME>]\ add\ <GLOBBING_PATTERN>
dotnet\ sln\ [<SOLUTION_NAME>]\ remove\ <PROJECT>\ <PROJECT>\ ...
dotnet\ sln\ [<SOLUTION_NAME>]\ remove\ <GLOBBING_PATTERN>
dotnet\ sln\ [<SOLUTION_NAME>]\ list
dotnet\ sln\ [\-h|\-\-help]
\f[]
.fi
.SH DESCRIPTION
.PP
The \f[C]dotnet\ sln\f[] command provides a convenient way to add, remove, and list projects in a solution file.
.SS Commands
.PP
\f[C]add\ <PROJECT>\ ...\f[]
.PP
\f[C]add\ <GLOBBING_PATTERN>\f[]
.PP
Adds a project or multiple projects to the solution file.
Globbing patterns are supported on Unix/Linux based terminals.
.PP
\f[C]remove\ <PROJECT>\ ...\f[]
.PP
\f[C]remove\ <GLOBBING_PATTERN>\f[]
.PP
Removes a project or multiple projects from the solution file.
Globbing patterns are supported on Unix/Linux based terminals.
.PP
\f[C]list\f[]
.PP
Lists all projects in a solution file.
.SS Arguments
.PP
\f[C]SOLUTION_NAME\f[]
.PP
Solution file to use.
If not specified, the command searches the current directory for one.
If there are multiple solution files in the directory, one must be specified.
.SH OPTIONS
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.SH EXAMPLES
.PP
Add a C# project to a solution:
.PP
\f[C]dotnet\ sln\ todo.sln\ add\ todo\-app/todo\-app.csproj\f[]
.PP
Remove a C# project from a solution:
.PP
\f[C]dotnet\ sln\ todo.sln\ remove\ todo\-app/todo\-app.csproj\f[]
.PP
Add multiple C# projects to a solution:
.PP
\f[C]dotnet\ sln\ todo.sln\ add\ todo\-app/todo\-app.csproj\ back\-end/back\-end.csproj\f[]
.PP
Remove multiple C# projects from a solution:
.PP
\f[C]dotnet\ sln\ todo.sln\ remove\ todo\-app/todo\-app.csproj\ back\-end/back\-end.csproj\f[]
.PP
Add multiple C# projects to a solution using a globbing pattern:
.PP
\f[C]dotnet\ sln\ todo.sln\ add\ **/*.csproj\f[]
.PP
Remove multiple C# projects from a solution using a globbing pattern:
.PP
\f[C]dotnet\ sln\ todo.sln\ remove\ **/*.csproj\f[]
.SH AUTHORS
mairaw.

View file

@ -0,0 +1,81 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet store command" "1" "" "" ".NET Core"
.hy
.SH dotnet store
.PP
.SH NAME
.PP
\f[C]dotnet\ store\f[] \- Stores the specified assemblies in the runtime package store.
.SH SYNOPSIS
.PP
\f[C]dotnet\ store\ \-m|\-\-manifest\ \-f|\-\-framework\ \-r|\-\-runtime\ \ [\-\-framework\-version]\ [\-h|\-\-help]\ [\-\-output]\ [\-\-skip\-optimization]\ [\-\-skip\-symbols]\ [\-v|\-\-verbosity]\ [\-\-working\-dir]\f[]
.SH DESCRIPTION
.PP
\f[C]dotnet\ store\f[] stores the specified assemblies in the runtime package store.
By default, assemblies are optimized for the target runtime and framework.
For more information, see the runtime package store topic.
.SS Required options
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
Specifies the target framework.
.PP
\f[C]\-m|\-\-manifest\ <PATH_TO_MANIFEST_FILE>\f[]
.PP
The \f[I]package store manifest file\f[] is an XML file that contains the list of packages to store.
The format of the manifest file is compatible with the \f[I]csproj\f[] format.
So, a \f[I]csproj\f[] project file that references the desired packages can be used with the \f[C]\-m|\-\-manifest\f[] option to store assemblies in the runtime package store.
To specify multiple manifest files, repeat the option and path for each file: \f[C]\-\-manifest\ packages1.csproj\ \-\-manifest\ packages2.csproj\f[].
.PP
\f[C]\-r|\-\-runtime\ <RUNTIME_IDENTIFIER>\f[]
.PP
The runtime identifier to target.
.SS Optional options
.PP
\f[C]\-\-framework\-version\ <FRAMEWORK_VERSION>\f[]
.PP
Specifies the .NET Core SDK version.
This option enables you to select a specific framework version beyond the framework specified by the \f[C]\-f|\-\-framework\f[] option.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Shows help information.
.PP
\f[C]\-o|\-\-output\ <OUTPUT_DIRECTORY>\f[]
.PP
Specifies the path to the runtime package store.
If not specified, it defaults to the \f[I]store\f[] subdirectory of the user profile .NET Core installation directory.
.PP
\f[C]\-\-skip\-optimization\f[]
.PP
Skips the optimization phase.
.PP
\f[C]\-\-skip\-symbols\f[]
.PP
Skips symbol generation.
Currently, you can only generate symbols on Windows and Linux.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
.PP
\f[C]\-w|\-\-working\-dir\ <INTERMEDIATE_WORKING_DIRECTORY>\f[]
.PP
The working directory used by the command.
If not specified, it uses the \f[I]obj\f[] subdirectory of the current directory.
.SH EXAMPLES
.PP
Store the packages specified in the \f[I]packages.csproj\f[] project file for .NET Core 2.0.0:
.PP
\f[C]dotnet\ store\ \-\-manifest\ packages.csproj\ \-\-framework\-version\ 2.0.0\f[]
.PP
Store the packages specified in the \f[I]packages.csproj\f[] without optimization:
.PP
\f[C]dotnet\ store\ \-\-manifest\ packages.csproj\ \-\-skip\-optimization\f[]
.SS See also
.PP
Runtime package store
.SH AUTHORS
bleroy.

View file

@ -1,170 +1,281 @@
.\" Automatically generated by Pandoc 1.15.1
.\"t
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet test command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.TH "DOTNET\-TEST" "1" "April 2016" "" ""
.SH Dotnet Test, Adapters and Test Runners
.SH dotnet test
.PP
This document covers the interactions between dotnet test, a potential
adapter (like VS) and test runners (like
xunit (https://github.com/dotnet/coreclr.xunit)).
.SH NAME
.PP
It describes the communication protocol for these agents, the parameters
that the runner needs to support and the modes on which dotnet test and
the runner work.
.SS Running modes
\f[C]dotnet\ test\f[] \- .NET test driver used to execute unit tests.
.SH SYNOPSIS
.SS .NET Core 2.x
.IP
.nf
\f[C]
dotnet\ test\ [<PROJECT>]\ [\-a|\-\-test\-adapter\-path]\ [\-c|\-\-configuration]\ [\-\-collect]\ [\-d|\-\-diag]\ [\-f|\-\-framework]\ [\-\-filter]\ [\-l|\-\-logger]\ [\-\-no\-build]\ [\-\-no\-restore]\ [\-o|\-\-output]\ [\-r|\-\-results\-directory]\ [\-s|\-\-settings]\ [\-t|\-\-list\-tests]\ [\-v|\-\-verbosity]
dotnet\ test\ [\-h|\-\-help]
\f[]
.fi
.SS .NET Core 1.x
.IP
.nf
\f[C]
dotnet\ test\ [<PROJECT>]\ [\-a|\-\-test\-adapter\-path]\ [\-c|\-\-configuration]\ [\-d|\-\-diag]\ [\-f|\-\-framework]\ [\-\-filter]\ [\-l|\-\-logger]\ [\-\-no\-build]\ [\-o|\-\-output]\ [\-s|\-\-settings]\ [\-t|\-\-list\-tests]\ \ [\-v|\-\-verbosity]
dotnet\ test\ [\-h|\-\-help]
\f[]
.fi
.PP
Dotnet test supports two running modes:
.IP "1." 3
Console: In console mode, dotnet test simply executes fully whatever
command gets passed to it and outputs the results.
Anytime you invoke dotnet test without passing \-\-port, it will run in
console mode, which in turn will cause the runner to run in console
mode.
.IP "2." 3
Design time: Anytime you pass a port to dotnet test, we will run in
design time.
That means that dotnet test will connect to that port using TCP and will
then exchange a established set of messages with whatever else is
connected to that port.
When this happens, the runner also receives a port (a new one, mind you)
that dotnet test will use to communicate with it.
The reason why the runner also uses TCP to communicate with dotnet test
is because in design mode, it is not sufficient to just output results
to the console.
We need to send the adapter structure messages containing the results of
the test execution.
.SS Communication protocol in design time.
.IP "1." 3
Because during design time, dotnet test connects to a port when it
starts up, the adapter needs to be listening on that port otherwise
dotnet test will fail.
We did it like this so that the adapter could reserve all the ports it
needs by binding and listening to them before dotnet test ran and tried
to get ports for the runner.
.IP "2." 3
Once dotnet test starts, it sends a TestSession.Connected message to the
adapter indicating that it is ready to receive messages.
.IP "3." 3
It is possible to send an optional version
check (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.Testing.Abstractions/Messages/ProtocolVersionMessage.cs)
message with the adapter version of the protocol in it.
Dotnet test will send back the version of the protocol that it supports.
* * * * *
.SH DESCRIPTION
.PP
All messages have the format described here:
Message.cs (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.Testing.Abstractions/Messages/Message.cs).
The payload formats for each message is described in links to the
classes used to de/serialize the information in the description of the
protocol.
.SS Test Execution
The \f[C]dotnet\ test\f[] command is used to execute unit tests in a given project.
The \f[C]dotnet\ test\f[] command launches the test runner console application specified for a project.
The test runner executes the tests defined for a unit test framework (for example, MSTest, NUnit, or xUnit) and reports the success or failure of each test.
The test runner and the unit test library are packaged as NuGet packages and are restored as ordinary dependencies for the project.
.PP
[IMAGE: alt
tag (../../../../Documentation/images/DotnetTestExecuteTests.png)]
.IP "1." 3
After the optional version check, the adapter sends a
TestExecution.GetTestRunnerProcessStartInfo, with the
tests (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.Testing.Abstractions/Messages/RunTestsMessage.cs)
it wants to execute inside of it.
Dotnet test sends back a FileName and Arguments inside a
TestStartInfo (https://github.com/dotnet/cli/blob/rel/1.0.0/src/dotnet/commands/dotnet-test/TestStartInfo.cs)
payload that the adapter can use to start the runner.
In the past, we would send the list of tests to run as part of that
argument, but we were actually going over the command line size limit
for some test projects.
.IP "2." 3
As part of the arguments, we send a port that the runner should connect
to and for executing tests, a \-\-wait\-command flag, that indicates
that the runner should connect to the port and wait for commands,
instead of going ahead and executing the tests.
.IP "3." 3
At this point, the adapter can launch the runner (and attach to it for
debugging if it chooses to).
.IP "4." 3
Once the runner starts, it sends dotnet test a TestRunner.WaitCommand
message that indicates it is ready to receive commands, at which point
dotnet test sends a TestRunner.Execute with the list of
tests (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.Testing.Abstractions/Messages/RunTestsMessage.cs)
to run.
This bypasses the command line size limit described above.
.IP "5." 3
The runner then sends dotnet test (and it passes forward to the adapter)
a TestExecution.TestStarted for each tests as they start with the
test (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.Testing.Abstractions/Test.cs)
information inside of it.
.IP "6." 3
The runner also sends dotnet test (and it forwards to the adapter) a
TestExecution.TestResult for each test with the individual
result (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.Testing.Abstractions/TestResult.cs)
of the test.
.IP "7." 3
After all tests finish, the runner sends a TestRunner.Completed message
to dotnet test, which dotnet test sends as TestExecution.Completed to
the adapter.
.IP "8." 3
Once the adapter is done, it sends dotnet test a TestSession.Terminate
which will cause dotnet test to shutdown.
.SS Test discovery
Test projects specify the test runner using an ordinary \f[C]<PackageReference>\f[] element, as seen in the following sample project file:
.PP
[IMAGE: alt
tag (../../../..//Documentation/images/DotnetTestDiscoverTests.png)]
.IP "1." 3
After the optional version check, the adapter sends a
TestDiscovery.Start message.
Because in this case, the adapter does not need to attach to the
process, dotnet test will start the runner itself.
Also, since there is no long list of arguments to be passed to the
runner, no \-\-wait\-command flag is needed to be passed to the runner.
dotnet test only passes a \-\-list argument to the runner, which means
the runner should not run the tests, just list them.
.IP "2." 3
The runner then sends dotnet test (and it passes forward to the adapter)
a TestDiscovery.TestFound for each
test (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.Testing.Abstractions/Test.cs)
found.
.IP "3." 3
After all tests are discovered, the runner sends a TestRunner.Completed
message to dotnet test, which dotnet test sends as
TestDiscovery.Completed to the adapter.
.IP "4." 3
Once the adapter is done, it sends dotnet test a TestSession.Terminate
which will cause dotnet test to shutdown.
.SS Dotnet test parameters
[!code\-xmlXUnit Basic Template]
.SS Arguments
.PP
Any parameters not accepted by dotnet test will be forwarded to the
runner.
This is the list of parameters supported by dotnet test from its own
help print out:
\f[C]PROJECT\f[]
.PP
Usage: dotnet test [arguments] [options]
Specifies a path to the test project.
If omitted, it defaults to current directory.
.SH OPTIONS
.SS .NET Core 2.x
.PP
Arguments: The project to test, defaults to the current directory.
Can be a path to a project.json or a project directory.
\f[C]\-a|\-\-test\-adapter\-path\ <PATH_TO_ADAPTER>\f[]
.PP
Options: \-?|\-h|\-\-help Show help information \-\-parentProcessId Used
by IDEs to specify their process ID.
Test will exit if the parent process does.
\-\-port Used by IDEs to specify a port number to listen for a
connection.
\-c|\-\-configuration Configuration under which to build \-o|\-\-output
Directory in which to find the binaries to be run
\-b|\-\-build\-base\-path Directory in which to find temporary outputs
\-f|\-\-framework Looks for test binaries for a specific framework
\-r|\-\-runtime Look for test binaries for a for the specified runtime
\-\-no\-build Do not build project before testing
.SS Minimum parameters that the runner needs to support
.IP \[bu] 2
AssemblyUnderTest: Path to the dll that contains the tests to be run.
.IP \[bu] 2
\-\-port: Used by dotnet test to specify a port number that the runner
should connect to.
.IP \[bu] 2
\-\-list: Indicates that the tests should only be listed and not
executed.
.IP \[bu] 2
\-\-designtime: Indicates that the runner is running in design time, for
instance, inside an adapter.
.IP \[bu] 2
\-\-wait\-command: Indicates that the runner should wait to receive
commands through the TCP channel instead of running tests right away.
We use this to get around the command line size limit.
Use the custom test adapters from the specified path in the test run.
.PP
\f[C]\-c|\-\-configuration\ {Debug|Release}\f[]
.PP
Defines the build configuration.
The default value is \f[C]Debug\f[], but your project's configuration could override this default SDK setting.
.PP
\f[C]\-\-collect\ <DATA_COLLECTOR_FRIENDLY_NAME>\f[]
.PP
Enables data collector for the test run.
For more information, see Monitor and analyze test run.
.PP
\f[C]\-d|\-\-diag\ <PATH_TO_DIAGNOSTICS_FILE>\f[]
.PP
Enables diagnostic mode for the test platform and write diagnostic messages to the specified file.
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
Looks for test binaries for a specific framework.
.PP
\f[C]\-\-filter\ <EXPRESSION>\f[]
.PP
Filters out tests in the current project using the given expression.
For more information, see the Filter option details section.
For additional information and examples on how to use selective unit test filtering, see Running selective unit tests.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-l|\-\-logger\ <LoggerUri/FriendlyName>\f[]
.PP
Specifies a logger for test results.
.PP
\f[C]\-\-no\-build\f[]
.PP
Does not build the test project prior to running it.
.PP
\f[C]\-\-no\-restore\f[]
.PP
Doesn't perform an implicit restore when running the command.
.PP
\f[C]\-o|\-\-output\ <OUTPUT_DIRECTORY>\f[]
.PP
Directory in which to find the binaries to run.
.PP
\f[C]\-r|\-\-results\-directory\ <PATH>\f[]
.PP
The directory where the test results are going to be placed.
The specified directory will be created if it doesn't exist.
.PP
\f[C]\-s|\-\-settings\ <SETTINGS_FILE>\f[]
.PP
Settings to use when running tests.
.PP
\f[C]\-t|\-\-list\-tests\f[]
.PP
List all of the discovered tests in the current project.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
.SS .NET Core 1.x
.PP
\f[C]\-a|\-\-test\-adapter\-path\ <PATH_TO_ADAPTER>\f[]
.PP
Use the custom test adapters from the specified path in the test run.
.PP
\f[C]\-c|\-\-configuration\ {Debug|Release}\f[]
.PP
Defines the build configuration.
The default value is \f[C]Debug\f[], but your project's configuration could override this default SDK setting.
.PP
\f[C]\-d|\-\-diag\ <PATH_TO_DIAGNOSTICS_FILE>\f[]
.PP
Enables diagnostic mode for the test platform and write diagnostic messages to the specified file.
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
Looks for test binaries for a specific framework.
.PP
\f[C]\-\-filter\ <EXPRESSION>\f[]
.PP
Filters out tests in the current project using the given expression.
For more information, see the Filter option details section.
For additional information and examples on how to use selective unit test filtering, see Running selective unit tests.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-l|\-\-logger\ <LoggerUri/FriendlyName>\f[]
.PP
Specifies a logger for test results.
.PP
\f[C]\-\-no\-build\f[]
.PP
Does not build the test project prior to running it.
.PP
\f[C]\-o|\-\-output\ <OUTPUT_DIRECTORY>\f[]
.PP
Directory in which to find the binaries to run.
.PP
\f[C]\-s|\-\-settings\ <SETTINGS_FILE>\f[]
.PP
Settings to use when running tests.
.PP
\f[C]\-t|\-\-list\-tests\f[]
.PP
List all of the discovered tests in the current project.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
.PP
* * * * *
.SH EXAMPLES
.PP
Run the tests in the project in the current directory:
.PP
\f[C]dotnet\ test\f[]
.PP
Run the tests in the \f[C]test1\f[] project:
.PP
\f[C]dotnet\ test\ ~/projects/test1/test1.csproj\f[]
.SS Filter option details
.PP
\f[C]\-\-filter\ <EXPRESSION>\f[]
.PP
\f[C]<Expression>\f[] has the format \f[C]<property><operator><value>[|&<Expression>]\f[].
.PP
\f[C]<property>\f[] is an attribute of the \f[C]Test\ Case\f[].
The following are the properties supported by popular unit test frameworks:
.PP
.TS
tab(@);
c l.
T{
Test Framework
T}@T{
Supported properties
T}
_
.TE
| MSTest |
FullyQualifiedName
Name
ClassName
Priority
TestCategory
| | Xunit |
FullyQualifiedName
DisplayName
Traits
.IP
.nf
\f[C]
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |
\f[]
.fi
.PP
The \f[C]<operator>\f[] describes the relationship between the property and the value:
.PP
.TS
tab(@);
c l.
T{
Operator
T}@T{
Function
T}
_
T{
\f[C]=\f[]
T}@T{
Exact match
T}
T{
\f[C]!=\f[]
T}@T{
Not exact match
T}
T{
\f[C]~\f[]
T}@T{
Contains
T}
.TE
.PP
\f[C]<value>\f[] is a string.
All the lookups are case insensitive.
.PP
An expression without an \f[C]<operator>\f[] is automatically considered as a \f[C]contains\f[] on \f[C]FullyQualifiedName\f[] property (for example, \f[C]dotnet\ test\ \-\-filter\ xyz\f[] is same as \f[C]dotnet\ test\ \-\-filter\ FullyQualifiedName~xyz\f[]).
.PP
Expressions can be joined with conditional operators:
.PP
.TS
tab(@);
c c.
T{
Operator
T}@T{
Function
T}
_
T{
| \ \
T}@T{
OR \ \ \
T}
T{
\f[C]&\f[]
T}@T{
AND
T}
.TE
.PP
You can enclose expressions in parenthesis when using conditional operators (for example, \f[C](Name~TestMethod1)\ |\ (Name~TestMethod2)\f[]).
.PP
For additional information and examples on how to use selective unit test filtering, see Running selective unit tests.
.SS See also
.PP
Frameworks and Targets
.PD 0
.P
.PD
\&.NET Core Runtime IDentifier (RID) catalog
.SH AUTHORS
Microsoft Corporation dotnetclifeedback\@microsoft.com.
mairaw.

View file

@ -0,0 +1,141 @@
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet vstest command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet vstest
.PP
.SH NAME
.PP
\f[C]dotnet\-vstest\f[] \- Runs tests from the specified files.
.SH SYNOPSIS
.PP
\f[C]dotnet\ vstest\ [<TEST_FILE_NAMES>]\ [\-\-Settings|/Settings]\ [\-\-Tests|/Tests]\ [\-\-TestAdapterPath|/TestAdapterPath]\ [\-\-Platform|/Platform]\ [\-\-Framework|/Framework]\ [\-\-Parallel|/Parallel]\ [\-\-TestCaseFilter|/TestCaseFilter]\ [\-\-logger|/logger]\ [\-lt|\-\-ListTests|/lt|/ListTests]\ [\-\-ParentProcessId|/ParentProcessId]\ [\-\-Port|/Port]\ [\-\-Diag|/Diag]\ [[\-\-]\ <args>...]]\ [\-?|\-\-Help|/?|/Help]\f[]
.SH DESCRIPTION
.PP
The \f[C]dotnet\-vstest\f[] command runs the \f[C]VSTest.Console\f[] command\-line application to run automated unit and coded UI application tests.
.SS Arguments
.PP
\f[C]TEST_FILE_NAMES\f[]
.PP
Run tests from the specified assemblies.
Separate multiple test assembly names with spaces.
.SH OPTIONS
.PP
\f[C]\-\-Settings|/Settings:<Settings\ File>\f[]
.PP
Settings to use when running tests.
.PP
\f[C]\-\-Tests|/Tests:<Test\ Names>\f[]
.PP
Run tests with names that match the provided values.
Separate multiple values with commas.
.PP
\f[C]\-\-TestAdapterPath|/TestAdapterPath\f[]
.PP
Use custom test adapters from a given path (if any) in the test run.
.PP
\f[C]\-\-Platform|/Platform:<Platform\ type>\f[]
.PP
Target platform architecture used for test execution.
Valid values are \f[C]x86\f[], \f[C]x64\f[], and \f[C]ARM\f[].
.PP
\f[C]\-\-Framework|/Framework:<Framework\ Version>\f[]
.PP
Target .NET Framework version used for test execution.
Examples of valid values are \f[C]\&.NETFramework,Version=v4.6\f[], \f[C]\&.NETCoreApp,Version=v1.0\f[], etc.
Other supported values are \f[C]Framework35\f[], \f[C]Framework40\f[], \f[C]Framework45\f[], and \f[C]FrameworkCore10\f[].
.PP
\f[C]\-\-Parallel|/Parallel\f[]
.PP
Execute tests in parallel.
By default, all available cores on the machine are available for use.
Set an explicit number of cores with a settings file.
.PP
\f[C]\-\-TestCaseFilter|/TestCaseFilter:<Expression>\f[]
.PP
Run tests that match the given expression.
\f[C]<Expression>\f[] is of the format \f[C]<property>Operator<value>[|&<Expression>]\f[], where Operator is one of \f[C]=\f[], \f[C]!=\f[], or \f[C]~\f[].
Operator \f[C]~\f[] has `contains' semantics and is applicable for string properties like \f[C]DisplayName\f[].
Parenthesis \f[C]()\f[] are used to group sub\-expressions.
.PP
\f[C]\-?|\-\-Help|/?|/Help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-\-logger|/logger:<Logger\ Uri/FriendlyName>\f[]
.PP
Specify a logger for test results.
.IP \[bu] 2
To publish test results to Team Foundation Server, use the \f[C]TfsPublisher\f[] logger provider:
.RS 2
.IP
.nf
\f[C]
/logger:TfsPublisher;
\ \ \ \ Collection=<team\ project\ collection\ url>;
\ \ \ \ BuildName=<build\ name>;
\ \ \ \ TeamProject=<team\ project\ name>
\ \ \ \ [;Platform=<Defaults\ to\ "Any\ CPU">]
\ \ \ \ [;Flavor=<Defaults\ to\ "Debug">]
\ \ \ \ [;RunTitle=<title>]
\f[]
.fi
.RE
.IP \[bu] 2
To log results to a Visual Studio Test Results File (TRX), use the \f[C]trx\f[] logger provider.
This switch creates a file in the test results directory with given log file name.
If \f[C]LogFileName\f[] isn't provided, a unique file name is created to hold the test results.
.RS 2
.IP
.nf
\f[C]
/logger:trx\ [;LogFileName=<Defaults\ to\ unique\ file\ name>]
\f[]
.fi
.RE
.PP
\f[C]\-lt|\-\-ListTests|/lt|/ListTests:<File\ Name>\f[]
.PP
Lists discovered tests from the given test container.
.PP
\f[C]\-\-ParentProcessId|/ParentProcessId:<ParentProcessId>\f[]
.PP
Process Id of the parent process responsible for launching the current process.
.PP
\f[C]\-\-Port|/Port:<Port>\f[]
.PP
Specifies the port for the socket connection and receiving the event messages.
.PP
\f[C]\-\-Diag|/Diag:<Path\ to\ log\ file>\f[]
.PP
Enables verbose logs for the test platform.
Logs are written to the provided file.
.PP
\f[C]args\f[]
.PP
Specifies extra arguments to pass to the adapter.
Arguments are specified as name\-value pairs of the form \f[C]<n>=<v>\f[], where \f[C]<n>\f[] is the argument name and \f[C]<v>\f[] is the argument value.
Use a space to separate multiple arguments.
.SH EXAMPLES
.PP
Run tests in \f[C]mytestproject.dll\f[]:
.PP
\f[C]dotnet\ vstest\ mytestproject.dll\f[]
.PP
Run tests in \f[C]mytestproject.dll\f[], exporting to custom folder with custom name:
.PP
\f[C]dotnet\ vstest\ mytestproject.dll\ \-\-logger:"trx;LogFileName=custom_file_name.trx"\ \-\-ResultsDirectory:custom/file/path\f[]
.PP
Run tests in \f[C]mytestproject.dll\f[] and \f[C]myothertestproject.exe\f[]:
.PP
\f[C]dotnet\ vstest\ mytestproject.dll\ myothertestproject.exe\f[]
.PP
Run \f[C]TestMethod1\f[] tests:
.PP
\f[C]dotnet\ vstest\ /Tests:TestMethod1\f[]
.PP
Run \f[C]TestMethod1\f[] and \f[C]TestMethod2\f[] tests:
.PP
\f[C]dotnet\ vstest\ /Tests:TestMethod1,TestMethod2\f[]
.SH AUTHORS
guardrex.

View file

@ -0,0 +1,401 @@
.\"t
.\" Automatically generated by Pandoc 2.1.3
.\"
.TH "dotnet command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet command
.PP
.SH NAME
.PP
\f[C]dotnet\f[] \- General driver for running the command\-line commands.
.SH SYNOPSIS
.SS .NET Core 2.x
.IP
.nf
\f[C]
dotnet\ [command]\ [arguments]\ [\-\-additional\-deps]\ [\-\-additionalprobingpath]\ [\-d|\-\-diagnostics]
\ \ \ \ [\-\-fx\-version]\ [\-h|\-\-help]\ [\-\-info]\ [\-\-roll\-forward\-on\-no\-candidate\-fx]\ [\-v|\-\-verbosity]\ [\-\-version]
\f[]
.fi
.SS .NET Core 1.x
.IP
.nf
\f[C]
dotnet\ [command]\ [arguments]\ [\-\-additionalprobingpath]\ [\-d|\-\-diagnostics]\ [\-\-fx\-version]
\ \ \ \ [\-h|\-\-help]\ [\-\-info]\ [\-v|\-\-verbosity]\ [\-\-version]
\f[]
.fi
.PP
* * * * *
.SH DESCRIPTION
.PP
\f[C]dotnet\f[] is a generic driver for the Command Line Interface (CLI) toolchain.
Invoked on its own, it provides brief usage instructions.
.PP
Each specific feature is implemented as a command.
In order to use the feature, the command is specified after \f[C]dotnet\f[], such as \f[C]dotnet\ build\f[].
All of the arguments following the command are its own arguments.
.PP
The only time \f[C]dotnet\f[] is used as a command on its own is to run framework\-dependent apps.
Specify an application DLL after the \f[C]dotnet\f[] verb to execute the application (for example, \f[C]dotnet\ myapp.dll\f[]).
.SH OPTIONS
.SS .NET Core 2.x
.PP
\f[C]\-\-additional\-deps\ <PATH>\f[]
.PP
Path to additional \f[I]deps.json\f[] file.
.PP
\f[C]\-\-additionalprobingpath\ <PATH>\f[]
.PP
Path containing probing policy and assemblies to probe.
.PP
\f[C]\-d|\-\-diagnostics\f[]
.PP
Enables diagnostic output.
.PP
\f[C]\-\-fx\-version\ <VERSION>\f[]
.PP
Version of the installed .NET Core runtime to use to run the application.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
If using with \f[C]dotnet\f[], it also prints a list of the available commands.
.PP
\f[C]\-\-info\f[]
.PP
Prints out detailed information about the CLI tooling and the environment, such as the current operating system, commit SHA for the version, and other information.
.PP
\f[C]\-\-roll\-forward\-on\-no\-candidate\-fx\f[]
.PP
Rolls forward on no candidate shared framework.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
Not supported in every command; see specific command page to determine if this option is available.
.PP
\f[C]\-\-version\f[]
.PP
Prints out the version of the .NET Core SDK in use.
.SS .NET Core 1.x
.PP
\f[C]\-\-additionalprobingpath\ <PATH>\f[]
.PP
Path containing probing policy and assemblies to probe.
.PP
\f[C]\-d|\-\-diagnostics\f[]
.PP
Enables diagnostic output.
.PP
\f[C]\-\-fx\-version\ <VERSION>\f[]
.PP
Version of the installed .NET Core runtime to use to run the application.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
If using with \f[C]dotnet\f[], it also prints a list of the available commands.
.PP
\f[C]\-\-info\f[]
.PP
Prints out detailed information about the CLI tooling and the environment, such as the current operating system, commit SHA for the version, and other information.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
Not supported in every command; see specific command page to determine if this option is available.
.PP
\f[C]\-\-version\f[]
.PP
Prints out the version of the .NET Core SDK in use.
.PP
* * * * *
.SS dotnet commands
.SS General
.SS .NET Core 2.x
.PP
.TS
tab(@);
l l.
T{
Command
T}@T{
Function
T}
_
T{
dotnet build
T}@T{
Builds a .NET Core application.
T}
T{
dotnet clean
T}@T{
Clean build outputs.
T}
T{
dotnet help
T}@T{
Shows more detailed documentation online for the command.
T}
T{
dotnet migrate
T}@T{
Migrates a valid Preview 2 project to a .NET Core SDK 1.0 project.
T}
T{
dotnet msbuild
T}@T{
Provides access to the MSBuild command line.
T}
T{
dotnet new
T}@T{
Initializes a C# or F# project for a given template.
T}
T{
dotnet pack
T}@T{
Creates a NuGet package of your code.
T}
T{
dotnet publish
T}@T{
Publishes a .NET framework\-dependent or self\-contained application.
T}
T{
dotnet restore
T}@T{
Restores the dependencies for a given application.
T}
T{
dotnet run
T}@T{
Runs the application from source.
T}
T{
dotnet sln
T}@T{
Options to add, remove, and list projects in a solution file.
T}
T{
dotnet store
T}@T{
Stores assemblies in the runtime package store.
T}
T{
dotnet test
T}@T{
Runs tests using a test runner.
T}
.TE
.SS .NET Core 1.x
.PP
.TS
tab(@);
l l.
T{
Command
T}@T{
Function
T}
_
T{
dotnet build
T}@T{
Builds a .NET Core application.
T}
T{
dotnet clean
T}@T{
Clean build outputs.
T}
T{
dotnet migrate
T}@T{
Migrates a valid Preview 2 project to a .NET Core SDK 1.0 project.
T}
T{
dotnet msbuild
T}@T{
Provides access to the MSBuild command line.
T}
T{
dotnet new
T}@T{
Initializes a C# or F# project for a given template.
T}
T{
dotnet pack
T}@T{
Creates a NuGet package of your code.
T}
T{
dotnet publish
T}@T{
Publishes a .NET framework\-dependent or self\-contained application.
T}
T{
dotnet restore
T}@T{
Restores the dependencies for a given application.
T}
T{
dotnet run
T}@T{
Runs the application from source.
T}
T{
dotnet sln
T}@T{
Options to add, remove, and list projects in a solution file.
T}
T{
dotnet test
T}@T{
Runs tests using a test runner.
T}
.TE
.PP
* * * * *
.SS Project references
.PP
.TS
tab(@);
l l.
T{
Command
T}@T{
Function
T}
_
T{
dotnet add reference
T}@T{
Add a project reference.
T}
T{
dotnet list reference
T}@T{
List project references.
T}
T{
dotnet remove reference
T}@T{
Remove a project reference.
T}
.TE
.SS NuGet packages
.PP
.TS
tab(@);
l l.
T{
Command
T}@T{
Function
T}
_
T{
dotnet add package
T}@T{
Add a NuGet package.
T}
T{
dotnet remove package
T}@T{
Remove a NuGet package.
T}
.TE
.SS NuGet commands
.PP
.TS
tab(@);
l l.
T{
Command
T}@T{
Function
T}
_
T{
dotnet nuget delete
T}@T{
Deletes or unlists a package from the server.
T}
T{
dotnet nuget locals
T}@T{
Clears or lists local NuGet resources such as http\-request cache, temporary cache, or machine\-wide global packages folder.
T}
T{
dotnet nuget push
T}@T{
Pushes a package to the server and publishes it.
T}
.TE
.SH EXAMPLES
.PP
Initialize a sample .NET Core console application that can be compiled and run:
.PP
\f[C]dotnet\ new\ console\f[]
.PP
Restore dependencies for a given application:
.PP
\f[C]dotnet\ restore\f[]
.PP
.PP
Build a project and its dependencies in a given directory:
.PP
\f[C]dotnet\ build\f[]
.PP
Run a framework\-dependent app named \f[C]myapp.dll\f[]:
.PP
\f[C]dotnet\ myapp.dll\f[]
.SH ENVIRONMENT VARIABLES
.SS .NET Core 2.x
.PP
\f[C]DOTNET_PACKAGES\f[]
.PP
The primary package cache.
If not set, it defaults to \f[C]$HOME/.nuget/packages\f[] on Unix or \f[C]%HOME%\\NuGet\\Packages\f[] on Windows.
.PP
\f[C]DOTNET_SERVICING\f[]
.PP
Specifies the location of the servicing index to use by the shared host when loading the runtime.
.PP
\f[C]DOTNET_CLI_TELEMETRY_OPTOUT\f[]
.PP
Specifies whether data about the .NET Core tools usage is collected and sent to Microsoft.
Set to \f[C]true\f[] to opt\-out of the telemetry feature (values \f[C]true\f[], \f[C]1\f[], or \f[C]yes\f[] accepted); otherwise, set to \f[C]false\f[] to opt\-in to the telemetry features (values \f[C]false\f[], \f[C]0\f[], or \f[C]no\f[] accepted).
If not set, the defaults is \f[C]false\f[], and the telemetry feature is active.
.PP
\f[C]DOTNET_MULTILEVEL_LOOKUP\f[]
.PP
Specifies whether .NET Core runtime, shared framework or SDK are resolved from the global location.
If not set, it defaults to \f[C]true\f[].
Set to \f[C]false\f[] to not resolve from the global location and have isolated .NET Core installations (values \f[C]0\f[] or \f[C]false\f[] are accepted).
For more information about multi\-level lookup, see Multi\-level SharedFX Lookup.
.SS .NET Core 1.x
.PP
\f[C]DOTNET_PACKAGES\f[]
.PP
The primary package cache.
If not set, it defaults to \f[C]$HOME/.nuget/packages\f[] on Unix or \f[C]%HOME%\\NuGet\\Packages\f[] on Windows.
.PP
\f[C]DOTNET_SERVICING\f[]
.PP
Specifies the location of the servicing index to use by the shared host when loading the runtime.
.PP
\f[C]DOTNET_CLI_TELEMETRY_OPTOUT\f[]
.PP
Specifies whether data about the .NET Core tools usage is collected and sent to Microsoft.
Set to \f[C]true\f[] to opt\-out of the telemetry feature (values \f[C]true\f[], \f[C]1\f[], or \f[C]yes\f[] accepted); otherwise, set to \f[C]false\f[] to opt\-in to the telemetry features (values \f[C]false\f[], \f[C]0\f[], or \f[C]no\f[] accepted).
If not set, the defaults is \f[C]false\f[], and the telemetry feature is active.
.PP
* * * * *
.SH AUTHORS
mairaw.

View file

@ -0,0 +1,42 @@
# Manpage update tool
Utility to update dotnet-cli documentation from https://github.com/dotnet/docs.
## Prerequisites
* Unix OS
* `python` in PATH
* `pandoc` installed
* `pandocfilters` package installed
* `unzip`
* `wget` or `curl`
## Usage
```sh
./update-man-pages.sh
```
## Ubuntu example (from scratch)
```sh
sudo apt install -y pandoc python python-pip wget unzip < /dev/null
sudo pip install pandocfilters
git clone https://github.com/dotnet/cli
./cli/Documentation/manpage/tool/update-man-pages.sh
```
The version of pandoc is printed in first line as code comment in `.1` (manpage) files.
If your version of pandoc is older than (or even equal to) the last modifed version,
please install the latest stable version of pandoc from https://github.com/jgm/pandoc/releases (deb file for Ubuntu):
```sh
wget -q https://github.com/jgm/pandoc/releases/download/$pandocVersion/$pandocVersionedName.deb > /dev/null
# or
# curl -sSLO https://github.com/jgm/pandoc/releases/download/$pandocVersion/$pandocVersionedName.deb > /dev/null
sudo dpkg -i $pandocVersionedName.deb
rm $pandocVersionedName.deb*
```
after that update manpages by calling `update-man-pages.sh` script.

View file

@ -0,0 +1,54 @@
#!/usr/bin/env python
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
import copy
from pandocfilters import toJSONFilters, Para, Str, Header, Space, Link
def remove_includes(key, value, format, meta):
if key == 'Para' and value[0]['c'] == '[!INCLUDE':
return Para([Str("")])
return None
def promote_and_capitalize_sections(key, value, format, meta):
if key == 'Header':
header_contents = value[2]
header_text = ' '.join([ x['c'] for x in header_contents if x['t'] == 'Str']).lower()
if header_text in ['name', 'synopsis', 'description', 'options', 'examples', 'environment variables']:
# capitalize
for element in header_contents:
if element['t'] == 'Str':
element['c'] = element['c'].upper()
# promote
value = Header(1, value[1], header_contents)
return value
return None
def demote_net_core_1_2(key, value, format, meta):
if key == 'Header':
header_id = value[1][0]
if header_id.startswith('net-core-'):
value = Header(2, value[1], value[2][0]['c'][1])
return value
return None
def remove_references(key, value, format, meta):
if key == 'Link':
pass
if value[1][0]['t'] == 'Code':
return value[1][0]
return Str(' '.join([e['c'] for e in value[1] if 'c' in e.keys()]))
return None
def main():
toJSONFilters([
remove_includes,
promote_and_capitalize_sections,
demote_net_core_1_2,
remove_references,
])
if __name__ == '__main__':
main()

View file

@ -0,0 +1,31 @@
#!/usr/bin/env sh
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
MANPAGE_TOOL_DIR=$(cd $(dirname $0); pwd)
cd $MANPAGE_TOOL_DIR/../sdk
echo "Downloading dotnet/docs master"
if [ -x "$(command -v curl)" ]; then
curl -sSLO https://github.com/dotnet/docs/archive/master.zip > /dev/null
elif [ -x "$(command -v wget)" ]; then
wget -q https://github.com/dotnet/docs/archive/master.zip > /dev/null
else
echo "Please install curl or wget to proceed"
exit 1
fi
unzip -o master.zip > /dev/null
rm master.zip*
ls docs-master/docs/core/tools/dotnet*.md | while read -r line;
do
echo "Working on $line"
pandoc -s -t man -V section=1 -V header=".NET Core" --column=500 --filter $MANPAGE_TOOL_DIR/man-pandoc-filter.py "$line" -o "$(basename ${line%.md}.1)"
done
rm -rf docs-master

View file

@ -3,7 +3,7 @@ Developer Guide
## Prerequisites
In order to build .NET Command Line Interface, you need the following installed on you machine.
In order to build .NET Command-line Interface (CLI), you need the following installed on you machine:
### For Windows
@ -27,7 +27,9 @@ In order to build .NET Command Line Interface, you need the following installed
## Building/Running
1. Run `build.cmd` or `build.sh` from the root depending on your OS. If you don't want to execute tests, run `build.cmd /t:Compile` or `./build.sh /t:Compile`.
2. The CLI that is built (we call it stage 2) will be laid out in the `bin\2\{RID}\dotnet` folder. You can run `dotnet.exe` or `dotnet` from that folder to try out the `dotnet` command.
2. The CLI that is built (we call it stage 2) is laid out in the `bin\2\{RID}\dotnet` folder. You can run `dotnet.exe` or `dotnet` from that folder to try out the `dotnet` command.
> If you need to update localizable strings in resource (*.resx*) files, run `build.cmd /p:UpdateXlfOnBuild=true` or `./build.sh /p:UpdateXlfOnBuild=true` to update the XLIFF (*.xlf*) files as well.
## A simple test
Using the `dotnet` built in the previous step:
@ -56,12 +58,15 @@ The dotnet CLI supports several models for adding new commands:
4. Via the user's `PATH`
### Commands in dotnet.dll
Developers are generally encouraged to avoid adding commands to `dotnet.dll` or the CLI installer directly. This is appropriate for very general commands such as restore, build, publish, test, and clean, but is generally too broad of a distribution mechanism for new commands. Please create an issue and engage the team if you feel there is a missing core command that you would like to add.
### Tools NuGet packages
Many existing extensions, including those for ASP.NET Web applications, extend the CLI using Tools NuGet packages. For an example of a working packaged command look at `TestAssets/TestPackages/dotnet-hello/v1/`.
### MSBuild tasks & targets
NuGet allows adding tasks and targets to a project through a NuGet package. This mechanism, in fact, is how all .NET Core projects pull in the .NET SDK. Extending the CLI through this model has several advantages:
1. Targets have access to the MSBuild Project Context, allowing them to reason about the files and properties being used to build a particular project.
@ -71,7 +76,9 @@ Commands added as targets can be invoked once the target project adds a referenc
Targets are invoked by calling `dotnet msbuild /t:{TargetName}`
### Commands on the PATH
The dotnet CLI considers any executable on the path named `dotnet-{commandName}` to be a command it can call out to.
## Things to Know
- Any added commands are usually invoked through `dotnet {command}`. As a result of this, stdout and stderr are redirected through the driver (`dotnet`) and buffered by line. As a result of this, child commands should use Console.WriteLine in any cases where they expect output to be written immediately. Any uses of Console.Write should be followed by Console.WriteLine to ensure the output is written.

View file

@ -23,9 +23,9 @@ This project has adopted the code of conduct defined by the [Contributor Covenan
Build Status
------------
|Windows x64|Windows x86|macOS|Linux x64 Archive|Linux arm Archive|Linux Native Installers|RHEL 6 Archive|Alpine 3.6 Archive|
|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|
|[![][win-x64-build-badge]][win-x64-build]|[![][win-x86-build-badge]][win-x86-build]|[![][osx-build-badge]][osx-build]|[![][linux-build-badge]][linux-build]|[![][linux-arm-build-badge]][linux-arm-build]|[![][linuxnative-build-badge]][linuxnative-build]|[![][rhel6-build-badge]][rhel6-build]|[![][alpine3.6-build-badge]][alpine3.6-build]|
|Windows x64|Windows x86|macOS|Linux x64 Archive|Linux arm Archive|Linux arm64 Archive|Linux Native Installers|RHEL 6 Archive|Alpine 3.6 Archive|
|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|
|[![][win-x64-build-badge]][win-x64-build]|[![][win-x86-build-badge]][win-x86-build]|[![][osx-build-badge]][osx-build]|[![][linux-build-badge]][linux-build]|[![][linux-arm-build-badge]][linux-arm-build]|[![][linux-arm64-build-badge]][linux-arm64-build]|[![][linuxnative-build-badge]][linuxnative-build]|[![][rhel6-build-badge]][rhel6-build]|[![][alpine3.6-build-badge]][alpine3.6-build]|
[win-x64-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6902/badge
[win-x64-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6902
@ -42,6 +42,9 @@ Build Status
[linux-arm-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/8721/badge
[linux-arm-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=8721
[linux-arm64-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/8817/badge
[linux-arm64-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=8817
[linuxnative-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/7254/badge
[linuxnative-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=7254
@ -62,17 +65,18 @@ To download the .NET Core runtime **without** the SDK, visit https://github.com/
> want to install the latest released versions, check out the [preceding section](#looking-for-v1-of-the-net-core-tooling).
> In order to be able to restore these pre-release packages, you may need to add a NuGet feed pointing to https://dotnet.myget.org/F/dotnet-core/api/v3/index.json. Other feeds may also be necessary depending on what kind of project you are working with.
| Platform | Latest Daily Build<br>*release/2.1.3xx*<br>[![][version-badge]][version] |
| Platform | Latest Daily Build<br>*master*<br>[![][version-badge]][version] |
| -------- | :-------------------------------------: |
| **Windows x64** | [Installer][win-x64-installer] - [Checksum][win-x64-installer-checksum]<br>[zip][win-x64-zip] - [Checksum][win-x64-zip-checksum] |
| **Windows x86** | [Installer][win-x86-installer] - [Checksum][win-x86-installer-checksum]<br>[zip][win-x86-zip] - [Checksum][win-x86-zip-checksum] |
| **macOS** | [Installer][osx-installer] - [Checksum][osx-installer-checksum]<br>[tar.gz][osx-targz] - [Checksum][osx-targz-checksum] |
| **Linux x64** | [DEB Installer][linux-DEB-installer] - [Checksum][linux-DEB-installer-checksum]<br>[RPM Installer][linux-RPM-installer] - [Checksum][linux-RPM-installer-checksum]<br>_see installer note below_<sup>1</sup><br>[tar.gz][linux-targz] - [Checksum][linux-targz-checksum] |
| **Linux arm** | [tar.gz][linux-arm-targz] - [Checksum][linux-arm-targz-checksum] |
| **Linux arm64** | [tar.gz][linux-arm64-targz] - [Checksum][linux-arm64-targz-checksum] |
| **RHEL 6** | [tar.gz][rhel-6-targz] - [Checksum][rhel-6-targz-checksum] |
| **Alpine 3.6** | [tar.gz][alpine-3.6-targz] - [Checksum][alpine-3.6-targz-checksum] |
| Latest Coherent Build<sup>2</sup><br>*release/2.1.3xx* |
| Latest Coherent Build<sup>2</sup><br>*master* |
|:------:|
| [![][coherent-version-badge]][coherent-version] |
@ -80,44 +84,47 @@ Reference notes:
> **1**: *Our Debian packages are put together slightly differently than the other OS specific installers. Instead of combining everything, we have separate component packages that depend on each other. If you're installing these directly from the .deb files (via dpkg or similar), then you'll need to install the [corresponding Host, Host FX Resolver, and Shared Framework packages](https://github.com/dotnet/core-setup#daily-builds) before installing the Sdk package.*
> <br><br>**2**: *A 'coherent' build is defined as a build where the Runtime version matches between the CLI and Asp.NET.*
[version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/latest.version
[coherent-version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/latest.coherent.version
[version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/latest.version
[coherent-version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/latest.coherent.version
[comment]: # (The latest versions are always the same across all platforms. Just need one to show, so picking win-x64's svg.)
[version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/win_x64_Release_version_badge.svg
[coherent-version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/win_x64_Release_coherent_badge.svg
[version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/win_x64_Release_version_badge.svg
[coherent-version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/win_x64_Release_coherent_badge.svg
[win-x64-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x64.exe
[win-x64-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x64.exe.sha
[win-x64-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x64.zip
[win-x64-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x64.zip.sha
[win-x64-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.exe
[win-x64-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.exe.sha
[win-x64-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.zip
[win-x64-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.zip.sha
[win-x86-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x86.exe
[win-x86-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x86.exe.sha
[win-x86-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x86.zip
[win-x86-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x86.zip.sha
[win-x86-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x86.exe
[win-x86-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x86.exe.sha
[win-x86-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x86.zip
[win-x86-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x86.zip.sha
[osx-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-osx-x64.pkg
[osx-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-osx-x64.pkg.sha
[osx-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-osx-x64.tar.gz
[osx-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-osx-x64.tar.gz.sha
[osx-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-osx-x64.pkg
[osx-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-osx-x64.pkg.sha
[osx-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-osx-x64.tar.gz
[osx-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-osx-x64.tar.gz.sha
[linux-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-linux-x64.tar.gz
[linux-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-linux-x64.tar.gz.sha
[linux-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-x64.tar.gz
[linux-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-x64.tar.gz.sha
[linux-arm-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-linux-arm.tar.gz
[linux-arm-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-linux-arm.tar.gz.sha
[linux-arm-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-arm.tar.gz
[linux-arm-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-arm.tar.gz.sha
[linux-DEB-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-x64.deb
[linux-DEB-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-x64.deb.sha
[linux-arm64-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-arm64.tar.gz
[linux-arm64-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-arm64.tar.gz.sha
[linux-RPM-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-x64.rpm
[linux-RPM-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-x64.rpm.sha
[linux-DEB-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-x64.deb
[linux-DEB-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-x64.deb.sha
[rhel-6-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-rhel.6-x64.tar.gz
[rhel-6-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-rhel.6-x64.tar.gz.sha
[linux-RPM-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-x64.rpm
[linux-RPM-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-x64.rpm.sha
[alpine-3.6-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-alpine.3.6-x64.tar.gz
[alpine-3.6-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-alpine.3.6-x64.tar.gz.sha
[rhel-6-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-rhel.6-x64.tar.gz
[rhel-6-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-rhel.6-x64.tar.gz.sha
[alpine-3.6-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-alpine.3.6-x64.tar.gz
[alpine-3.6-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-alpine.3.6-x64.tar.gz.sha
# Debian daily feed

View file

@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildName>cli</BuildName>
<SdkBrandName>Microsoft .NET Core SDK 2.1.300 - Preview</SdkBrandName>
<SdkBrandName>Microsoft .NET Core SDK $(CliBrandingVersion)</SdkBrandName>
<MSBuildExtensionsBrandName>.NET Standard Support for Visual Studio 2015</MSBuildExtensionsBrandName>
<SharedFrameworkBrandName>Microsoft .NET Core Runtime 2.1.0 - Preview</SharedFrameworkBrandName>
<SharedHostBrandName>Microsoft .NET Core Host 2.1.0 - Preview</SharedHostBrandName>

View file

@ -2,7 +2,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MicrosoftAspNetCoreAppPackageVersion>2.1.0-preview2-30475</MicrosoftAspNetCoreAppPackageVersion>
<MicrosoftNETCoreAppPackageVersion>2.1.0-preview2-26406-04</MicrosoftNETCoreAppPackageVersion>
<MicrosoftNETCoreAppPackageVersion>2.1.0-preview3-26411-06</MicrosoftNETCoreAppPackageVersion>
<MicrosoftNETCoreDotNetHostResolverPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</MicrosoftNETCoreDotNetHostResolverPackageVersion>
<MicrosoftBuildPackageVersion>15.7.0-preview-000145</MicrosoftBuildPackageVersion>
<MicrosoftBuildFrameworkPackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildFrameworkPackageVersion>
@ -14,7 +14,7 @@
<MicrosoftNETCoreCompilersPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNETCoreCompilersPackageVersion>
<MicrosoftCodeAnalysisBuildTasksPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisBuildTasksPackageVersion>
<MicrosoftNetCompilersNetcorePackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNetCompilersNetcorePackageVersion>
<MicrosoftNETSdkPackageVersion>2.1.300-preview2-62812-07</MicrosoftNETSdkPackageVersion>
<MicrosoftNETSdkPackageVersion>2.1.300-preview3-62804-06</MicrosoftNETSdkPackageVersion>
<MicrosoftNETBuildExtensionsPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftNETBuildExtensionsPackageVersion>
<MicrosoftNETSdkRazorPackageVersion>$(MicrosoftAspNetCoreAppPackageVersion)</MicrosoftNETSdkRazorPackageVersion>
<MicrosoftNETSdkWebPackageVersion>2.1.300-preview2-20180406-1563552</MicrosoftNETSdkWebPackageVersion>
@ -28,13 +28,13 @@
<MicrosoftTemplateEngineCliLocalizationPackageVersion>$(MicrosoftTemplateEngineCliPackageVersion)</MicrosoftTemplateEngineCliLocalizationPackageVersion>
<MicrosoftTemplateEngineOrchestratorRunnableProjectsPackageVersion>$(MicrosoftTemplateEngineCliPackageVersion)</MicrosoftTemplateEngineOrchestratorRunnableProjectsPackageVersion>
<MicrosoftTemplateEngineUtilsPackageVersion>$(MicrosoftTemplateEngineCliPackageVersion)</MicrosoftTemplateEngineUtilsPackageVersion>
<MicrosoftDotNetPlatformAbstractionsPackageVersion>2.1.0-preview2-26406-04</MicrosoftDotNetPlatformAbstractionsPackageVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>2.1.0-preview2-26406-04</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftDotNetPlatformAbstractionsPackageVersion>2.1.0-preview3-26411-06</MicrosoftDotNetPlatformAbstractionsPackageVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>2.1.0-preview3-26411-06</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftDotNetCliCommandLinePackageVersion>0.2.1-alpha-62806-05</MicrosoftDotNetCliCommandLinePackageVersion>
<MicrosoftDotNetProjectJsonMigrationPackageVersion>1.3.1-alpha-62806-04</MicrosoftDotNetProjectJsonMigrationPackageVersion>
<MicrosoftDotNetToolsMigrateCommandPackageVersion>$(MicrosoftDotNetProjectJsonMigrationPackageVersion)</MicrosoftDotNetToolsMigrateCommandPackageVersion>
<MicrosoftDotNetArchivePackageVersion>0.2.0-beta-62628-01</MicrosoftDotNetArchivePackageVersion>
<NuGetBuildTasksPackageVersion>4.7.0-preview4.5065</NuGetBuildTasksPackageVersion>
<NuGetBuildTasksPackageVersion>4.7.0-rtm.5081</NuGetBuildTasksPackageVersion>
<NuGetBuildTasksPackPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetBuildTasksPackPackageVersion>
<NuGetCommonPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetCommonPackageVersion>
<NuGetCommandLineXPlatPackageVersion>$(NuGetBuildTasksPackageVersion)</NuGetCommandLineXPlatPackageVersion>

View file

@ -1,5 +1,4 @@
<Project>
<Import Project="BundledDotnetTools.props" />
<Target Name="GenerateMSBuildExtensions"
DependsOnTargets="GenerateBundledVersionsProps;GenerateBundledCliToolsProps;RestoreMSBuildExtensionsPackages">

View file

@ -19,18 +19,11 @@
<NugetConfigCLIFeeds>
<![CDATA[
<add key="BlobFeed" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="templating" value="https://dotnet.myget.org/F/templating/api/v3/index.json" />
<add key="aspnetcore-release" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" />
<add key="websdkfeed" value="https://dotnet.myget.org/F/dotnet-web/api/v3/index.json" />
<add key="roslyn" value="https://dotnet.myget.org/f/roslyn/api/v3/index.json" />
<add key="symreader-native" value="https://dotnet.myget.org/f/symreader-native/api/v3/index.json" />
<add key="xunit" value="https://www.myget.org/F/xunit/api/v3/index.json" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="vstest" value="https://dotnet.myget.org/F/vstest/api/v3/index.json" />
<add key="nuget-build" value="https://dotnet.myget.org/F/nuget-build/api/v3/index.json" />
<add key="dotnet-corefxlab" value="https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="container-tools" value="https://www.myget.org/F/container-tools-for-visual-studio/api/v3/index.json" />
<add key="dotnet-msbuild" value="https://dotnet.myget.org/F/msbuild/api/v3/index.json" />
]]>
</NugetConfigCLIFeeds>

View file

@ -3,20 +3,22 @@
<VersionMajor>2</VersionMajor>
<VersionMinor>1</VersionMinor>
<VersionPatch>300</VersionPatch>
<ReleaseSuffix Condition=" '$(ReleaseSuffix)' == '' ">preview2</ReleaseSuffix>
<ReleaseSuffix Condition=" '$(ReleaseSuffix)' == '' ">preview3</ReleaseSuffix>
<CliVersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)</CliVersionPrefix>
<SimpleVersion Condition=" '$(DropSuffix)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion>
<SimpleVersion Condition=" '$(SimpleVersion)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)</SimpleVersion>
<CliVersionNoSuffix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</CliVersionNoSuffix>
<CliVersionPrefix>$(CliVersionNoSuffix)-$(ReleaseSuffix)</CliVersionPrefix>
<CliBrandingVersion>$(CliVersionNoSuffix) - $(ReleaseSuffix)</CliBrandingVersion>
<SimpleVersion Condition=" '$(DropSuffix)' == '' ">$(CliVersionNoSuffix).$(CommitCount)</SimpleVersion>
<SimpleVersion Condition=" '$(SimpleVersion)' == '' ">$(CliVersionNoSuffix)</SimpleVersion>
<VersionSuffix Condition=" '$(DropSuffix)' == '' ">$(ReleaseSuffix)-$(CommitCount)</VersionSuffix>
<VersionSuffix Condition=" '$(DropSuffix)' == '' ">$(ReleaseSuffix)-$(CommitCount)</VersionSuffix>
<FullNugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)-$(CommitCount)</FullNugetVersion>
<FullNugetVersion>$(CliVersionNoSuffix)-$(ReleaseSuffix)-$(CommitCount)</FullNugetVersion>
<NugetVersion Condition=" '$(DropSuffix)' == '' ">$(FullNugetVersion)</NugetVersion>
<NugetVersion Condition=" '$(NugetVersion)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)</NugetVersion>
<NugetVersion Condition=" '$(DropSuffix)' == '' ">$(FullNugetVersion)</NugetVersion>
<NugetVersion Condition=" '$(NugetVersion)' == '' ">$(CliVersionNoSuffix)</NugetVersion>
<SdkVersion>$(NugetVersion)</SdkVersion>
<SdkNugetVersion>$(NugetVersion)</SdkNugetVersion>
<SdkNugetVersion>$(NugetVersion)</SdkNugetVersion>
</PropertyGroup>
</Project>

View file

@ -53,8 +53,8 @@
<!-- Create layout: Generate and Place postinst -->
<ReplaceFileContents
InputFile="$(DebianPostinstTemplateFile)"
DestinationFile="$(DebianPostinstFile)"
InputFiles="$(DebianPostinstTemplateFile)"
DestinationFiles="$(DebianPostinstFile)"
ReplacementItems="@(DebianPostInstTokenValues)" />
<Chmod
@ -63,8 +63,8 @@
<!-- Create layout: Generate and Place debian_config.json -->
<ReplaceFileContents
InputFile="$(DebianConfigTemplateFile)"
DestinationFile="$(DebianConfigJsonFile)"
InputFiles="$(DebianConfigTemplateFile)"
DestinationFiles="$(DebianConfigJsonFile)"
ReplacementItems="@(DebianConfigTokenValues)" />
<Chmod

View file

@ -154,7 +154,9 @@
'$(SimpleVersion)'
'$(NugetVersion)'
'$(CombinedFrameworkSDKHostInstallerUpgradeCode)'
'$(Architecture)'" />
'$(Architecture)'
'$(MicrosoftNETCoreAppPackageVersion)'
'$(AspNetCoreVersion)'" />
</Target>
<Target Name="GenerateSdkNupkg"

View file

@ -17,7 +17,7 @@
<SdkPkgScriptTemplateFile>$(SdkPkgScriptsDirectory)/postinstall</SdkPkgScriptTemplateFile>
<SdkPkgDestinationScriptsDirectory>$(PkgIntermediateDirectory)/scripts</SdkPkgDestinationScriptsDirectory>
<SdkPkgScriptFile>$(SdkPkgDestinationScriptsDirectory)/postinstall</SdkPkgScriptFile>
<SdkProductArchiveResourcesDirectory>$(SdkPkgSourcesRootDirectory)/resources</SdkProductArchiveResourcesDirectory>
<SdkProductArchiveResourcesDirectory>$(PkgIntermediateDirectory)/resources</SdkProductArchiveResourcesDirectory>
<SdkProductArchiveDistributionTemplateFile>$(SdkPkgSourcesRootDirectory)/Distribution-Template</SdkProductArchiveDistributionTemplateFile>
<SdkProductArchiveDistributionFile>$(PkgIntermediateDirectory)/CLI-SDK-Formatted-Distribution-Template.xml</SdkProductArchiveDistributionFile>
@ -61,6 +61,16 @@
<PostInstallScriptReplacement Include="%SDK_VERSION%">
<ReplacementString>$(SdkVersion)</ReplacementString>
</PostInstallScriptReplacement>
<ResourcesReplacement Include="{DOTNETSDKVERSION}">
<ReplacementString>$(SdkVersion)</ReplacementString>
</ResourcesReplacement>
<ResourcesReplacement Include="{DOTNETRUNTIMEVERSION}">
<ReplacementString>$(MicrosoftNETCoreAppPackageVersion)</ReplacementString>
</ResourcesReplacement>
<ResourcesReplacement Include="{ASPNETCOREVERSION}">
<ReplacementString>$(AspNetCoreVersion)</ReplacementString>
</ResourcesReplacement>
</ItemGroup>
<!-- Consumed By Publish -->
@ -69,6 +79,8 @@
</ItemGroup>
<ItemGroup>
<SdkProductArchiveResourcesTemplateFiles Include="$(SdkPkgSourcesRootDirectory)/resources/**/*" />
<GenerateSdkPkgInputs Include="$(SdkLayoutOutputDirectory)/**/*" />
<GenerateSdkPkgInputs Include="$(SdkPkgScriptsDirectory)/**/*" />
@ -77,7 +89,7 @@
<GenerateSdkProductArchiveInputs Include="$(DownloadedHostFxrInstallerFile)" />
<GenerateSdkProductArchiveInputs Include="$(DownloadedSharedHostInstallerFile)" />
<GenerateSdkProductArchiveInputs Include="$(SdkProductArchiveDistributionTemplateFile)" />
<GenerateSdkProductArchiveInputs Include="$(SdkProductArchiveResourcesDirectory)/**/*" />
<GenerateSdkProductArchiveInputs Include="@(SdkProductArchiveResourcesTemplateFiles)" />
</ItemGroup>
</Target>
@ -91,11 +103,17 @@
DestinationFiles="@(AspNetRuntimeFilesInput->'$(SdkLayoutOutputDirectory)/%(RecursiveDir)%(FileName)%(Extension)')" />
<ReplaceFileContents
InputFile="$(SdkPkgScriptTemplateFile)"
DestinationFile="$(SdkPkgScriptFile)"
InputFiles="$(SdkPkgScriptTemplateFile)"
DestinationFiles="$(SdkPkgScriptFile)"
ReplacementPatterns="@(PostInstallScriptReplacement -> '%(Identity)')"
ReplacementStrings="@(PostInstallScriptReplacement -> '%(ReplacementString)')" />
<ReplaceFileContents
InputFiles="@(SdkProductArchiveResourcesTemplateFiles)"
DestinationFiles="@(SdkProductArchiveResourcesTemplateFiles -> '$(SdkProductArchiveResourcesDirectory)/%(RecursiveDir)%(Filename)%(Extension)')"
ReplacementPatterns="@(ResourcesReplacement -> '%(Identity)')"
ReplacementStrings="@(ResourcesReplacement -> '%(ReplacementString)')" />
<Chmod
Glob="$(SdkPkgScriptFile)"
Mode="ugo+x" />
@ -130,8 +148,8 @@
<!-- Fill out parameters in the Distribution Template -->
<ReplaceFileContents
InputFile="$(SdkProductArchiveDistributionTemplateFile)"
DestinationFile="$(SdkProductArchiveDistributionFile)"
InputFiles="$(SdkProductArchiveDistributionTemplateFile)"
DestinationFiles="$(SdkProductArchiveDistributionFile)"
ReplacementPatterns="@(DistributionTemplateReplacement -> '%(Identity)')"
ReplacementStrings="@(DistributionTemplateReplacement -> '%(ReplacementString)')" />

View file

@ -104,16 +104,16 @@
<GeneratedInstallers Include="$(SdkInstallerFile)" />
</ItemGroup>
<ReplaceFileContents InputFile="$(AfterInstallHostScriptTemplateFile)"
DestinationFile="$(AfterInstallHostScriptDestinationFile)"
<ReplaceFileContents InputFiles="$(AfterInstallHostScriptTemplateFile)"
DestinationFiles="$(AfterInstallHostScriptDestinationFile)"
ReplacementItems="@(AfterInstallHostTokenValue)"/>
<Chmod
Glob="$(AfterInstallHostScriptDestinationFile)"
Mode="ugo+x" />
<ReplaceFileContents InputFile="$(ConfigJsonFile)"
DestinationFile="$(RpmLayoutDirectory)$(RpmConfigJsonName)"
<ReplaceFileContents InputFiles="$(ConfigJsonFile)"
DestinationFiles="$(RpmLayoutDirectory)$(RpmConfigJsonName)"
ReplacementItems="@(SDKTokenValue)"/>
<!-- Call the task to build the pre-reqs (parameters, copyright, changelog) for calling the FPM tool -->

View file

@ -9,8 +9,8 @@
<Message Text="$(VersionBadge)" />
<ReplaceFileContents
InputFile="$(VersionSvgTemplate)"
DestinationFile="$(VersionBadge)"
InputFiles="$(VersionSvgTemplate)"
DestinationFiles="$(VersionBadge)"
ReplacementPatterns="ver_number"
ReplacementStrings="$(SdkVersion)" />
</Target>
@ -21,8 +21,8 @@
<Message Text="$(CoherentBadge)" />
<ReplaceFileContents
InputFile="$(VersionSvgTemplate)"
DestinationFile="$(CoherentBadge)"
InputFiles="$(VersionSvgTemplate)"
DestinationFiles="$(CoherentBadge)"
ReplacementPatterns="ver_number"
ReplacementStrings="$(SdkVersion)" />
</Target>

View file

@ -5,7 +5,8 @@
DependsOnTargets="CheckIfAllBuildsHavePublished;
FinalizeBuild" />
<Target Name="CheckIfAllBuildsHavePublished">
<Target Name="CheckIfAllBuildsHavePublished"
DependsOnTargets="SetBadgeProps">
<CheckIfAllBuildsHavePublished AccountKey="$(ArtifactCloudDropAccessToken)"
AccountName="$(ArtifactCloudDropAccountName)"
ContainerName="$(ArtifactContainerName)"

View file

@ -55,8 +55,9 @@ namespace Microsoft.DotNet.Cli.Build
{ "linux_x64", false },
{ "rhel.6_x64", false },
{ "alpine.3.6_x64", false },
{ "all_linux_distros_native_installer", false},
{ "linux_arm", false}
{ "all_linux_distros_native_installer", false },
{ "linux_arm", false },
{ "linux_arm64", false }
};
if (!badges.ContainsKey(VersionBadgeMoniker))
@ -70,7 +71,7 @@ namespace Microsoft.DotNet.Cli.Build
string name = Path.GetFileName(file);
foreach (string img in badges.Keys)
{
if ((name.StartsWith($"{img}")) && (name.EndsWith(".svg")))
if ((name.StartsWith($"{img}_")) && (name.EndsWith(".svg")))
{
badges[img] = true;
break;

View file

@ -85,7 +85,7 @@ namespace Microsoft.DotNet.Cli.Build
{
if (!string.IsNullOrEmpty(Runtime))
{
return $"/p:RuntimeIdentifier={Runtime}";
return $"-property:RuntimeIdentifier={Runtime}";
}
return null;

View file

@ -71,7 +71,7 @@ namespace Microsoft.DotNet.Cli.Build
{
if (SkipInvalidConfigurations)
{
return "/p:SkipInvalidConfigurations=true";
return "-property:SkipInvalidConfigurations=true";
}
return null;
@ -81,7 +81,7 @@ namespace Microsoft.DotNet.Cli.Build
{
if (!string.IsNullOrEmpty(Runtime))
{
return $"/p:RuntimeIdentifier={Runtime}";
return $"-property:RuntimeIdentifier={Runtime}";
}
return null;

View file

@ -3,6 +3,7 @@
using System;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using Microsoft.Build.Utilities;
using Microsoft.Build.Framework;
@ -28,10 +29,10 @@ namespace Microsoft.DotNet.Cli.Build
public class ReplaceFileContents : Task
{
[Required]
public string InputFile { get; set; }
public ITaskItem[] InputFiles { get; set; }
[Required]
public string DestinationFile { get; set; }
public ITaskItem[] DestinationFiles { get; set; }
public ITaskItem[] ReplacementItems { get; set; }
@ -55,19 +56,36 @@ namespace Microsoft.DotNet.Cli.Build
throw new Exception($"Expected {nameof(ReplacementPatterns)} (length {ReplacementPatterns.Length}) and {nameof(ReplacementStrings)} (length {ReplacementStrings.Length}) to have the same length.");
}
if (!File.Exists(InputFile))
if (InputFiles.Length != DestinationFiles.Length)
{
throw new FileNotFoundException($"Expected file {InputFile} was not found.");
throw new Exception($"Expected {nameof(InputFiles)} (length {InputFiles.Length}) and {nameof(DestinationFiles)} (length {DestinationFiles.Length}) to have the same length.");
}
string inputFileText = File.ReadAllText(InputFile);
string outputFileText = ReplacePatterns(inputFileText);
var filesNotFound = InputFiles.Where(i => !File.Exists(i.ItemSpec)).Select(i => i.ItemSpec);
if (filesNotFound.Any())
{
var filesNotFoundString = string.Join(",", filesNotFound);
throw new FileNotFoundException($"Expected files where not found: {filesNotFoundString}");
}
WriteOutputFile(outputFileText);
Log.LogMessage(MessageImportance.High, $"ReplacingContents for `{InputFiles.Length}` files.");
for (var i = 0; i < InputFiles.Length; i++)
{
ReplaceContents(InputFiles[i].ItemSpec, DestinationFiles[i].ItemSpec);
}
return true;
}
public void ReplaceContents(string inputFile, string destinationFile)
{
string inputFileText = File.ReadAllText(inputFile);
string outputFileText = ReplacePatterns(inputFileText);
WriteOutputFile(destinationFile, outputFileText);
}
public string ReplacePatterns(string inputFileText)
{
var outText = inputFileText;
@ -92,15 +110,18 @@ namespace Microsoft.DotNet.Cli.Build
return outText;
}
public void WriteOutputFile(string outputFileText)
public void WriteOutputFile(string destinationFile, string outputFileText)
{
var destinationDirectory = Path.GetDirectoryName(DestinationFile);
var destinationDirectory = Path.GetDirectoryName(destinationFile);
Log.LogMessage(MessageImportance.High, $"Destination Directory: {destinationDirectory}");
if (!Directory.Exists(destinationDirectory))
{
Log.LogMessage(MessageImportance.High, $"Destination Directory `{destinationDirectory}` does not exist. Creating...");
Directory.CreateDirectory(destinationDirectory);
}
File.WriteAllText(DestinationFile, outputFileText);
Log.LogMessage(MessageImportance.High, $"Writing file: {destinationFile}");
File.WriteAllText(destinationFile, outputFileText);
}
}
}

View file

@ -9,7 +9,7 @@ def project = GithubProject
def branch = GithubBranchName
def isPR = true
def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'Windows_NT_ES:x64:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug', 'RHEL6:x64:Debug', 'Alpine3.6:x64:Debug', 'Linux:arm:Debug']
def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'Windows_NT_ES:x64:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug', 'RHEL6:x64:Debug', 'Alpine3.6:x64:Debug', 'Linux:arm:Debug', 'Linux:arm64:Debug']
def static getBuildJobName(def configuration, def os, def architecture) {
return configuration.toLowerCase() + '_' + os.toLowerCase() + '_' + architecture.toLowerCase()
@ -44,7 +44,7 @@ set DOTNET_CLI_UI_LANGUAGE=es
}
else if (os == 'Linux') {
osUsedForMachineAffinity = 'Ubuntu16.04';
if (architecture == 'arm') {
if ((architecture == 'arm') || (architecture == 'arm64')) {
buildCommand = "./build.sh --linux-portable --skip-prereqs --architecture ${architecture} --configuration ${configuration} --targets Default /p:CLIBUILD_SKIP_TESTS=true"
}
else {
@ -81,7 +81,7 @@ set DOTNET_CLI_UI_LANGUAGE=es
Utilities.setMachineAffinity(newJob, osUsedForMachineAffinity, 'latest-or-auto')
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
// ARM CI runs are build only.
if (architecture != 'arm') {
if ((architecture != 'arm') && (architecture != 'arm64')) {
Utilities.addMSTestResults(newJob, '**/*.trx')
}
Utilities.addGithubPRTriggerForBranch(newJob, branch, "${os} ${architecture} ${configuration} Build")

View file

@ -7,9 +7,9 @@
<div align="left" style="font-family: Helvetica;padding-left:10px">
<p>The following was installed at /usr/local/share/dotnet</h2>
<ul>
<li>.NET Core SDK 2.1.300</li>
<li>.NET Core Runtime 2.1.0</li>
<li>ASP.NET Core Runtime 2.1.0</li>
<li>.NET Core SDK {DOTNETSDKVERSION}</li>
<li>.NET Core Runtime {DOTNETRUNTIMEVERSION}</li>
<li>ASP.NET Core Runtime {ASPNETCOREVERSION}</li>
</ul>
</div>
<br>

View file

@ -7,9 +7,9 @@
<div align="left" style="font-family: Helvetica;padding-left:10px">
<p>The following was installed at /usr/local/share/dotnet</h2>
<ul>
<li>.NET Core SDK 2.1.300</li>
<li>.NET Core Runtime 2.1.0</li>
<li>ASP.NET Core Runtime 2.1.0</li>
<li>.NET Core SDK {DOTNETSDKVERSION}</li>
<li>.NET Core Runtime {DOTNETRUNTIMEVERSION}</li>
<li>ASP.NET Core Runtime {ASPNETCOREVERSION}</li>
</ul>
</div>
<br>

View file

@ -7,9 +7,9 @@
<div align="left" style="font-family: Helvetica;padding-left:10px">
<p>The following was installed at /usr/local/share/dotnet</h2>
<ul>
<li>.NET Core SDK 2.1.300</li>
<li>.NET Core Runtime 2.1.0</li>
<li>ASP.NET Core Runtime 2.1.0</li>
<li>.NET Core SDK {DOTNETSDKVERSION}</li>
<li>.NET Core Runtime {DOTNETRUNTIMEVERSION}</li>
<li>ASP.NET Core Runtime {ASPNETCOREVERSION}</li>
</ul>
</div>
<br>

View file

@ -7,9 +7,9 @@
<div align="left" style="font-family: Helvetica;padding-left:10px">
<p>The following was installed at /usr/local/share/dotnet</h2>
<ul>
<li>.NET Core SDK 2.1.300</li>
<li>.NET Core Runtime 2.1.0</li>
<li>ASP.NET Core Runtime 2.1.0</li>
<li>.NET Core SDK {DOTNETSDKVERSION}</li>
<li>.NET Core Runtime {DOTNETRUNTIMEVERSION}</li>
<li>ASP.NET Core Runtime {ASPNETCOREVERSION}</li>
</ul>
</div>
<br>

View file

@ -7,9 +7,9 @@
<div align="left" style="font-family: Helvetica;padding-left:10px">
<p>The following was installed at /usr/local/share/dotnet</h2>
<ul>
<li>.NET Core SDK 2.1.300</li>
<li>.NET Core Runtime 2.1.0</li>
<li>ASP.NET Core Runtime 2.1.0</li>
<li>.NET Core SDK {DOTNETSDKVERSION}</li>
<li>.NET Core Runtime {DOTNETRUNTIMEVERSION}</li>
<li>ASP.NET Core Runtime {ASPNETCOREVERSION}</li>
</ul>
</div>
<br>

View file

@ -7,9 +7,9 @@
<div align="left" style="font-family: Helvetica;padding-left:10px">
<p>The following was installed at /usr/local/share/dotnet</h2>
<ul>
<li>.NET Core SDK 2.1.300</li>
<li>.NET Core Runtime 2.1.0</li>
<li>ASP.NET Core Runtime 2.1.0</li>
<li>.NET Core SDK {DOTNETSDKVERSION}</li>
<li>.NET Core Runtime {DOTNETRUNTIMEVERSION}</li>
<li>ASP.NET Core Runtime {ASPNETCOREVERSION}</li>
</ul>
</div>
<br>

View file

@ -7,9 +7,9 @@
<div align="left" style="font-family: Helvetica;padding-left:10px">
<p>The following was installed at /usr/local/share/dotnet</h2>
<ul>
<li>.NET Core SDK 2.1.300</li>
<li>.NET Core Runtime 2.1.0</li>
<li>ASP.NET Core Runtime 2.1.0</li>
<li>.NET Core SDK {DOTNETSDKVERSION}</li>
<li>.NET Core Runtime {DOTNETRUNTIMEVERSION}</li>
<li>ASP.NET Core Runtime {ASPNETCOREVERSION}</li>
</ul>
</div>
<br>

View file

@ -7,9 +7,9 @@
<div align="left" style="font-family: Helvetica;padding-left:10px">
<p>The following was installed at /usr/local/share/dotnet</h2>
<ul>
<li>.NET Core SDK 2.1.300</li>
<li>.NET Core Runtime 2.1.0</li>
<li>ASP.NET Core Runtime 2.1.0</li>
<li>.NET Core SDK {DOTNETSDKVERSION}</li>
<li>.NET Core Runtime {DOTNETRUNTIMEVERSION}</li>
<li>ASP.NET Core Runtime {ASPNETCOREVERSION}</li>
</ul>
</div>
<br>

View file

@ -7,9 +7,9 @@
<div align="left" style="font-family: Helvetica;padding-left:10px">
<p>The following was installed at /usr/local/share/dotnet</h2>
<ul>
<li>.NET Core SDK 2.1.300</li>
<li>.NET Core Runtime 2.1.0</li>
<li>ASP.NET Core Runtime 2.1.0</li>
<li>.NET Core SDK {DOTNETSDKVERSION}</li>
<li>.NET Core Runtime {DOTNETRUNTIMEVERSION}</li>
<li>ASP.NET Core Runtime {ASPNETCOREVERSION}</li>
</ul>
</div>
<br>

View file

@ -7,9 +7,9 @@
<div align="left" style="font-family: Helvetica;padding-left:10px">
<p>The following was installed at /usr/local/share/dotnet</h2>
<ul>
<li>.NET Core SDK 2.1.300</li>
<li>.NET Core Runtime 2.1.0</li>
<li>ASP.NET Core Runtime 2.1.0</li>
<li>.NET Core SDK {DOTNETSDKVERSION}</li>
<li>.NET Core Runtime {DOTNETRUNTIMEVERSION}</li>
<li>ASP.NET Core Runtime {ASPNETCOREVERSION}</li>
</ul>
</div>
<br>

View file

@ -7,9 +7,9 @@
<div align="left" style="font-family: Helvetica;padding-left:10px">
<p>The following was installed at /usr/local/share/dotnet</h2>
<ul>
<li>.NET Core SDK 2.1.300</li>
<li>.NET Core Runtime 2.1.0</li>
<li>ASP.NET Core Runtime 2.1.0</li>
<li>.NET Core SDK {DOTNETSDKVERSION}</li>
<li>.NET Core Runtime {DOTNETRUNTIMEVERSION}</li>
<li>ASP.NET Core Runtime {ASPNETCOREVERSION}</li>
</ul>
</div>
<br>

View file

@ -7,9 +7,9 @@
<div align="left" style="font-family: Helvetica;padding-left:10px">
<p>The following was installed at /usr/local/share/dotnet</h2>
<ul>
<li>.NET Core SDK 2.1.300</li>
<li>.NET Core Runtime 2.1.0</li>
<li>ASP.NET Core Runtime 2.1.0</li>
<li>.NET Core SDK {DOTNETSDKVERSION}</li>
<li>.NET Core Runtime {DOTNETRUNTIMEVERSION}</li>
<li>ASP.NET Core Runtime {ASPNETCOREVERSION}</li>
</ul>
</div>
<br>

View file

@ -7,9 +7,9 @@
<div align="left" style="font-family: Helvetica;padding-left:10px">
<p>The following was installed at /usr/local/share/dotnet</h2>
<ul>
<li>.NET Core SDK 2.1.300</li>
<li>.NET Core Runtime 2.1.0</li>
<li>ASP.NET Core Runtime 2.1.0</li>
<li>.NET Core SDK {DOTNETSDKVERSION}</li>
<li>.NET Core Runtime {DOTNETRUNTIMEVERSION}</li>
<li>ASP.NET Core Runtime {ASPNETCOREVERSION}</li>
</ul>
</div>
<br>

View file

@ -7,9 +7,9 @@
<div align="left" style="font-family: Helvetica;padding-left:10px">
<p>The following was installed at /usr/local/share/dotnet</h2>
<ul>
<li>.NET Core SDK 2.1.300</li>
<li>.NET Core Runtime 2.1.0</li>
<li>ASP.NET Core Runtime 2.1.0</li>
<li>.NET Core SDK {DOTNETSDKVERSION}</li>
<li>.NET Core Runtime {DOTNETRUNTIMEVERSION}</li>
<li>ASP.NET Core Runtime {ASPNETCOREVERSION}</li>
</ul>
</div>
<br>

View file

@ -50,9 +50,9 @@
<String Id="FirstTimeWelcomeMessage">The installation was successful
The following were installed at [DOTNETHOME]
• .NET Core SDK 2.1.300
• .NET Core Runtime 2.1.0
• ASP.NET Core Runtime 2.1.0
• .NET Core SDK [DOTNETSDKVERSION]
• .NET Core Runtime [DOTNETRUNTIMEVERSION]
• ASP.NET Core Runtime [ASPNETCOREVERSION]
This product collects usage data
• More information and opt-out https://aka.ms/dotnet-cli-telemetry

View file

@ -24,6 +24,9 @@
<Variable Name="DOTNETHOME" Type="string" Value="[ProgramFiles6432Folder]dotnet" bal:Overridable="no" />
<Variable Name="BUNDLEMONIKER" Type="string" Value="$(var.ProductMoniker)" bal:Overridable="no" />
<Variable Name="DOTNETSDKVERSION" Type="string" Value="$(var.DisplayVersion)" bal:Overridable="no" />
<Variable Name="DOTNETRUNTIMEVERSION" Type="string" Value="$(var.DotNetRuntimeVersion)" bal:Overridable="no" />
<Variable Name="ASPNETCOREVERSION" Type="string" Value="$(var.AspNetCoreVersion)" bal:Overridable="no" />
<Chain DisableSystemRestore="yes" ParallelCache="yes">
<MsiPackage SourceFile="$(var.SharedFXMsiSourcePath)">

View file

@ -14,7 +14,9 @@ param(
[Parameter(Mandatory=$true)][string]$DotnetCLIDisplayVersion,
[Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion,
[Parameter(Mandatory=$true)][string]$UpgradeCode,
[Parameter(Mandatory=$true)][string]$Architecture
[Parameter(Mandatory=$true)][string]$Architecture,
[Parameter(Mandatory=$true)][string]$DotNetRuntimeVersion,
[Parameter(Mandatory=$true)][string]$AspNetCoreVersion
)
. "$PSScriptRoot\..\..\..\scripts\common\_common.ps1"
@ -43,6 +45,8 @@ function RunCandleForBundle
-dAdditionalSharedFXMsiSourcePath="$AdditionalSharedFxMSIFile" `
-dAdditionalHostFXRMsiSourcePath="$AdditionalHostFxrMSIFile" `
-dAdditionalSharedHostMsiSourcePath="$AdditionalSharedHostMSIFile" `
-dDotNetRuntimeVersion="$DotNetRuntimeVersion" `
-dAspNetCoreVersion="$AspNetCoreVersion" `
-arch "$Architecture" `
-ext WixBalExtension.dll `
-ext WixUtilExtension.dll `

View file

@ -20,7 +20,7 @@ if($Help)
Write-Output ""
Write-Output "Options:"
Write-Output " -Configuration <CONFIGURATION> Build the specified Configuration (Debug or Release, default: Debug)"
Write-Output " -Architecture <ARCHITECTURE> Build the specified architecture (x64, x86, or arm , default: x64)"
Write-Output " -Architecture <ARCHITECTURE> Build the specified architecture (x64, x86, arm, or arm64 , default: x64)"
Write-Output " -NoPackage Skip packaging targets"
Write-Output " -NoBuild Skip building the product"
Write-Output " -Help Display this help message"
@ -75,6 +75,9 @@ $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Don't resolve shared frameworks from user or global locations
$env:DOTNET_MULTILEVEL_LOOKUP=0
# Turn off MSBuild Node re-use
$env:MSBUILDDISABLENODEREUSE=1
# Enable vs test console logging
$env:VSTEST_BUILD_TRACE=1
$env:VSTEST_TRACE_BUILD=1

View file

@ -107,7 +107,7 @@ while [[ $# > 0 ]]; do
echo ""
echo "Options:"
echo " --configuration <CONFIGURATION> Build the specified Configuration (Debug or Release, default: Debug)"
echo " --architecture <ARCHITECTURE> Build the specified architecture (x64 or arm , default: x64)"
echo " --architecture <ARCHITECTURE> Build the specified architecture (x64, arm or arm64 , default: x64)"
echo " --skip-prereqs Skip checks for pre-reqs in dotnet_install"
echo " --nopackage Skip packaging targets"
echo " --nobuild Skip building, showing the command that would be used to build"
@ -151,6 +151,9 @@ export VSTEST_TRACE_BUILD=1
# Don't resolve shared frameworks from user or global locations
export DOTNET_MULTILEVEL_LOOKUP=0
# Turn off MSBuild Node re-use
export MSBUILDDISABLENODEREUSE=1
# Install a stage 0
INSTALL_ARCHITECTURE=$ARCHITECTURE
archlower="$(echo $ARCHITECTURE | awk '{print tolower($0)}')"

View file

@ -0,0 +1,29 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Runtime.InteropServices;
namespace Microsoft.DotNet.Cli.Utils
{
internal class FilePermissionSetter : IFilePermissionSetter
{
public void SetUserExecutionPermission(string path)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return;
}
CommandResult result = new CommandFactory()
.Create("chmod", new[] { "u+x", path })
.CaptureStdOut()
.CaptureStdErr()
.Execute();
if (result.ExitCode != 0)
{
throw new FilePermissionSettingException(result.StdErr);
}
}
}
}

View file

@ -354,12 +354,12 @@ namespace Microsoft.DotNet.Cli.Utils
var args = new List<string>();
args.Add(toolDepsJsonGeneratorProject);
args.Add($"/p:ProjectAssetsFile=\"{toolLockFile.Path}\"");
args.Add($"/p:ToolName={toolLibrary.Name}");
args.Add($"/p:ProjectDepsFilePath={tempDepsFile}");
args.Add($"-property:ProjectAssetsFile=\"{toolLockFile.Path}\"");
args.Add($"-property:ToolName={toolLibrary.Name}");
args.Add($"-property:ProjectDepsFilePath={tempDepsFile}");
var toolTargetFramework = toolLockFile.Targets.First().TargetFramework.GetShortFolderName();
args.Add($"/p:TargetFramework={toolTargetFramework}");
args.Add($"-property:TargetFramework={toolTargetFramework}");
// Look for the .props file in the Microsoft.NETCore.App package, until NuGet
@ -384,7 +384,7 @@ namespace Microsoft.DotNet.Cli.Utils
if (platformLibraryPropsFile != null)
{
args.Add($"/p:AdditionalImport={platformLibraryPropsFile}");
args.Add($"-property:AdditionalImport={platformLibraryPropsFile}");
}
}
}

View file

@ -13,14 +13,21 @@ namespace Microsoft.DotNet.Cli.Utils
{
private static string _placeHolder = "c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2"; //hash value embedded in default apphost executable
private static byte[] _bytesToSearch = Encoding.UTF8.GetBytes(_placeHolder);
/// <summary>
/// Create an AppHost with embedded configuration of app binary location
/// </summary>
/// <param name="appHostSourceFilePath">The path of AppHost template, which has the place holder</param>
/// <param name="appHostDestinationFilePath">The destination path for desired location to place, including the file name</param>
/// <param name="appBinaryFilePath">Full path to app binary or relative path to appHostDestinationFilePath</param>
public static void EmbedAndReturnModifiedAppHostPath(
string appHostSourceFilePath,
string appHostDestinationFilePath,
string appBinaryName)
string appBinaryFilePath)
{
var hostExtension = Path.GetExtension(appHostSourceFilePath);
var appbaseName = Path.GetFileNameWithoutExtension(appBinaryName);
var bytesToWrite = Encoding.UTF8.GetBytes(appBinaryName);
var appbaseName = Path.GetFileNameWithoutExtension(appBinaryFilePath);
var bytesToWrite = Encoding.UTF8.GetBytes(appBinaryFilePath);
var destinationDirectory = new FileInfo(appHostDestinationFilePath).Directory.FullName;
if (File.Exists(appHostDestinationFilePath))
@ -31,7 +38,7 @@ namespace Microsoft.DotNet.Cli.Utils
if (bytesToWrite.Length > 1024)
{
throw new EmbedAppNameInHostException(string.Format(LocalizableStrings.EmbedAppNameInHostFileNameIsTooLong, appBinaryName));
throw new EmbedAppNameInHostException(string.Format(LocalizableStrings.EmbedAppNameInHostFileNameIsTooLong, appBinaryFilePath));
}
var array = File.ReadAllBytes(appHostSourceFilePath);

View file

@ -0,0 +1,28 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Runtime.Serialization;
namespace Microsoft.DotNet.Cli.Utils
{
[Serializable]
internal class FilePermissionSettingException : Exception
{
public FilePermissionSettingException()
{
}
public FilePermissionSettingException(string message) : base(message)
{
}
public FilePermissionSettingException(string message, Exception innerException) : base(message, innerException)
{
}
protected FilePermissionSettingException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}

View file

@ -2,6 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.DotNet.PlatformAbstractions;
@ -45,6 +46,78 @@ namespace Microsoft.DotNet.Cli.Utils
?.Version;
}
public bool TryGetMostFitRuntimeIdentifier(
string alternativeCurrentRuntimeIdentifier,
string[] candidateRuntimeIdentifiers,
out string mostFitRuntimeIdentifier)
{
return TryGetMostFitRuntimeIdentifier(
RuntimeEnvironment.GetRuntimeIdentifier(),
alternativeCurrentRuntimeIdentifier,
DependencyContext.RuntimeGraph,
candidateRuntimeIdentifiers,
out mostFitRuntimeIdentifier);
}
internal static bool TryGetMostFitRuntimeIdentifier(
string currentRuntimeIdentifier,
string alternativeCurrentRuntimeIdentifier,
IReadOnlyList<RuntimeFallbacks> runtimeGraph,
string[] candidateRuntimeIdentifiers,
out string mostFitRuntimeIdentifier)
{
mostFitRuntimeIdentifier = null;
RuntimeFallbacks[] runtimeFallbacksCandidates;
if (!string.IsNullOrEmpty(currentRuntimeIdentifier))
{
runtimeFallbacksCandidates =
runtimeGraph
.Where(g => string.Equals(g.Runtime, currentRuntimeIdentifier, StringComparison.OrdinalIgnoreCase))
.ToArray();
}
else
{
runtimeFallbacksCandidates = Array.Empty<RuntimeFallbacks>();
}
if (runtimeFallbacksCandidates.Length == 0 && !string.IsNullOrEmpty(alternativeCurrentRuntimeIdentifier))
{
runtimeFallbacksCandidates =
runtimeGraph
.Where(g => string.Equals(g.Runtime, alternativeCurrentRuntimeIdentifier, StringComparison.OrdinalIgnoreCase))
.ToArray();
}
if (runtimeFallbacksCandidates.Length == 0)
{
return false;
}
RuntimeFallbacks runtimeFallbacks = runtimeFallbacksCandidates[0];
var runtimeFallbacksIncludesRuntime = new List<string>();
runtimeFallbacksIncludesRuntime.Add(runtimeFallbacks.Runtime);
runtimeFallbacksIncludesRuntime.AddRange(runtimeFallbacks.Fallbacks);
var candidateMap = candidateRuntimeIdentifiers
.Distinct(comparer: StringComparer.OrdinalIgnoreCase)
.ToDictionary(x => x, StringComparer.OrdinalIgnoreCase);
foreach (var fallback in runtimeFallbacksIncludesRuntime)
{
if (candidateMap.TryGetValue(fallback, out string match))
{
mostFitRuntimeIdentifier = match;
return true;
}
}
return false;
}
private DependencyContext CreateDependencyContext()
{
using (Stream depsFileStream = File.OpenRead(_depsFilePath))

View file

@ -0,0 +1,7 @@
namespace Microsoft.DotNet.Cli.Utils
{
internal interface IFilePermissionSetter
{
void SetUserExecutionPermission(string path);
}
}

View file

@ -28,7 +28,7 @@ namespace Microsoft.DotNet.Cli.Utils
};
private readonly IEnumerable<string> _msbuildRequiredParameters =
new List<string> { "/m", "/v:m" };
new List<string> { "-maxcpucount", "-verbosity:m" };
public MSBuildForwardingAppWithoutLogging(IEnumerable<string> argsToForward, string msbuildPath = null)
{
@ -51,7 +51,7 @@ namespace Microsoft.DotNet.Cli.Utils
private static string Escape(string arg) =>
// this is a workaround for https://github.com/Microsoft/msbuild/issues/1622
(arg.StartsWith("/p:RestoreSources=", StringComparison.OrdinalIgnoreCase)) ?
IsRestoreSources(arg) ?
arg.Replace(";", "%3B")
.Replace("://", ":%2F%2F") :
arg;
@ -81,6 +81,14 @@ namespace Microsoft.DotNet.Cli.Utils
{
return new Muxer().MuxerPath;
}
private static bool IsRestoreSources(string arg)
{
return arg.StartsWith("/p:RestoreSources=", StringComparison.OrdinalIgnoreCase) ||
arg.StartsWith("/property:RestoreSources=", StringComparison.OrdinalIgnoreCase) ||
arg.StartsWith("-p:RestoreSources=", StringComparison.OrdinalIgnoreCase) ||
arg.StartsWith("-property:RestoreSources=", StringComparison.OrdinalIgnoreCase);
}
}
}

View file

@ -151,7 +151,7 @@ Here are some options to fix this error:
<value>ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</value>
</data>
</root>

View file

@ -62,12 +62,12 @@ Tuto chybu můžete opravit pomocí některé z těchto možností:
<source>ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
<target state="needs-review-translation">ASP.NET Core
<target state="translated">ASP.NET Core
------------
Úspěšně se podařilo nainstalovat certifikát pro vývoj ASP.NET Core HTTPS Development Certificate.
Pokud chcete certifikátu důvěřovat (platí jenom pro Windows a macOS), nainstalujte nejprve nástroj dev-certs. To uděláte tak, že spustíte dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final a potom dotnet-dev-certs https --trust.
Pokud chcete certifikátu důvěřovat (platí jenom pro Windows a macOS), nainstalujte nejprve nástroj dev-certs. To uděláte tak, že spustíte dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final a potom dotnet-dev-certs https --trust.
Další informace o konfiguraci protokolu HTTPS najdete na webu https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>

View file

@ -62,12 +62,12 @@ Im Folgenden finden Sie einige Optionen, um diesen Fehler zu beheben:
<source>ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
<target state="needs-review-translation">ASP.NET Core
<target state="translated">ASP.NET Core
------------
Das ASP.NET Core-HTTPS-Entwicklungszertifikat wurde erfolgreich installiert.
Um dem Zertifikat zu vertrauen (nur Windows und macOS), installieren Sie zuerst das Tool "dev-certs", indem Sie "dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final" und anschließend "dotnet-dev-certs https --trust" ausführen.
Um dem Zertifikat zu vertrauen (nur Windows und macOS), installieren Sie zuerst das Tool "dev-certs", indem Sie "dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final" und anschließend "dotnet-dev-certs https --trust" ausführen.
Weitere Informationen zur Konfiguration von HTTPS finden Sie unter https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>

View file

@ -61,12 +61,12 @@ Estas son algunas opciones para corregir este error:
<source>ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
<target state="needs-review-translation">ASP.NET Core
<target state="translated">ASP.NET Core
------------
El certificado de desarrollo HTTPS de ASP.NET Core se ha instalado correctamente.
Para confiar en el certificado (solo Windows y macOS), instale primero la herramienta dev-certs ejecutando "dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final" y, después, ejecute "dotnet-dev-certs https --trust".
Para confiar en el certificado (solo Windows y macOS), instale primero la herramienta dev-certs ejecutando "dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final" y, después, ejecute "dotnet-dev-certs https --trust".
Para obtener más información sobre la configuración HTTPS, vea https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>

View file

@ -62,13 +62,13 @@ Voici quelques options pour corriger cette erreur :
<source>ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
<target state="needs-review-translation">ASP.NET Core
<target state="translated">ASP.NET Core
------------
Le certificat de développement ASP.NET Core HTTPS a été installé.
Pour approuver le certificat (Windows et macOS uniquement), installez d'abord l'outil dev-certs en exécutant 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final', puis exécutez 'dotnet-dev-certs https --trust'.
Pour plus d'informations sur la configuration de HTTPS, consultez https://go.microsoft.com/fwlink/?linkid=848054.</target>
Installation réussie du certificat de développement HTTPS ASP.NET Core.
Pour approuver le certificat (Windows et macOS uniquement), installez d'abord l'outil dev-certs en exécutant 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final', puis exécutez 'dotnet-dev-certs https --trust'.
Pour plus d'informations sur la configuration du protocole HTTPS, consultez https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>
</body>

View file

@ -62,12 +62,12 @@ Ecco alcune opzioni per correggere questo errore:
<source>ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
<target state="needs-review-translation">ASP.NET Core
<target state="translated">ASP.NET Core
------------
Il certificato di sviluppo HTTPS di ASP.NET Core è stato installato.
Per considerare attendibile il certificato (solo Windows e macOS), installare prima lo strumento dev-certs eseguendo 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' e quindi eseguire 'dotnet-dev-certs https --trust'.
Per considerare attendibile il certificato (solo Windows e macOS), installare prima lo strumento dev-certs eseguendo 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' e quindi eseguire 'dotnet-dev-certs https --trust'.
Per altre informazioni sulla configurazione di HTTPS, vedere https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>

View file

@ -62,12 +62,12 @@ Here are some options to fix this error:
<source>ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
<target state="needs-review-translation">ASP.NET Core
<target state="translated">ASP.NET Core
------------
ASP.NET Core HTTPS 開発証明書が正常にインストールされました。
証明書を信頼する (Windows および macOS のみ) には、まず 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' を実行して dev-certs ツールをインストールし、次に 'dotnet-dev-certs https --trust' を実行します。
証明書を信頼する (Windows および macOS のみ) には、まず 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' を実行して dev-certs ツールをインストールし、次に 'dotnet-dev-certs https --trust' を実行します。
HTTPS を構成する方法の詳細については、https://go.microsoft.com/fwlink/?linkid=848054 をご覧ください。</target>
<note />
</trans-unit>

View file

@ -62,12 +62,12 @@ Here are some options to fix this error:
<source>ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
<target state="needs-review-translation">ASP.NET Core
<target state="translated">ASP.NET Core
------------
ASP.NET Core HTTPS 개발 인증서를 설치했습니다.
인증서를 신뢰하려면(Windows 및 macOS만 해당) 먼저 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final'을 실행하여 dev-certs 도구를 설치한 다음, 'dotnet-dev-certs https --trust'를 실행하세요.
인증서를 신뢰하려면(Windows 및 macOS만 해당) 먼저 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final'을 실행하여 dev-certs 도구를 설치한 다음, 'dotnet-dev-certs https --trust'를 실행하세요.
HTTPS 구성에 대한 자세한 내용은 https://go.microsoft.com/fwlink/?linkid=848054를 참조하세요.</target>
<note />
</trans-unit>

View file

@ -62,12 +62,12 @@ Oto kilka opcji naprawiania tego błędu:
<source>ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
<target state="needs-review-translation">ASP.NET Core
<target state="translated">ASP.NET Core
------------
Pomyślnie zainstalowano certyfikat deweloperski protokołu HTTPS programu ASP.NET Core.
Aby ufać temu certyfikatowi (dotyczy tylko systemów Windows i macOS), najpierw zainstaluj narzędzie dev-certs, uruchamiając polecenie „dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final”, a następnie uruchom polecenie „dotnet-dev-certs https --trust”.
Aby ufać temu certyfikatowi (dotyczy tylko systemów Windows i macOS), najpierw zainstaluj narzędzie dev-certs, uruchamiając polecenie „dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final”, a następnie uruchom polecenie „dotnet-dev-certs https --trust”.
Aby uzyskać więcej informacji dotyczących konfigurowania protokołu HTTPS, zobacz https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>

View file

@ -62,13 +62,13 @@ Aqui estão algumas opções para corrigir este erro:
<source>ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
<target state="needs-review-translation">ASP.NET Core
<target state="translated">ASP.NET Core
------------
Certificado de Desenvolvimento HTTPS ASP.NET Core instalado com êxito.
Para confiar no certificado (apenas Windows e macOS), primeiramente instale a ferramenta dev-certs executando dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final e, em seguida, execute dotnet-dev-certs https --trust.
Para saber mais sobre configuração de HTTPS, acesse https://go.microsoft.com/fwlink/?linkid=848054.</target>
Para confiar no certificado (apenas Windows e macOS), primeiramente instale a ferramenta dev-certs executando 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' e, em seguida, execute 'dotnet-dev-certs https --trust'.
Para saber mais sobre a configuração de HTTPS, acesse https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>
</body>

View file

@ -62,12 +62,12 @@ Here are some options to fix this error:
<source>ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
<target state="needs-review-translation">ASP.NET Core
<target state="translated">ASP.NET Core
------------
Сертификат разработки HTTPS для ASP.NET Core установлен.
Чтобы сделать сертификат доверенным (только Windows и macOS), сначала установите инструмент dev-certs, выполнив команду "dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final", а затем выполните "dotnet-dev-certs https --trust".
Чтобы сделать сертификат доверенным (только Windows и macOS), сначала установите инструмент dev-certs, выполнив команду "dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final", а затем выполните "dotnet-dev-certs https --trust".
Дополнительные сведения о настройке HTTPS: https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>

View file

@ -62,12 +62,12 @@ Bu hatayı düzeltmek için bazı seçenekler:
<source>ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
<target state="needs-review-translation">ASP.NET Core
<target state="translated">ASP.NET Core
------------
ASP.NET Core HTTPS Geliştirme Sertifikası başarıyla yüklendi.
Sertifikaya güvenmek için (yalnızca Windows ve macOS) önce 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final', sonra 'dotnet-dev-certs https --trust' komutlarını çalıştırarak dev-certs aracını yükleyin.
Sertifikaya güvenmek için (yalnızca Windows ve macOS) önce 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final', sonra 'dotnet-dev-certs https --trust' komutlarını çalıştırarak dev-certs aracını yükleyin.
HTTPS yapılandırması hakkında daha fazla bilgi için bkz. https://go.microsoft.com/fwlink/?linkid=848054.</target>
<note />
</trans-unit>

View file

@ -62,12 +62,12 @@ Here are some options to fix this error:
<source>ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
<target state="needs-review-translation">ASP.NET Core
<target state="translated">ASP.NET Core
------------
已成功安装 ASP.NET Core HTTPS 开发证书。
要信任证书(仅限 Windows 和 macOS),请首先通过运行 "dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final" 安装 dev-certs 工具,然后运行 "dotnet-dev-certs https --trust"。
要信任证书(仅限 Windows 和 macOS),请首先通过运行 "dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final" 安装 dev-certs 工具,然后运行 "dotnet-dev-certs https --trust"。
有关配置 HTTPS 的详细信息,请参阅 https://go.microsoft.com/fwlink/?linkid=848054。</target>
<note />
</trans-unit>

View file

@ -62,12 +62,12 @@ Here are some options to fix this error:
<source>ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms please refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.</source>
<target state="needs-review-translation">ASP.NET Core
<target state="translated">ASP.NET Core
------------
已成功安裝 ASP.NET Core HTTPS 開發憑證。
若要信任此憑證 (僅限 Windows 與 macOS),請先執行 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' 安裝 dev-certs 工具,然後再執行 'dotnet-dev-certs https --trust'。
若要信任此憑證 (僅限 Windows 與 macOS),請先執行 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' 安裝 dev-certs 工具,然後再執行 'dotnet-dev-certs https --trust'。
如需如何設定 HTTPS 的詳細資訊,請參閱 https://go.microsoft.com/fwlink/?linkid=848054。</target>
<note />
</trans-unit>

View file

@ -51,6 +51,11 @@ namespace Microsoft.Extensions.EnvironmentAbstractions
File.Move(source, destination);
}
public void Copy(string sourceFileName, string destFileName)
{
File.Copy(sourceFileName, destFileName);
}
public void Delete(string path)
{
File.Delete(path);

View file

@ -27,6 +27,8 @@ namespace Microsoft.Extensions.EnvironmentAbstractions
void Move(string source, string destination);
void Copy(string source, string destination);
void Delete(string path);
}
}

View file

@ -640,4 +640,10 @@ setx PATH "%PATH%;{0}"
<data name="FormatVersionIsMissing" xml:space="preserve">
<value>Format version is missing. This tool may not be supported in this SDK version. Please contact the author of the tool.</value>
</data>
<data name="MoreThanOnePackagedShimAvailable" xml:space="preserve">
<value>More than one packaged shim is available: {0}.</value>
</data>
<data name="FailedToReadNuGetLockFile" xml:space="preserve">
<value>Failed to read NuGet LockFile for tool package '{0}': {1}</value>
</data>
</root>

View file

@ -25,7 +25,7 @@ namespace Microsoft.DotNet.Cli
"n", "normal",
"d", "detailed",
"diag", "diagnostic")
.ForwardAsSingle(o => $"/verbosity:{o.Arguments.Single()}"));
.ForwardAsSingle(o => $"-verbosity:{o.Arguments.Single()}"));
public static Option FrameworkOption() =>
Create.Option(
@ -34,7 +34,7 @@ namespace Microsoft.DotNet.Cli
Accept.ExactlyOneArgument()
.WithSuggestionsFrom(_ => Suggest.TargetFrameworksFromProjectFile())
.With(name: "FRAMEWORK")
.ForwardAsSingle(o => $"/p:TargetFramework={o.Arguments.Single()}"));
.ForwardAsSingle(o => $"-property:TargetFramework={o.Arguments.Single()}"));
public static Option RuntimeOption() =>
Create.Option(
@ -43,7 +43,7 @@ namespace Microsoft.DotNet.Cli
Accept.ExactlyOneArgument()
.WithSuggestionsFrom(_ => Suggest.RunTimesFromProjectFile())
.With(name: "RUNTIME_IDENTIFIER")
.ForwardAsSingle(o => $"/p:RuntimeIdentifier={o.Arguments.Single()}"));
.ForwardAsSingle(o => $"-property:RuntimeIdentifier={o.Arguments.Single()}"));
public static Option ConfigurationOption() =>
Create.Option(
@ -52,7 +52,7 @@ namespace Microsoft.DotNet.Cli
Accept.ExactlyOneArgument()
.With(name: "CONFIGURATION")
.WithSuggestionsFrom("DEBUG", "RELEASE")
.ForwardAsSingle(o => $"/p:Configuration={o.Arguments.Single()}"));
.ForwardAsSingle(o => $"-property:Configuration={o.Arguments.Single()}"));
public static Option VersionSuffixOption() =>
Create.Option(
@ -60,7 +60,7 @@ namespace Microsoft.DotNet.Cli
CommonLocalizableStrings.CmdVersionSuffixDescription,
Accept.ExactlyOneArgument()
.With(name: "VERSION_SUFFIX")
.ForwardAsSingle(o => $"/p:VersionSuffix={o.Arguments.Single()}"));
.ForwardAsSingle(o => $"-property:VersionSuffix={o.Arguments.Single()}"));
public static ArgumentsRule DefaultToCurrentDirectory(this ArgumentsRule rule) =>
rule.With(defaultValue: () => PathUtility.EnsureTrailingSlash(Directory.GetCurrentDirectory()));

View file

@ -0,0 +1,53 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.PlatformAbstractions;
using Microsoft.DotNet.Tools.Common;
using Microsoft.Extensions.EnvironmentAbstractions;
namespace Microsoft.DotNet.ShellShim
{
internal class AppHostShellShimMaker : IAppHostShellShimMaker
{
private const string ApphostNameWithoutExtension = "apphost";
private readonly string _appHostSourceDirectory;
private readonly IFilePermissionSetter _filePermissionSetter;
public AppHostShellShimMaker(string appHostSourceDirectory = null, IFilePermissionSetter filePermissionSetter = null)
{
_appHostSourceDirectory =
appHostSourceDirectory
?? Path.Combine(ApplicationEnvironment.ApplicationBasePath, "AppHostTemplate");
_filePermissionSetter =
filePermissionSetter
?? new FilePermissionSetter();
}
public void CreateApphostShellShim(FilePath entryPoint, FilePath shimPath)
{
string appHostSourcePath;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
appHostSourcePath = Path.Combine(_appHostSourceDirectory, ApphostNameWithoutExtension + ".exe");
}
else
{
appHostSourcePath = Path.Combine(_appHostSourceDirectory, ApphostNameWithoutExtension);
}
var appHostDestinationFilePath = shimPath.Value;
var appBinaryFilePath = PathUtility.GetRelativePath(appHostDestinationFilePath, entryPoint.Value);
EmbedAppNameInHost.EmbedAndReturnModifiedAppHostPath(
appHostSourceFilePath: appHostSourcePath,
appHostDestinationFilePath: appHostDestinationFilePath,
appBinaryFilePath: appBinaryFilePath);
_filePermissionSetter.SetUserExecutionPermission(appHostDestinationFilePath);
}
}
}

View file

@ -0,0 +1,9 @@
using Microsoft.Extensions.EnvironmentAbstractions;
namespace Microsoft.DotNet.ShellShim
{
internal interface IAppHostShellShimMaker
{
void CreateApphostShellShim(FilePath entryPoint, FilePath shimPath);
}
}

View file

@ -1,12 +1,13 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using Microsoft.Extensions.EnvironmentAbstractions;
namespace Microsoft.DotNet.ShellShim
{
internal interface IShellShimRepository
{
void CreateShim(FilePath targetExecutablePath, string commandName);
void CreateShim(FilePath targetExecutablePath, string commandName, IReadOnlyList<FilePath> packagedShims = null);
void RemoveShim(string commandName);
}

View file

@ -10,6 +10,7 @@ using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.PlatformAbstractions;
using Microsoft.DotNet.Tools;
using Microsoft.DotNet.Tools.Common;
using Microsoft.Extensions.EnvironmentAbstractions;
using Newtonsoft.Json;
@ -20,16 +21,24 @@ namespace Microsoft.DotNet.ShellShim
private const string ApphostNameWithoutExtension = "apphost";
private readonly DirectoryPath _shimsDirectory;
private readonly string _appHostSourceDirectory;
private readonly IFileSystem _fileSystem;
private readonly IAppHostShellShimMaker _appHostShellShimMaker;
private readonly IFilePermissionSetter _filePermissionSetter;
public ShellShimRepository(DirectoryPath shimsDirectory, string appHostSourcePath = null)
public ShellShimRepository(
DirectoryPath shimsDirectory,
string appHostSourceDirectory = null,
IFileSystem fileSystem = null,
IAppHostShellShimMaker appHostShellShimMaker = null,
IFilePermissionSetter filePermissionSetter = null)
{
_shimsDirectory = shimsDirectory;
_appHostSourceDirectory = appHostSourcePath ?? Path.Combine(ApplicationEnvironment.ApplicationBasePath,
"AppHostTemplate");
_fileSystem = fileSystem ?? new FileSystemWrapper();
_appHostShellShimMaker = appHostShellShimMaker ?? new AppHostShellShimMaker(appHostSourceDirectory: appHostSourceDirectory);
_filePermissionSetter = filePermissionSetter ?? new FilePermissionSetter();
}
public void CreateShim(FilePath targetExecutablePath, string commandName)
public void CreateShim(FilePath targetExecutablePath, string commandName, IReadOnlyList<FilePath> packagedShims = null)
{
if (string.IsNullOrEmpty(targetExecutablePath.Value))
{
@ -53,19 +62,27 @@ namespace Microsoft.DotNet.ShellShim
{
try
{
if (!Directory.Exists(_shimsDirectory.Value))
if (!_fileSystem.Directory.Exists(_shimsDirectory.Value))
{
Directory.CreateDirectory(_shimsDirectory.Value);
_fileSystem.Directory.CreateDirectory(_shimsDirectory.Value);
}
CreateApphostShimAndConfigFile(
commandName,
entryPoint: targetExecutablePath);
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
if (TryGetPackagedShim(packagedShims, commandName, out FilePath? packagedShim))
{
SetUserExecutionPermission(GetShimPath(commandName));
_fileSystem.File.Copy(packagedShim.Value.Value, GetShimPath(commandName).Value);
_filePermissionSetter.SetUserExecutionPermission(GetShimPath(commandName).Value);
}
else
{
_appHostShellShimMaker.CreateApphostShellShim(
targetExecutablePath,
GetShimPath(commandName));
}
}
catch (FilePermissionSettingException ex)
{
throw new ShellShimException(
string.Format(CommonLocalizableStrings.FailedSettingShimPermissions, ex.Message));
}
catch (Exception ex) when (ex is UnauthorizedAccessException || ex is IOException)
{
@ -79,7 +96,7 @@ namespace Microsoft.DotNet.ShellShim
}
},
rollback: () => {
foreach (var file in GetShimFiles(commandName).Where(f => File.Exists(f.Value)))
foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value)))
{
File.Delete(file.Value);
}
@ -93,10 +110,10 @@ namespace Microsoft.DotNet.ShellShim
action: () => {
try
{
foreach (var file in GetShimFiles(commandName).Where(f => File.Exists(f.Value)))
foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value)))
{
var tempPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
File.Move(file.Value, tempPath);
_fileSystem.File.Move(file.Value, tempPath);
files[file.Value] = tempPath;
}
}
@ -114,46 +131,17 @@ namespace Microsoft.DotNet.ShellShim
commit: () => {
foreach (var value in files.Values)
{
File.Delete(value);
_fileSystem.File.Delete(value);
}
},
rollback: () => {
foreach (var kvp in files)
{
File.Move(kvp.Value, kvp.Key);
_fileSystem.File.Move(kvp.Value, kvp.Key);
}
});
}
private void CreateApphostShimAndConfigFile(string commandName, FilePath entryPoint)
{
string appHostSourcePath;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
appHostSourcePath = Path.Combine(_appHostSourceDirectory, ApphostNameWithoutExtension + ".exe");
}
else
{
appHostSourcePath = Path.Combine(_appHostSourceDirectory, ApphostNameWithoutExtension);
}
EmbedAppNameInHost.EmbedAndReturnModifiedAppHostPath(
appHostSourceFilePath: appHostSourcePath,
appHostDestinationFilePath: GetShimPath(commandName).Value,
appBinaryName: Path.GetFileName(entryPoint.Value));
var config = JsonConvert.SerializeObject(
new RootObject
{
startupOptions = new StartupOptions
{
appRoot = entryPoint.GetDirectoryPath().Value
}
});
File.WriteAllText(GetConfigPath(commandName).Value, config);
}
private class StartupOptions
{
public string appRoot { get; set; }
@ -166,7 +154,7 @@ namespace Microsoft.DotNet.ShellShim
private bool ShimExists(string commandName)
{
return GetShimFiles(commandName).Any(p => File.Exists(p.Value));
return GetShimFiles(commandName).Any(p => _fileSystem.File.Exists(p.Value));
}
private IEnumerable<FilePath> GetShimFiles(string commandName)
@ -177,7 +165,6 @@ namespace Microsoft.DotNet.ShellShim
}
yield return GetShimPath(commandName);
yield return GetConfigPath(commandName);
}
private FilePath GetShimPath(string commandName)
@ -192,29 +179,37 @@ namespace Microsoft.DotNet.ShellShim
}
}
private FilePath GetConfigPath(string commandName)
private bool TryGetPackagedShim(
IReadOnlyList<FilePath> packagedShims,
string commandName,
out FilePath? packagedShim)
{
return _shimsDirectory.WithFile(commandName + ".startupconfig.json");
}
packagedShim = null;
private static void SetUserExecutionPermission(FilePath path)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
if (packagedShims != null && packagedShims.Count > 0)
{
return;
FilePath[] candidatepackagedShim =
packagedShims
.Where(s => string.Equals(
Path.GetFileName(s.Value),
Path.GetFileName(GetShimPath(commandName).Value))).ToArray();
if (candidatepackagedShim.Length > 1)
{
throw new ShellShimException(
string.Format(
CommonLocalizableStrings.MoreThanOnePackagedShimAvailable,
string.Join(';', candidatepackagedShim)));
}
if (candidatepackagedShim.Length == 1)
{
packagedShim = candidatepackagedShim.Single();
return true;
}
}
CommandResult result = new CommandFactory()
.Create("chmod", new[] { "u+x", path.Value })
.CaptureStdOut()
.CaptureStdErr()
.Execute();
if (result.ExitCode != 0)
{
throw new ShellShimException(
string.Format(CommonLocalizableStrings.FailedSettingShimPermissions, result.StdErr));
}
return false;
}
}
}

View file

@ -20,6 +20,8 @@ namespace Microsoft.DotNet.ToolPackage
IEnumerable<string> Warnings { get; }
IReadOnlyList<FilePath> PackagedShims { get; }
void Uninstall();
}
}

View file

@ -1,6 +1,7 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using System.Linq;
using NuGet.ProjectModel;
@ -22,36 +23,60 @@ namespace Microsoft.DotNet.ToolPackage
string[] entryPointPathInArray = SplitPathByDirectorySeparator(targetRelativeFilePath);
return entryPointPathInArray.Length >= 1
&& PathInLockFileDirectoriesStartWithToolsAndFollowsTwoSubFolder()
&& SubPathMatchesTargetFilePath();
&& PathInLockFileDirectoriesStartWithToolsAndFollowsTwoSubFolder(
pathInLockFilePathInArray,
entryPointPathInArray)
&& SubPathMatchesTargetFilePath(pathInLockFilePathInArray, entryPointPathInArray);
}
bool SubPathMatchesTargetFilePath()
/// <summary>
/// Check if LockFileItem is under targetRelativePath directory.
/// The path in LockFileItem is in pattern tools/TFM/RID/my/tool.dll. Tools/TFM/RID is selected by NuGet.
/// And there will be only one TFM/RID combination.
/// When "my/folder/of/tool/tools.dll" part under targetRelativePath "my/folder/of" or "my/folder", return true.
/// </summary>
internal static bool MatchesDirectoryPath(LockFileItem lockFileItem, string targetRelativePath)
{
string[] pathInLockFilePathInArray = SplitPathByDirectorySeparator(lockFileItem.Path);
string[] targetDirectoryPathInArray = SplitPathByDirectorySeparator(targetRelativePath);
return pathInLockFilePathInArray[0] == "tools"
&& SubPathMatchesTargetFilePath(pathInLockFilePathInArray, targetDirectoryPathInArray);
}
private static bool SubPathMatchesTargetFilePath(string[] pathInLockFilePathInArray, string[] targetInArray)
{
string[] pathAfterToolsTfmRid = pathInLockFilePathInArray.Skip(3).ToArray();
return !targetInArray
.Where((directoryOnEveryLevel, i) => directoryOnEveryLevel != pathAfterToolsTfmRid[i])
.Any();
}
private static bool PathInLockFileDirectoriesStartWithToolsAndFollowsTwoSubFolder(
string[] pathInLockFilePathInArray,
string[] targetInArray)
{
if (pathInLockFilePathInArray.Length - targetInArray.Length != 3)
{
string[] pathAfterToolsTfmRid = pathInLockFilePathInArray.Skip(3).ToArray();
return !pathAfterToolsTfmRid
.Where((directoryOnEveryLevel, i) => directoryOnEveryLevel != entryPointPathInArray[i])
.Any();
return false;
}
bool PathInLockFileDirectoriesStartWithToolsAndFollowsTwoSubFolder()
if (pathInLockFilePathInArray[0] != "tools")
{
if (pathInLockFilePathInArray.Length - entryPointPathInArray.Length != 3)
{
return false;
}
if (pathInLockFilePathInArray[0] != "tools")
{
return false;
}
return true;
return false;
}
string[] SplitPathByDirectorySeparator(string path)
return true;
}
private static string[] SplitPathByDirectorySeparator(string path)
{
if (string.IsNullOrEmpty(path))
{
return path.Split('\\', '/');
return new string[0];
}
return path.Split('\\', '/');
}
}
}

View file

@ -7,13 +7,17 @@ using Microsoft.DotNet.Tools;
using Microsoft.Extensions.EnvironmentAbstractions;
using NuGet.ProjectModel;
using NuGet.Versioning;
using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.DotNet.ToolPackage
{
// This is named "ToolPackageInstance" because "ToolPackage" would conflict with the namespace
internal class ToolPackageInstance : IToolPackage
{
private const string PackagedShimsDirectoryConvention = "shims";
public IEnumerable<string> Warnings => _toolConfiguration.Value.Warnings;
public PackageId Id { get; private set; }
public NuGetVersion Version { get; private set; }
@ -28,12 +32,21 @@ namespace Microsoft.DotNet.ToolPackage
}
}
public IReadOnlyList<FilePath> PackagedShims
{
get
{
return _packagedShims.Value;
}
}
private const string AssetsFileName = "project.assets.json";
private const string ToolSettingsFileName = "DotnetToolSettings.xml";
private IToolPackageStore _store;
private Lazy<IReadOnlyList<CommandSettings>> _commands;
private Lazy<ToolConfiguration> _toolConfiguration;
private Lazy<IReadOnlyList<FilePath>> _packagedShims;
public ToolPackageInstance(
IToolPackageStore store,
@ -43,6 +56,7 @@ namespace Microsoft.DotNet.ToolPackage
{
_store = store ?? throw new ArgumentNullException(nameof(store));
_commands = new Lazy<IReadOnlyList<CommandSettings>>(GetCommands);
_packagedShims = new Lazy<IReadOnlyList<FilePath>>(GetPackagedShims);
Id = id;
Version = version ?? throw new ArgumentNullException(nameof(version));
@ -107,11 +121,11 @@ namespace Microsoft.DotNet.ToolPackage
try
{
var commands = new List<CommandSettings>();
var lockFile = new LockFileFormat().Read(PackageDirectory.WithFile(AssetsFileName).Value);
var library = FindLibraryInLockFile(lockFile);
LockFile lockFile = new LockFileFormat().Read(PackageDirectory.WithFile(AssetsFileName).Value);
LockFileTargetLibrary library = FindLibraryInLockFile(lockFile);
ToolConfiguration configuration = _toolConfiguration.Value;
var entryPointFromLockFile = FindItemInTargetLibrary(library, configuration.ToolAssemblyEntryPoint);
LockFileItem entryPointFromLockFile = FindItemInTargetLibrary(library, configuration.ToolAssemblyEntryPoint);
if (entryPointFromLockFile == null)
{
throw new ToolConfigurationException(
@ -125,11 +139,7 @@ namespace Microsoft.DotNet.ToolPackage
commands.Add(new CommandSettings(
configuration.CommandName,
"dotnet",
PackageDirectory
.WithSubDirectories(
Id.ToString(),
library.Version.ToNormalizedString())
.WithFile(entryPointFromLockFile.Path)));
LockFileRelativePathToFullFilePath(entryPointFromLockFile.Path, library)));
return commands;
}
@ -143,6 +153,15 @@ namespace Microsoft.DotNet.ToolPackage
}
}
private FilePath LockFileRelativePathToFullFilePath(string lockFileRelativePath, LockFileTargetLibrary library)
{
return PackageDirectory
.WithSubDirectories(
Id.ToString(),
library.Version.ToNormalizedString())
.WithFile(lockFileRelativePath);
}
private ToolConfiguration GetToolConfiguration()
{
try
@ -161,6 +180,55 @@ namespace Microsoft.DotNet.ToolPackage
}
}
private IReadOnlyList<FilePath> GetPackagedShims()
{
LockFileTargetLibrary library;
try
{
LockFile lockFile = new LockFileFormat().Read(PackageDirectory.WithFile(AssetsFileName).Value);
library = FindLibraryInLockFile(lockFile);
}
catch (Exception ex) when (ex is UnauthorizedAccessException || ex is IOException)
{
throw new ToolPackageException(
string.Format(
CommonLocalizableStrings.FailedToReadNuGetLockFile,
Id,
ex.Message),
ex);
}
IEnumerable<LockFileItem> filesUnderShimsDirectory = library
?.ToolsAssemblies
?.Where(t => LockFileMatcher.MatchesDirectoryPath(t, PackagedShimsDirectoryConvention));
if (filesUnderShimsDirectory == null)
{
return Array.Empty<FilePath>();
}
IEnumerable<string> allAvailableShimRuntimeIdentifiers = filesUnderShimsDirectory
.Select(f => f.Path.Split('\\', '/')?[4]) // ex: "tools/netcoreapp2.1/any/shims/osx-x64/demo" osx-x64 is at [4]
.Where(f => !string.IsNullOrEmpty(f));
if (new FrameworkDependencyFile().TryGetMostFitRuntimeIdentifier(
DotnetFiles.VersionFileObject.BuildRid,
allAvailableShimRuntimeIdentifiers.ToArray(),
out var mostFitRuntimeIdentifier))
{
return library
?.ToolsAssemblies
?.Where(l =>
LockFileMatcher.MatchesDirectoryPath(l, $"{PackagedShimsDirectoryConvention}/{mostFitRuntimeIdentifier}"))
.Select(l => LockFileRelativePathToFullFilePath(l.Path, library)).ToArray()
?? Array.Empty<FilePath>();
}
else
{
return Array.Empty<FilePath>();
}
}
private ToolConfiguration DeserializeToolConfiguration(string ToolSettingsFileName, LockFileTargetLibrary library)
{
var dotnetToolSettings = FindItemInTargetLibrary(library, ToolSettingsFileName);

View file

@ -36,10 +36,10 @@ namespace Microsoft.DotNet.Tools
if (HasArgumentToExcludeFromRestore(parsedArguments))
{
return Prepend("/nologo", msbuildArgs);
return Prepend("-nologo", msbuildArgs);
}
return Prepend("/restore", msbuildArgs);
return Prepend("-restore", msbuildArgs);
}
private static RestoreCommand GetSeparateRestoreCommand(
@ -70,7 +70,7 @@ namespace Microsoft.DotNet.Tools
=> arguments.Any(a => IsExcludedFromRestore(a));
private static bool IsExcludedFromRestore(string argument)
=> argument.StartsWith("/p:TargetFramework=", StringComparison.Ordinal);
=> argument.StartsWith("-property:TargetFramework=", StringComparison.Ordinal);
public override int Execute()
{

View file

@ -99,19 +99,19 @@ namespace Microsoft.DotNet.Tools.Add.PackageReference
args.Add(projectFilePath);
// Pass the task as generate restore Dependency Graph file
args.Add("/t:GenerateRestoreGraphFile");
args.Add("-target:GenerateRestoreGraphFile");
// Pass Dependency Graph file output path
args.Add($"/p:RestoreGraphOutputPath=\"{dgFilePath}\"");
args.Add($"-property:RestoreGraphOutputPath=\"{dgFilePath}\"");
// Turn off recursive restore
args.Add($"/p:RestoreRecursive=false");
args.Add($"-property:RestoreRecursive=false");
// Turn off restore for Dotnet cli tool references so that we do not generate extra dg specs
args.Add($"/p:RestoreDotnetCliToolReferences=false");
args.Add($"-property:RestoreDotnetCliToolReferences=false");
// Output should not include MSBuild version header
args.Add("/nologo");
args.Add("-nologo");
var result = new MSBuildForwardingApp(args).Execute();

View file

@ -37,15 +37,15 @@ namespace Microsoft.DotNet.Tools.Build
var appliedBuildOptions = result["dotnet"]["build"];
msbuildArgs.Add($"/clp:Summary");
msbuildArgs.Add($"-consoleloggerparameters:Summary");
if (appliedBuildOptions.HasOption("--no-incremental"))
{
msbuildArgs.Add("/t:Rebuild");
msbuildArgs.Add("-target:Rebuild");
}
else
{
msbuildArgs.Add("/t:Build");
msbuildArgs.Add("-target:Build");
}
msbuildArgs.AddRange(appliedBuildOptions.OptionValuesToBeForwarded());

View file

@ -25,7 +25,7 @@ namespace Microsoft.DotNet.Cli
LocalizableStrings.OutputOptionDescription,
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.OutputOptionName)
.ForwardAsSingle(o => $"/p:OutputPath={o.Arguments.Single()}")),
.ForwardAsSingle(o => $"-property:OutputPath={o.Arguments.Single()}")),
CommonOptions.FrameworkOption(),
CommonOptions.RuntimeOption(),
CommonOptions.ConfigurationOption(),
@ -37,7 +37,7 @@ namespace Microsoft.DotNet.Cli
"--no-dependencies",
LocalizableStrings.NoDependenciesOptionDescription,
Accept.NoArguments()
.ForwardAs("/p:BuildProjectReferences=false")),
.ForwardAs("-property:BuildProjectReferences=false")),
CommonOptions.NoRestoreOption(),
CommonOptions.VerbosityOption());
}

Some files were not shown because too many files have changed in this diff Show more