Commit graph

3256 commits

Author SHA1 Message Date
Livar
8f8770be8a
Merge pull request #9265 from livarcocc/first_run_native_intallers
Always execute cache expansion on native installers.
2018-05-22 13:17:55 -07:00
William Li
ca8a109d1c
Add retry when Directory.Move (#9313) 2018-05-22 09:55:10 -07:00
Andy Gerlicher
5e794a064c Add reference to Microsoft.Build.NuGetSdkResolver 2018-05-21 15:29:37 -07:00
Andy Gerlicher
7bed83fc98 Disable crossgen for MSBuild inline-task refs 2018-05-21 15:29:37 -07:00
Peter Huene
88e2e9e993
Improve command line help user experience.
This commit attempts to make the command line help user experience for `dotnet`
more consistent for all of the built-in SDK commands.

The following has been changed:

* Organized the top-level help into a section detailing how to run .NET
  applications and a section on running SDK commands.
* Sorted the SDK commands by name (previous ordering was undefined).
* Removed `--verbosity` from the "common options section" since it is not a
  top-level option, nor is it common to all commands.
* Added missing parameter names for parameterized options (especially for the
  `dotnet tool` subcommands).
* Fixed the localization of parameter names for parameterized options.
* Added missing `PROJECT` parameter to a few commands.
* Fixed the localization of the build command's `PROJECT` parameter description.
* Fixed the confusing descriptions for the `--framework`, `--configuration`,
  and `--runtime` options that were being shared between different commands.
* Fixed the "unknown command" error for `dotnet help <command>` to show in red.
* Deleted .resx for `dotnet msbuild` that is no longer used.
* Change the option descriptions to be more consistent in their grammatical
  structure.
* Removed extra blank line from end of help output.

Fixes #7431.
Fixes #9230.
Fixes #9165.
2018-05-18 16:43:31 -07:00
Livar
c921ea92b8
Merge pull request #9309 from dotnet/merges/release/2.1.4xx-to-master
Merge release/2.1.4xx to master
2018-05-17 15:17:50 -07:00
Livar Cunha
e5e2256ae9 Addressing code review comments by making the Configuration class's fields readonly. 2018-05-17 14:13:14 -07:00
Livar
e338e46e10
Merge pull request #9306 from dotnet/merges/release/2.1.4xx-to-master
Merge release/2.1.4xx to master
2018-05-17 13:41:23 -07:00
Peter Huene
b5b47dd40d
Merge pull request #9294 from peterhuene/fix-completion
Improve command completion.
2018-05-17 11:02:57 -07:00
Peter Huene
d79f3ead27
Merge pull request #9292 from peterhuene/fix-sln-list
Fix header output by `dotnet sln list`.
2018-05-17 10:59:15 -07:00
Peter Huene
7be6af8c3b
Merge pull request #9302 from mayankbansal018/dotnetvstestargs
Multiple Logger/TestAdapter inputs from dotnet CLI
2018-05-17 10:41:01 -07:00
Livar
f23377b19f
Merge pull request #9299 from dotnet/merges/release/2.1.3xx-to-release/2.1.4xx
Merge release/2.1.3xx to release/2.1.4xx
2018-05-17 10:35:31 -07:00
Mayank Bansal
b584750620 Multiple Logger/TestAdapter inputs from dotnet CLI 2018-05-17 12:54:39 +05:30
Peter Huene
b24e9f4cec
Add unit tests for dotnet complete.
This commit adds a few simple unit tests to cover the `dotnet complete`
command.

It only checks the top-level output, integration with the `new`
command from the templating engine, and the custom `nuget` command parser that
is solely intended for use with `dotnet complete`.
2018-05-16 17:19:06 -07:00
Peter Huene
089d8bfc1b
Remove internal-reportinstallsuccess from dotnet complete.
This commit removes `internal-reportinstallsuccess` from `dotnet complete` by
changing the command's help text to an empty string.  This causes the parser to
treat the command as hidden and does not match the command name for
suggestions.

Fixes #9111.
2018-05-16 14:07:33 -07:00
Peter Huene
6f184070f0
Improve command completion.
This commit improves command completion by updating the `new` and `nuget` parsers to
match their current supported syntax.  Removes the unnecessary description
strings that were not used (these commands are parsed by assemblies external to
the CLI). The top level options are also sync'd to the currently supported
options.

Additionally, it unhides the `msbuild` and `vstest` commands so that `dotnet
complete` suggests them.

Fixes #9286.
2018-05-16 14:07:27 -07:00
Livar Cunha
2531e3a136 Add NoWarn for the stable package depending on non-stable package when packaging Cli.Utils for tests. 2018-05-16 12:44:23 -07:00
John Beisner
baeb21728d
Merge pull request #9285 from dotnet/merges/release/2.1.4xx-to-master
Merge release/2.1.4xx to master
2018-05-16 09:00:04 -07:00
Peter Huene
63d30787b9
Fix header output by dotnet sln list.
The `dotnet sln list` command uses `Project reference(s)` as the header for the
output instead of `Project(s)`. To be consistent with Visual Studio, the header
should refer to these as projects rather than project references as users can't
add "project references" to a solution.

This commit changes the header to `Project(s)`.

Additionally, the command now filters out solution folders and only shows
projects.

Fixes #9246.
2018-05-15 23:06:36 -07:00
John Beisner
08b20ef268
Merge pull request #9275 from dotnet/merges/release/2.1.3xx-to-release/2.1.4xx
Merge release/2.1.3xx to release/2.1.4xx
2018-05-15 09:17:36 -07:00
Livar
69062dda4e
Merge pull request #9266 from dotnet/merges/release/2.1.4xx-to-master
Merge release/2.1.4xx to master
2018-05-14 09:47:53 -07:00
Peter Huene
1feaa0385a
Fix incorrect default VSTest verbosity level.
Commit 10289504a8 changed the default verbosity
option used for MSBuild from `-v:quiet` to `-verbosity:quiet`.  This triggered a
match that was being done against arguments starting with `-verbosity` to
forward the value to VSTest via the `VSTestVerbosity` property.  The result is
that VSTest is using a default verbosity of `quiet`, suppressing error output
that users expect to see.

The fix is to change the check to only match against user-supplied options.
The default level the command uses for MSBuild is not forwarded to VSTest.

Fixes #9229.
2018-05-11 20:03:24 -07:00
Livar
11f2843f7b
Merge pull request #9252 from dotnet/merges/release/2.1.3xx-to-release/2.1.4xx
Merge release/2.1.3xx to release/2.1.4xx
2018-05-11 10:16:04 -07:00
Livar Cunha
b7a8c6d12f Introducing a Config object as a input to the FirstRunConfigurer. This allows us to decide what operations we want to
do as part of first run based on whether this is the invoke-reportsuccess from a native installer or a regular command
being invoked for the first time. This in turn allows us to ignore the skip first run variable on native installers and
expand the cache always in those cases.
2018-05-10 15:27:12 -07:00
jbeisner
e1ec232c47 Merge remote-tracking branch 'origin/release/2.1.4xx' into merges/release/2.1.4xx-to-master 2018-05-09 21:12:09 +00:00
Peter Huene
0f0f70ce48
Fix adding tools directory to PATH for native installers.
This commit fixes adding the tools directory to the user's PATH for the native
installers.

The issue was a regression caused by #8886.  The change used a "no-op" sentinel
file that reported it existed.  This "no-op" sentinel was used for the native
installers.  Unlike the other "no-op" sentinels used by the native installer,
we do want PATH to be modified by the native installer.

The fix is to change the "no-op" sentinel to report the file doesn't exist, but
also to not to attempt to create the file.

This fixes #9208.
2018-05-07 16:35:29 -07:00
Livar
6cc9ce45e8
Merge pull request #9028 from livarcocc/add_remove_messages
Updating the description of add/remove nuget packages and references and list
2018-05-07 11:24:58 -07:00
Tanner Gooding
f2f5c1b12b Merge remote-tracking branch 'dotnet/release/2.1.4xx' into merges/release/2.1.4xx-to-master 2018-05-07 10:55:14 -07:00
Tanner Gooding
6d6bf64f28 Merge remote-tracking branch 'dotnet/release/2.1.3xx' into merges/release/2.1.3xx-to-release/2.1.4xx 2018-05-07 08:20:23 -07:00
Livar
e7ebf48578
Merge pull request #9199 from livarcocc/remove_word_please
Removing the word please from the ASP.NET first run message.
2018-05-04 13:25:31 -07:00
Tanner Gooding
481e4a19b3
Merge pull request #9013 from dotnet/merges/release/2.1.2xx-to-release/2.1.3xx
Merge release/2.1.2xx to release/2.1.3xx
2018-05-04 11:00:39 -07:00
Livar Cunha
488711b4ff Removing the word please from the ASP.NET first run message. We are not supposed to use it. 2018-05-04 10:12:00 -07:00
Tanner Gooding
a8856ddccc Merge remote-tracking branch 'dotnet/release/2.1.2xx' into merges/release/2.1.2xx-to-release/2.1.3xx 2018-05-03 15:24:39 -07:00
Livar
bf5ad90bcf
Merge pull request #9182 from wli3/add-bundled-tool-description
Add additional tools to help text
2018-05-03 10:55:37 -07:00
Livar Cunha
8c2160b6a0 Removing some patches for source build. 2018-05-02 11:59:01 -07:00
Livar Cunha
661f058fed Updating the description of add/remove nuget packages and references and list. Also updating the parameter placeholder for add/remove reference. 2018-05-01 16:06:38 -07:00
Livar
f87c6e7d11
Merge pull request #9178 from natemcmaster/namc/disable-aspnet
Add a property to disable bundling ASP.NET Core tools and runtimes
2018-05-01 15:56:32 -07:00
Petr Onderka
6c9942bae6 Use NuGet autocomplete API for add-package suggestions (#9171) 2018-05-01 15:39:12 -07:00
William Li
46d4b71814 Add additional tools to help text 2018-05-01 14:28:15 -07:00
Nate McMaster
c382932ec4
Fix #if to match .csproj constant 2018-05-01 12:45:50 -07:00
Peter Huene
67ecb5ac65
Merge pull request #9161 from v-zbsail/loc_20180427_release_2.1.3xx
LOC CHECKIN | dotnet/cli release/2.1.3xx | 20180427
2018-05-01 11:25:45 -07:00
William Li
57d065e43d
Correct dotnet list description (#9174)
After dotnet tool list moved out of dotnet list, the description has not been updated.
2018-05-01 10:24:40 -07:00
William Li
d681933b87
Rename --source-feed to --add-source (#9164)
* Rename to add-source
2018-05-01 10:21:00 -07:00
Nate McMaster
b0c5fddc04
Add a property to disable bundling ASP.NET Core tools, templates, and runtimes 2018-04-30 17:49:09 -07:00
Zbyněk Sailer
47a65f258a
LOC CHECKIN | dotnet/cli release/2.1.3xx | 20180427 2018-04-30 14:50:26 -07:00
Peter Huene
b23259c30f
Merge pull request #9160 from peterhuene/fix-pid-file-share-mode
Fix Razor server shutdown on Windows.
2018-04-30 14:47:31 -07:00
Peter Huene
eaf5e95996
Merge pull request #9153 from peterhuene/quote-msbuild-properties
Fix MSBuild invocation to quote property option values.
2018-04-27 16:52:02 -07:00
Peter Huene
b2b3947c68
Fix Razor server shutdown on Windows.
On Windows, the Razor server correctly creates the pid file with
`FileAccess.Write` and `FileOptions.DeleteOnClose`.  This requires a share mode
of `FileShare.Write | FileShare.Delete` to open.  However, the
`dotnet build-server shutdown` command was opening the file with
`FileShare.Read`.  As a result, an `IOException` was being thrown and was not
handled.

This change first opens the file with the appropriate share access and also
properly handles a failure to access or read the contents of the pid file.

Additionally, an integration test was added to test that Razor server shutdown
works as expected.

Fixes #9158.
2018-04-27 13:52:17 -07:00
Peter Huene
f9b939fe89
Fix MSBuild invocation to quote property option values.
This commit ensures that any `/property` option's value is surrounded by quotes
to allow MSBuild to properly interpret special characters like semicolons.

Users familiar with MSBuild expect `/property:Name="Value"` to handle
semicolons. However, since `dotnet` parses the command line first, the
quotes get processed by its command line parser.  This results in
`/property:Name=Value` being passed to MSBuild, which will not parse a "Value"
containing a semicolon correctly.

Since it is safe to always quote the property value for this option, this fix
simply ensures that the value is surrounded by quotes.

This fixes the issue for all commands that forward arguments to MSBuild.

Fixes #7791.
2018-04-26 14:38:21 -07:00
Peter Huene
b9597913dc
Fix --source-feed option for tool install and update commands.
Commit 9cc2b7cd2f regressed the `--source-feed`
option so that it no longer accepted relative paths.  Because the option is now
saved to the temp project file, any relative paths specified by the
`--source-feed` option were made relative to the temp project path and not from
the current working directory of where dotnet was run.

The fix is to use `Path.GetFullPath` of the `--source-feed` option, provided
the option specified was not an absolute URI.

Fixes #9132.
2018-04-24 20:43:14 -07:00
Livar
355b08befd
Merge branch 'release/2.1.4xx' into merges/release/2.1.3xx-to-release/2.1.4xx 2018-04-24 14:20:28 -07:00
William Li
270fc4428a
do not set BaseIntermediateOutputPath in temp project of dotnet install (#9122)
Should use MsBuildProjectExtensionsPath instead.

Change the property passin by project file instead of command line. It is more reliable passing path in xml and also the timing of MsBuildProjectExtensionsPath is controlled. (Before loading SDK)
Change mock fake project to use “;” instead, since c:\path contains “:”.
2018-04-24 10:19:27 -07:00
William Li
008e5f3d97
Remove -f short hand in dotnet tool install (#9102) 2018-04-23 13:23:35 -07:00
Peter Huene
1ade191cb6
Implement Razor server discovery by pid file.
Previously, Razor server discovery for the `build-server shutdown` command was
implemented by invoking MSBuild on a project file in the current directory to
evaluate the path to the Razor server dll.  This was problematic since it would
only discover a single running Razor server instance and required that the user
run the `build-server shutdown` command from a specific location.

Razor's server now writes a "pid file" to a well-known location
(`~/.dotnet/pids/build`) which the command can now enumerate to discover, and
shutdown, the running Razor servers.

This commit changes the Razor server discovery to use the pid files and removes
the requirement that users need to run the command in specific directories to
work.

Fixes #9084.
2018-04-20 10:49:31 -07:00
Peter Huene
8e01912b36
Merge pull request #9089 from peterhuene/buildserver-command-rename
Rename buildserver command.
2018-04-18 11:42:54 -07:00
William Li
34060d3a23
pick up nuget loc (#9090) 2018-04-18 11:18:14 -07:00
Peter Huene
3f1ab372b4
Rename buildserver command.
This commit renames the `buildserver` command to `build-server`.

Fixes #9075.
2018-04-17 17:04:12 -07:00
Steve MacLean
8c937a0db0 [Arm64] Add crosscomponent crossgen (#9011) 2018-04-17 16:54:01 -07:00
William Li
ae75392078
Merge pull request #9079 from wli3/help-text-02
Help text improves
2018-04-17 12:21:39 -07:00
William Li
854feefe6f
Give a different error to guide use to install via global tools (#9070)
Give a different error to guide use to install via global tools so, if several bundled DotnetTools cannot finish source build on time. The user can use global tools to get it.

The original plan that adding a different resolver is hard due to resolver can only find dll that will be used to spawn a process. However, the command constructor will give an error message when resolver find null. By adding a different error when the command name is part of the list, it can achieve the same goal.
2018-04-17 12:21:20 -07:00
William Li
fd66168922 Error message has instruction to help investigate from NuGet error message 2018-04-16 21:42:50 -07:00
William Li
b0610b9116 Add doc link for both dotnet-tool and dotnet-buildserver 2018-04-16 21:42:45 -07:00
William Li
6851961c16 Better help text on dotnet tool 2018-04-16 10:51:43 -07:00
Nick Guerrera
c2713b41c3
Merge pull request #9020 from v-zbsail/loc_20180403_master
LOC CHECKIN | dotnet/cli master | 20180409
2018-04-11 17:55:36 -07:00
William Li
b0ee5db411
consume bring your own shim(byos) (#9018)
If there are shims packaged by convention in nupkg. Shim Repository will simply copy it to the right location.

The query interface ToolPackageInstance will be in charge of finding the shim folder and filter the right RID. Shim Repository will pick the right file after the folder is located since Shim Repository knows the shim name and it also book keep the files at uninstallation.
During development, due to the wrong adapter level. The mock duplicated too much logic. So, I corrected the abstraction level to lower (only create shim). And replaced the existing mock with a much smaller one without any atomic control and file move, copy logic. At the same time. The chmod, which is a IO action, causes problem during tests. So I added adapter layer to it and put it in Util.
2018-04-10 15:42:50 -07:00
Livar Cunha
18dd8107f2 Removing the explicit dependency on System.Diagnostics.Process from Cli.Utils. Use the assembly from netstandard. 2018-04-10 10:37:09 -07:00
Livar Cunha
82a85aa269 Updating the dev-certs message displayed in the first run experience. 2018-04-09 11:57:11 -07:00
Zbyněk Sailer
5cdfca4e94 LOC CHECKIN | dotnet/cli master | 20180409 2018-04-09 15:18:54 +02:00
William Li
2f01bb4fad
Add TryGetMostFitRuntimeIdentifier (#8997) 2018-04-06 17:39:58 -07:00
William Li
cbd6434c8b Adapt to no config file Apphost shim
Instead of writing the config file. Embed the relative path, instead of only the file name of app binary, to the AppHost itself.
2018-04-06 12:23:05 -07:00
Livar
7cb7535bae
Merge branch 'master' into merges/release/2.1.3xx-to-master 2018-04-06 09:05:57 -07:00
Nick Guerrera
4956bfea8c
Merge pull request #8996 from nguerrera/publish-no-build
Implement `dotnet publish --no-build`
2018-04-05 23:43:02 -07:00
Nick Guerrera
42e0afff1d Tweak --no-build messages based on PR feedback 2018-04-05 16:07:52 -07:00
Livar
94a69a95b8
Merge pull request #8933 from dotnet/merges/release/2.1.3xx-to-master
Merge release/2.1.3xx to master
2018-04-05 13:27:53 -07:00
Livar
c3a1fecd99
Merge pull request #9001 from livarcocc/automatic_build_numbers_installers
Automatic build numbers flow into installers
2018-04-05 10:50:33 -07:00
Livar
4c948fefcc
Merge branch 'master' into merges/release/2.1.3xx-to-master 2018-04-05 09:09:45 -07:00
Livar Cunha
b09b6bff26 Generating the conclusion.html files dynamically so that we don't need to set the version in them everytime our branding changes. 2018-04-04 20:57:45 -07:00
Nick Guerrera
b6174af511 Implement dotnet publish --no-build 2018-04-04 15:03:29 -07:00
Livar
a7bfaacf99
Merge branch 'master' into merges/release/2.1.3xx-to-master 2018-04-04 10:16:22 -07:00
Livar
721c068376
Merge branch 'release/2.1.2xx' into merges/release/2.1.1xx-to-release/2.1.2xx 2018-04-04 10:15:45 -07:00
Peter Huene
cee27d3970
Merge pull request #8886 from peterhuene/first-run-tool-path
Fix failure to add tools path on restricted Windows environments.
2018-04-03 21:14:30 -07:00
Peter Huene
19090744cb
Fix failure to add tools path on restricted Windows environments.
On environments where registry access is disabled, the first run experience
fails because it could not add the tools path to the user's environment.

This fix properly handles the security exception by printing a warning and
continuing.  Users will have to manually add the PATH environment variable to
their environments to prevent `dotnet tool install` from printing PATH
instructions.

A new file sentinel is added to track whether or not the PATH has been
modified.  The first run experience also now correctly skips modifying the PATH
if `DOTNET_SKIP_FIRST_TIME_EXPERIENCE` is set.

Fixes #8874.
2018-04-03 16:27:01 -07:00
Peter Huene
0181c67bb0
Fix validation of tool-path option for tool list and uninstall commands.
This commit checks that the `--tool-path` option for the `tool list` and `tool
uninstall` commands is a directory that exists.

If the directory does not exist, an error and the command help is displayed.

Fixes #8931.
2018-04-03 16:02:14 -07:00
Livar
a600b1b206
Merge pull request #8979 from livarcocc/remove_utils_explicity_dependency
Removing the explicit dependency on System.Diagnostics.Process from Cli.Utils
2018-04-03 15:22:03 -07:00
William Li
d3f69e2e01
Skip bundled dotnet tools (#8977) 2018-04-03 14:36:59 -07:00
William Li
ef389bb6b3
Add null check for Environment.GetEnvironmentVariable (#8970) 2018-04-03 14:36:19 -07:00
Livar Cunha
de81fbec2a Removing the explicit dependency on System.Diagnostics.Process from Cli.Utils. Use the assembly from netstandard. 2018-04-03 13:28:53 -07:00
Livar Cunha
b1fca8c4d2 Replacing the short form version of implicit msbuild parameters with longform ones. 2018-04-02 22:54:51 -07:00
Livar
0ca2c9fdc8
Merge pull request #8942 from wli3/better-error-message
Show version guide only when restore fails
2018-04-02 21:35:55 -07:00
Livar Cunha
10289504a8 Replacing all implicit msbuild parameters from using a forward slash to using a dash. 2018-04-02 14:49:52 -07:00
Livar Cunha
7c37c9a069 Changing the /m /v:m default parameters to msbuild to -m and -v:m to avoid confusing that with files on unix machines. 2018-04-02 12:41:21 -07:00
William Li
e70f07178a
Apphost shim (#8893)
* Publish app host to folder under SDK

* Use carried apphost as shim

* Remove full framework launcher

* Fix test run command issue

* Use latest release/2.1 build

* Test with 32 bit env

* Add missing return

* Update to latest prodcon build

* Add xlfs
2018-04-02 12:37:25 -07:00
Livar
e79425b27d
Merge pull request #8957 from natemcmaster/dev-cert-msg
Remove instruction to install dotnet-dev-certs separately
2018-04-02 10:33:08 -07:00
Nate McMaster
3986b570c7
Remove instruction to install dotnet-dev-certs separately 2018-03-30 22:19:08 -07:00
Peter Huene
abcdeba455
Merge pull request #8950 from peterhuene/server-command
Implement `buildserver shutdown` command.
2018-03-30 17:19:29 -07:00
Livar
abaea13eae
Merge pull request #8919 from dsplaisted/self-contained-roll-forward
Add latest patch versions to BundledVersions.props, and tests to make sure that they are up to date
2018-03-30 16:47:09 -07:00
William Lee
a67d1c6e06
Remove empty PATH in path resolver (#8943) 2018-03-30 16:05:41 -07:00
Peter Huene
3488a84c35
Implement buildserver shutdown command.
This commit implements the `buildserver shutdown` command that can be used to
shutdown MSBuild, VB/C# compiler, and Razor build servers.

By default, all three build servers are shut down.  Options can be passed to
shut down a subset of the build servers.

Fixes #8185.
2018-03-30 15:13:52 -07:00
Daniel Plaisted
ed8c0ac3e1 Improve error message when inable to generate deps.json for project tool 2018-03-30 14:49:24 -07:00
Daniel Plaisted
6e8355b30a Show arguments passed to MSBuild in verbose log when generating deps.json for DotNetCliToolReference 2018-03-30 14:39:12 -07:00