Commit graph

3156 commits

Author SHA1 Message Date
Peter Huene
0cdc4b8f19
Merge pull request #8691 from peterhuene/list-command
Implement the `list tool` command.
2018-03-05 16:52:40 -08:00
Peter Huene
da90a08ada
Implement tests for the list tool command.
This commit implements tests for the `list tool` command.
2018-03-05 10:18:48 -08:00
Peter Huene
5ebbd618ec
Fix case sensitivity of tool package identifiers.
This commit fixes the case sensitivity of tool package identifiers.

Previously the install and uninstall commands unintentionally required the tool
package ids to specified in all lowercase for the install / uninstall to work.

Fixes #8682.
2018-03-05 10:18:41 -08:00
Peter Huene
4490fd5aa8
Implement list tool command.
This commit implements the `list tool` command.

The command is responsible for displaying a list of install global tools.

Fixes #8548.
2018-03-02 14:59:11 -08:00
Livar Cunha
6072355340 Make the default verbosity for dotnet clean normal. This way we can get some meaningful output out of the command. 2018-03-01 14:09:06 -08:00
Dan Moseley
f9c40ce94d Log Windows product type and installation type, and Linux libc version (#8688)
* Installation type

* Product Type

* Libc Release and Version

* Catch all

* Fix test

* Fix mac test

* Extract class

* Remove CharSet

* Remove extraneous assignment

* Missing space

* Typo

* Fix comment XML

* CR feedback
2018-02-27 18:55:35 -08:00
Peter Huene
9ef495327a
Implement a printable table.
This commit implements a simple printable table that can be used to display
tabular data.

The columns of the table can specify a maximum width which will cause the
column text to wrap around to the next line.
2018-02-27 15:57:53 -08:00
Jeff Kluge
8f7b58dd66
Move some projects to netstandard2.0 (#8692)
* Move some projects to netstandard2.0

* Use version agnostic $(TargetFrameworkIdentifier) property to make changing versions easier since we only care about .NET Framework vs .NET Standard
* Add missing project to solution file
* Update TestPackageProjects.targets to use netstandard2.0 on non-Windows
2018-02-27 13:59:59 -08:00
Peter Huene
2ff85cdd9a
Update description of uninstall command to match install command.
This commit updates the help text of the uninstall command to match the install
command's help text.
2018-02-26 18:29:40 -08:00
Peter Huene
c3e78cca1d
Remove unused resource strings.
This commit removes unused resource strings from commands that no longer exist.
2018-02-26 18:29:40 -08:00
William Lee
c28f4a2e34
Pass any as rid (#8677) 2018-02-26 11:46:01 -08:00
Nick Guerrera
49f03538ba Fix loc test by using straight quotes 2018-02-22 17:49:15 -08:00
Nick Guerrera
8a1ff2eac0 Merge branch 'master' into loc_20180220_master 2018-02-22 16:02:54 -08:00
Zbyněk Sailer
3c2c956670 LOC CHECKIN | cli master | 20180222 2018-02-22 17:07:50 +01:00
Peter Huene
aab9af71b8
Implement uninstall tool command.
This commit implements the `uninstall tool` command.

The `uninstall tool` command is responsible for uninstalling global tools that
are installed with the `install tool` command.

This commit heavily refactors the ToolPackage and ShellShim namespaces to
better support the operations required for the uninstall command.

Several string resources have been updated to be more informative or to correct
oddly structured sentences.

This commit also fixes `--version` on the install command not supporting ranges
and wildcards.

Fixes #8549.

Issue #8485 is partially fixed by this commit (`--prerelease` is not yet
implemented).
2018-02-19 22:46:16 -08:00
William Lee
08f050c012
bundled DotnetTool (#8606)
Extract packages to DotnetTools folder under sdk/{version}

Add new resolver to discover it

Add test to enforce package structure. It will fail when the structure
changed
2018-02-16 13:32:29 -08:00
Livar Cunha
e8f521cbef Stop re-targeting Roslyn to the CLI runtime. It will roll-forward to the CLI runtime (2.1.0) through minor version roll-forward if necessary. 2018-02-15 14:21:27 -08:00
Livar Cunha
f19b3fddc9 Merge remote-tracking branch 'dotnet/release/2.1.3xx' into merges/release/2.1.3xx-to-master
* dotnet/release/2.1.3xx:
  Update to aspnetcore 2.1.0-preview1-28275 and react to feed layout changes (#8611)
  "ExternalRestoreSources" needs to be set in the docker container (#8602)
  Signing nupkg contents (Cli.Utils and MSBuildResolver) along with the rest of the compiled assemblies.
  Use satellites from roslyn package, not cli-deps-satellites
  Update to roslyn 2.7.0-beta3-62612-07 for 2.1.1xx
  Support TildeSlash expand (#8589)
  Port Kernel Version telemetry to preview1
  Do not create a directory with a trailing space; it cannot be deleted by conventional methods. (#8587)
  Consume generic aspnetcore rpm installers
  Insert NuGet Build 4.6.0-rtm-4918 into cli
  Adding roslyn to automatic dependency flow through maestro.
  Fixing update dependency by using the new APIs. We broke this when we updated the version of VersionTools.
  MSBuild 15.6.81
  Update SDK to 2.1.300-preview1-62608-07
  MSBuild 15.6.80

 Conflicts:
	build/DependencyVersions.props
	test/Microsoft.DotNet.ShellShim.Tests/ShellShimMakerTests.cs
2018-02-15 11:57:36 -08:00
Livar Cunha
7e32b9a593 Merge remote-tracking branch 'dotnet/release/2.1.2xx' into merges/release/2.1.2xx-to-release/2.1.3xx
* dotnet/release/2.1.2xx:
  Use satellites from roslyn package, not cli-deps-satellites
  Update to roslyn 2.7.0-beta3-62612-07 for 2.1.1xx

 Conflicts:
	build/DependencyVersions.props
	src/redist/redist.csproj
	src/tool_roslyn_satellites/tool_roslyn_satellites.csproj
2018-02-14 15:18:29 -08:00
Nick Guerrera
bc1fb44364 Use satellites from roslyn package, not cli-deps-satellites 2018-02-12 16:52:26 -08:00
William Lee
2a493c1318
Support TildeSlash expand (#8589) 2018-02-12 14:59:43 -08:00
danmosemsft
aa90d8efd2 Port Kernel Version telemetry to preview1 2018-02-09 17:20:50 -08:00
Nick Guerrera
6677d8f0b6 Merge branch 'master' into loc_20180129_master 2018-02-08 15:48:10 -08:00
Livar Cunha
f752dd7fc7 Merge branch 'release/2.1.3xx' into merge_release_213xx
* release/2.1.3xx: (51 commits)
  Removing all references to a static 'aspnetpatch' Nuget.Config (#8556)
  Updating the MSI Installation Note message. Also had to shift components around slightly to make it fit.
  Fixing recent CLI test failures around ASP.NETcore in the orchestrated build (#8553)
  The BuildTasksFeedTool version and the VersionTools version should be in sync to prevent incompatabilities between these two packages.
  Update to aspnetcore 2.1.0-preview1-28228
  Adding the VBCSCompiler to the list of signed files due to crossgen.
  Ensure ASP.NET Core is included in macos .pkg installer and update to 2.1.0-preview1-28226
  Remove obsolete F# satellite package
  MSBuild 15.6.76
  Update F# to match dev15.6 preview 4
  Excluding shared framework assemblies from the Roslyn folder in the SDK.
  Insert NuGet Build 4.6.0-rtm-4880 into cli
  Updating Roslyn to 2.7.0-beta3-62529-05.
  Update fsharp compiler to match preview 4
  Insert NuGet Build 4.6.0-rtm-4862 into cli
  MSBuild 15.6.70
  Insert NuGet Build 4.6.0-rtm-4859 into cli
  MSBuild 15.6.69
  Update package reference
  update fsharp compiler to match vs2017.6 preview 3
  ...

 Conflicts:
	build/DependencyVersions.props
2018-02-08 09:50:59 -08:00
Livar Cunha
8408322652 Merge branch 'release/2.1.1xx' into merge_release_211xx
* release/2.1.1xx: (45 commits)
  Adding the VBCSCompiler to the list of signed files due to crossgen.
  Remove obsolete F# satellite package
  MSBuild 15.6.76
  Update F# to match dev15.6 preview 4
  Excluding shared framework assemblies from the Roslyn folder in the SDK.
  Insert NuGet Build 4.6.0-rtm-4880 into cli
  Updating Roslyn to 2.7.0-beta3-62529-05.
  Update fsharp compiler to match preview 4
  Insert NuGet Build 4.6.0-rtm-4862 into cli
  MSBuild 15.6.70
  Insert NuGet Build 4.6.0-rtm-4859 into cli
  MSBuild 15.6.69
  Update package reference
  update fsharp compiler to match vs2017.6 preview 3
  Insert NuGet Build 4.6.0-rtm-4825 into cli
  Fixing the prefercliruntime asset
  Updating the SDK dependency to 15.5.0-preview-62518-04 to fix the signing issue
  Updating the channel to release/2.1.1xx. We can manually update release/2.0 if necessary, but LTS is always updated every time we release.
  MSBuild 15.6.54
  Updates the TestPlatform to 15.6.0-preview-20180109-01
  ...

 Conflicts:
	build/BranchInfo.props
	build/Branding.props
	build/DependencyVersions.props
	build/NugetConfigFile.targets
	build/Version.props
	build/package/Installer.DEB.proj
	build/package/Installer.DEB.targets
	build/package/Installer.RPM.targets
	build_projects/dotnet-cli-build/dotnet-cli-build.csproj
	packaging/osx/clisdk/resources/cs.lproj/conclusion.html
	packaging/osx/clisdk/resources/de.lproj/conclusion.html
	packaging/osx/clisdk/resources/en.lproj/conclusion.html
	packaging/osx/clisdk/resources/es.lproj/conclusion.html
	packaging/osx/clisdk/resources/fr.lproj/conclusion.html
	packaging/osx/clisdk/resources/it.lproj/conclusion.html
	packaging/osx/clisdk/resources/ja.lproj/conclusion.html
	packaging/osx/clisdk/resources/ko.lproj/conclusion.html
	packaging/osx/clisdk/resources/pl.lproj/conclusion.html
	packaging/osx/clisdk/resources/pt-br.lproj/conclusion.html
	packaging/osx/clisdk/resources/ru.lproj/conclusion.html
	packaging/osx/clisdk/resources/tr.lproj/conclusion.html
	packaging/osx/clisdk/resources/zh-hans.lproj/conclusion.html
	packaging/osx/clisdk/resources/zh-hant.lproj/conclusion.html
	packaging/windows/clisdk/bundle.wxl
	scripts/obtain/dotnet-install.ps1
	scripts/obtain/dotnet-install.sh
	src/tool_fsharp/tool_fsc.csproj
	test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs
	test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
2018-02-07 12:30:22 -08:00
William Lee
5fa558a2ed
Atomic install tool (#8518)
* Make dotnet install tool atomic

Apply TransactionScope to tool install. It can handle the correct timing
of roll back and commit.

Convert existing ToolPackageObtainer and ShellShimMaker by passing logic
via lambda to an object that has IEnlistmentNotification interface. It
turns out the very clean.

Use .stage as staging place to verify of package content, and shim. It
should roll back when something is wrong. When there is ctrl-c, there
will be garbage in .stage folder but not the root of the package folder.
2018-02-06 13:38:06 -08:00
Livar Cunha
2980fdbfa1 Merge branch 'release/2.1.3xx' into merge_release_213xx
* release/2.1.3xx:
  Infrastructure updates: CLI:master -> release/2.1.3xx (#8541)
  Fixing the recent CLI test failures around ASP.NETcore in the orchestrated build: adding a 'dotnet-corefxlab' feed. (#8536)
  Update BranchInfo.props
  Update the branch info to be correct for 2.1
  [Fixes #8511] Update ASP.NET Core certificate installation message
  Excluding shared framework assemblies from the Roslyn folder in the SDK.
  Updating Roslyn to 2.7.0-beta3-62529-06.
2018-02-05 15:55:31 -08:00
Nate McMaster
bc486e787a Ensure ASP.NET Core is included in macos .pkg installer and update to 2.1.0-preview1-28226 2018-02-05 11:34:52 -08:00
Nick Guerrera
d4dedc616c
Merge branch 'release/2.1.1xx' into update_roslyn 2018-02-02 14:06:05 -08:00
Zbyněk Sailer
f0be5cc1ef LOC CHECKIN | cli master | 20180202 2018-02-02 12:31:06 +01:00
Livar
89898c5a45
Merge pull request #8512 from javiercn/javiercn/update-message
Update ASP.NET Core certificate installation message
2018-02-01 19:07:20 -08:00
Nick Guerrera
ad1292bac2 Remove obsolete F# satellite package 2018-02-02 02:44:14 +01:00
Peter Huene
7ebfdde749
Add verbosity option to install tool command.
This commit adds the `--verbosity` option to the `install tool` command.

MSBuild/NuGet output is now controllable by the user and defaults to being "quiet".

This enables users to see warnings from NuGet that otherwise would be swallowed
unless NuGet returned a non-zero exit code. As a byproduct of this change, the
exception handling and error messages related to obtaining tool packages was
retooled. We no longer display `install tool` command line help for installation
failures, as it should only be displayed for command line syntax errors.

Fixes #8465.
2018-01-31 15:19:34 -08:00
Javier Calvarro Nelson
b1c780550f [Fixes #8511] Update ASP.NET Core certificate installation message 2018-01-31 12:47:16 -08:00
Peter Huene
d8d600d44e
Merge branch 'release/2.1.3xx' into master
* release/2.1.3xx:
  Updating the WebSdk DependencyVersion to support local build
  Fix non-fatal null exception when no extra parameters are passed.
  Separate tool package and shim file location
  Updating the CLI branding and version to 2.1.300.

* Conflicts
  src/dotnet/commands/dotnet-install/dotnet-install-tool/InstallToolCommand.cs
  run-build.ps1
  build/Version.props
2018-01-30 16:47:05 -08:00
William Lee
55eb8bb7fc
replace string with FilePath (#8494) 2018-01-30 15:41:39 -08:00
Livar Cunha
3bf4751a8d Excluding shared framework assemblies from the Roslyn folder in the SDK. 2018-01-30 15:33:08 -08:00
Livar Cunha
a52bd1a205 Excluding shared framework assemblies from the Roslyn folder in the SDK. 2018-01-30 14:02:40 -08:00
William Lee
9e535a867a
Remove PackageToProjectFileAdder (#8468)
Add reference to project with version * is doing the same thing
2018-01-24 17:55:26 -08:00
William Lee
05052c0541
Use rich mock to test InstallCommand (#8402)
To ensure the mock has the same behavior the component has, run mock under the same tests the adapter has.
It is a common problem that moq has -- "everything is mocked out, you are not test anything"
2018-01-24 10:16:27 -08:00
Kevin Ransom
b3c2414804 Update package reference 2018-01-23 15:42:57 -08:00
William Li
36c01137ad Separate tool package and shim file location 2018-01-22 16:30:52 -08:00
Livar
c9ac5c9c02
Merge pull request #7951 from wfurt/freebsd
add basic support for FreeBSD
2018-01-22 14:17:56 -08:00
Zbyněk Sailer
8cb01e226c LOC CHECKIN | cli - master | 20180112 (#8385)
* LOC CHECKIN | cli - master | 20180112

* LOC CHECKIN | cli - master | 20180118 update

* LOC CHECKIN | cli - master | 20180119 update | DEU fix
2018-01-22 13:56:03 -08:00
William Lee
839eccbcaf
MacOs HighSierra Fallback (#8437)
walk around for https://github.com/dotnet/corefx/issues/26488
2018-01-22 10:45:35 -08:00
William Lee
02a98d4e63
[tools] Integrate NuGet (#8414)
* Integrate NuGet ask

* Update NuGet version. Rely on NuGet to filter TFM. And use asset.json to find entrypoint

* Update XML file to per TFM

* Add extra property to the fake project according to nuget

* Treat nuget fallback folder as offline cache for tool

* Require -g to install global tool

* Copy test asset during test project build

* Address code review on LockFileMatchChecker

* Get NETCorePlatformsImplicitPackageVersion from PackageDefinitions

* Edit and add missing loc

* Change LockFileMatchChecker to local function

* Adding comment

* Add to content instead of copy

* Download platform package instead

* disable SDK side implicit NuGetFallbackFolder

* merge loc

* Revert extra line

* use a prerelease platforms version that supports alpine
2018-01-19 17:15:34 -08:00
Nate McMaster
c8bae2ffda Simplify the tool_launcher to build for just one version of .NET Framework 2018-01-19 15:19:33 -08:00
Nate McMaster
fa47e95e90
Generate a .NET Framework shim app in dotnet-install-tools on Windows instead of a batch script (#8384)
Implement a simple launcher tool for running new processes on Windows

- This application takes two parameters via the .exe.config configuration file

 - entryPoint: required - the file path to the new process being launched
 - runner: optional - the executable or interpretter used to launch the
entryPoint

- Update dotnet-install-tool to generate an exe instead of a batch script file
2018-01-18 14:54:10 -08:00
Peter Huene
a64da0129a
Fix source option for install command.
The original PR that implemented the source option was updated incorrectly
during review and the source option was accidentally not passed into the
package obtainer.  This resulted in the source option not being respected from
the install command.

The tests passed because the only test coverage is at the package obtainer
level; tests of the install command itself were waiting on additional changes
to enable (still not yet merged).

The fix is to properly pass the source option through when obtaining the
package.
2018-01-17 19:28:29 -08:00
Peter Huene
83609cef8a
Merge pull request #8408 from peterhuene/install-tool-strings
Fix missing package id error message for install tool command.
2018-01-17 13:49:05 -08:00
Nick Guerrera
840acee074
Defend against forthcoming breaking change in SDK (#8409) 2018-01-17 10:13:41 -08:00
Peter Huene
5b696e4831
Update help description for install command.
Replace the word `add` with the word `install` to match the verb of the
tool.
2018-01-16 15:01:57 -08:00
Peter Huene
2f26f10ed2
Fix missing package id error message for install tool command.
This commit fixes the error message that is displayed when the `install
tool` command is not given a package id to install.  Previously, only
`packageId` was output, which was confusing.

Fixes #8381.
2018-01-16 13:57:26 -08:00
Peter Huene
2c03ff9bcf
Refactor install command localizable strings.
This commit moves the `tool` subcommand strings into its own resource
file, rather than putting them into the `install` command's resource
file.

This better follows the patterns of other commands, such as `add`, and
enables subcommands to isolate their string resources from one another.

As part of this commit, the `install tool` string resources were cleaned
up.
2018-01-16 12:59:34 -08:00
William Lee
e8f7ddd01b
Localization for tools work so far (#8251) 2018-01-13 09:40:48 -08:00
William Lee
a3aa6dc1c2
Merge pull request #8379 from peterhuene/install-tool-source-option
Add source option to install tool command.
2018-01-12 17:46:08 -08:00
Peter Huene
fe89456f2a
Add source option to install tool command.
This commit adds the `--source` option to the `install tool` command.  This
option is equivalent to the option of the same name for the `restore` command.

The option is forwarded to the underlying restore operation.

Fixes #8226.
2018-01-12 16:08:13 -08:00
Andy Gerlicher
2b3ade043d Use a multi-proc aware MSBuild logger (#8371)
Make use of the MSBuild distributed logger functionality and add a
forwarding logger. When in a multi-proc build, the forwarding logger
will decide which events to forward to the main node to be logged.
Without this, all events are routed and a perf penalty is incurred.
2018-01-11 15:30:56 -08:00
Javier Calvarro Nelson
08a369cf86 Prevent the ASP.NET certificate generation logic from running on the installers 2018-01-10 21:54:05 -08:00
Livar
e9d1d025de
Merge pull request #8341 from natemcmaster/aspnetcore-sharedfx
Update to ASP.NET Core shared framework 2.1.0-preview1-28031
2018-01-09 18:57:13 -08:00
Peter Huene
28d929a6d5
Merge pull request #8285 from peterhuene/sln-add-map-project-configurations
Map solution configurations to existing project configurations on add.
2018-01-08 14:18:42 -08:00
Nate McMaster
b6b53f1e55 Update dev-certs version 2018-01-05 19:29:55 -08:00
Peter Huene
f7009106d8
Map solution configurations to existing project configurations on add.
This commit implements solution configuration to project configuration mapping.

Previously, when a project was added to the solution with the `sln add`
command, solution configurations would be mapped to a project configuration and
platform of the same name, regardless of whether or not the project had a
configuration or platform of that name.  This caused the solution to appear
dirty when opened in Visual Studio if the configuration or platform did not
exist at the project level because Visual Studio would attempt to correct the
mapping.

The fix is to check what configurations and platforms are supported by the
project and only map to what is present.  If a solution configuration can't be
mapped, the first configuration/platform supported by the project is chosen;
this is consistent with how Visual Studio does the fallback mapping.

Fixes #6221.
2018-01-05 18:40:26 -08:00
Livar Cunha
e329e0694f Fixing redist to use the new way to consume roslyn. I merged it wrong before. 2018-01-05 15:56:15 -08:00
Livar
ee4e7049eb
Merge pull request #8284 from v-zbsail/loc_20171213
LOC CHECKIN | dotnet/cli – master | 20171222
2018-01-05 12:54:49 -08:00
Livar Cunha
80933404d0 Fix tool_roslyn_satellite by making it use the new dependency version properties. 2018-01-05 12:53:03 -08:00
Zbyněk Sailer
7ff9ac9a36 LOC CHECKIN | dotnet/cli – master | 20170104 | update 2018-01-04 15:03:49 +01:00
Livar Cunha
3d92e52234 Merge remote-tracking branch 'dotnet/release/2.0.0' into merges/release/2.0.0-to-release/2.1-20180103-080038
* dotnet/release/2.0.0: (32 commits)
  Update wix version (#8313)
  Use explict and non-preview versions for the build DLL
  Fixing a typo...
  The 15.4.8 version of the Microsoft.Build.Runtime nuget package is currupt; use the replacement 15.4.8.1
  Fix dotnet-install to check the right path for no-op installs when --shared-runtime is specified
  Fixed a typo...
  Nuget.config update to align with CLI:master - add comments in DependencyVersions.prop
  Even more package dependency re-names...
  Third pass clean-up of package names.
  Second pass clean-up of package names; resequencing download.
  Updating dependency version properties in alignment with sample orchestrated build file at: https://dotnetfeed.blob.core.windows.net/orchestrated/20171129-03/orchestration-metadata/PackageVersions.props
  The access key is already resolved: 'CoreSetupBlobAccessTokenParam'
  Fixed another typo...
  Fixed typo...
  The first pass will need the extra args [same as run-build.ps1].
  Dependency Uptake: download and import a package version props file.
  Accounting for MSRC builds with pre-set 'CoreSetupBlobRootUrl' and 'CoreSetupBlobAccessToke' properties.
  Changes per code review...
  The URL root will include the "dotnet" container; the structure will be identical after the "dotnet" container.
  No passwords should be in the open as environmental variables.
  ...

 Conflicts:
	build/DependencyVersions.props
	src/redist/redist.csproj
	src/tool_msbuild/tool_msbuild.csproj
	src/tool_roslyn/tool_roslyn.csproj
	test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
2018-01-03 16:16:41 -08:00
Steve Harter
01b8e02100 Add help for list-sdks and list-runtimes 2018-01-03 17:34:08 -06:00
Nick Guerrera
4f47ca1e75 Update xlf 2017-12-22 16:55:48 -08:00
William Lee
4e5188817b
Check null for env (#8286)
As you see, the implementation of the 3 OS to check PATH is different.
There is not too much to extract. And I tried to move the
"contains a folder path in env:path?" to a method. But that
method requires to pass in env:path, targetapath and path separator for
different OS. This method has low value. And people still must
remember to use this method. So I just added simple null check to the
place I used GetEnvPath.
2017-12-22 12:47:33 -08:00
v-mdriml
40faaade90 LOC CHECKIN | dotnet/cli – master | 20171222 2017-12-22 11:30:49 +01:00
Livar
2cd74779d1 Updating roslyn to a version with the vbcscompiler. (#8214) 2017-12-19 14:06:48 -08:00
Livar
b8f5972491
Merge pull request #8222 from peterhuene/dotnet-run-output
Make restore performed by run command default to nologo and quiet.
2017-12-18 09:35:35 -08:00
William Lee
d833eaa657
Fix windows keep adding tools path to env:PATH (#8248)
Environment.GetEnvironmentVariable(PathName) means

Environment.GetEnvironmentVariable(PathName,
EnvironmentVariableTarget.Process)

However, I have added to .User. So the detection of path existence
failed. And it ends up adding the path again and again
2017-12-15 15:04:59 -08:00
Peter Huene
dcc99d6e33
Make restore performed by run command default to nologo and quiet.
This commit changes the run command such that it will now be `/nologo` and
`/verbosity:quiet` (by default) for the restore operation even if a target
framework is specified.

When a target framework is specified, a separate restore operation is performed
that does not pass `/nologo` and the default verbosity is used.  The fix is to
ensure that the arguments used for the restore operation match those that are
used for the build operation.

Fixes #8118.
2017-12-12 10:41:50 -08:00
Peter Huene
9671ba1de0
Write UTF-8 BOM for solution files.
Currently the solution file written out by the `sln` command uses a
UTF-8 encoding without a BOM.  This causes problems when the solution
file contains non-ASCII code points because Visual Studio and MSBuild
will not use a UTF-8 encoding when reading the solution file if the
BOM is omitted.

This commit causes the BOM to always be written when writing the
solution files.

Fixes #8184.
2017-12-08 14:34:26 -08:00
Peter Huene
1ddf5c87c7
Add support for accepting directories to add and remove reference commands.
This commit adds support for specifying directories containing a single
project to both the `add reference` and `remove reference` commands.

Fixes issue #7343.
2017-12-07 17:23:31 -08:00
Peter Huene
bcf13b93cc
Add support for accepting directories to sln add and remove commands.
This commit adds support for specifying directories containing a single
project to both the `sln add` and `sln remove` commands.

Additionally, the output from `sln remove` has been improved to not
mention "project references".

Fixes issue #7343.
2017-12-07 17:22:29 -08:00
Livar
977a6ec321
Merge pull request #8006 from javiercn/javiercn/aspnetcore-httpscertificate
ASP.NET Core HTTPS development certificate support
2017-12-07 15:52:47 -08:00
Javier Calvarro Nelson
ad8f3da826 ASP.NET Core HTTPS development certificate support
* Added support for generating the HTTPS development certificate on the
CLI first run experience.
* On first run, an HTTPS certificate will be set up on the current user
local store.
* The environment variable DOTNET_GENERATE_ASPNET_CERTIFICATE can be used
to turn the feature off.
2017-12-07 14:31:00 -08:00
Nick Guerrera
9e6e737519
Merge pull request #8146 from v-zbsail/localization
LOC CHECKIN | dotnet/cli-master | 20171201
2017-12-07 14:29:15 -08:00
Livar Cunha
902904cdd6 Updating the msbuild version for Microsoft.Build.Runtime. 2017-12-07 13:13:43 -08:00
Livar Cunha
5a0e95897e Merge remote-tracking branch 'dotnet/release/15.5' into merges/release/15.5-to-master-20171206-080040
* dotnet/release/15.5: (26 commits)
  Fixing the reference to Microsoft.Build.Runtime from Cli.Utils.Tests. It was using the wrong package version property.
  One more old style version package name needed to change in redist.
  Fixing the versions of MSBuild and passing the right property to find roslyn files.
  Use "15.5.179" for the other Microsoft.Build.* packages
  Moving the 'MicrosoftBuildPackageVersion' forward.
  Fixing "RuntimeFrameworkVersion"
  Updating version naming convention.
  Fixed a typo...
  Nuget.config update to align with CLI:master - add comments in DependencyVersions.prop
  Even more package dependency re-names...
  Third pass clean-up of package names.
  Second pass clean-up of package names; resequencing download.
  Updating dependency version properties in alignment with sample orchestrated build file at: https://dotnetfeed.blob.core.windows.net/orchestrated/20171129-03/orchestration-metadata/PackageVersions.props
  The access key is already resolved: 'CoreSetupBlobAccessTokenParam'
  Fixed another typo...
  Fixed typo...
  The first pass will need the extra args [same as run-build.ps1].
  Dependency Uptake: download and import a package version props file.
  Accounting for MSRC builds with pre-set 'CoreSetupBlobRootUrl' and 'CoreSetupBlobAccessToke' properties.
  Changes per code review...
  ...

	TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.csproj
	TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.csproj
	TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.csproj
	TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.csproj
	TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.csproj
	TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.csproj
	TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.csproj
	TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.csproj
	TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
	TestAssets/TestProjects/MSBuildAppWithMultipleFrameworksAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
	TestAssets/TestProjects/XunitMulti/VSTestXunitDesktopAndNetCore.csproj
	build/BundledTemplates.props
	build/DependencyVersions.props
	build/NugetConfigFile.targets
	build/Test.targets
	build_projects/dotnet-cli-build/dotnet-cli-build.csproj
	dir.props
	run-build.sh
	src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj
	src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
	src/Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj
	src/dotnet/dotnet.csproj
	src/redist/redist.csproj
	src/tool_fsharp/tool_fsc.csproj
	test/ArgumentForwardingTests/ArgumentForwardingTests.csproj
	test/EndToEnd/EndToEnd.csproj
	test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj
	test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
	test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj
	test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj
	test/binding-redirects.Tests/binding-redirects.Tests.csproj
	test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj
	test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj
	test/dotnet-back-compat.Tests/dotnet-back-compat.Tests.csproj
	test/dotnet-help.Tests/dotnet-help.Tests.csproj
	test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj
	test/dotnet-new.Tests/dotnet-new.Tests.csproj
	test/dotnet-remove-package.Tests/dotnet-remove-package.Tests.csproj
	test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj
	test/dotnet-restore.Tests/dotnet-restore.Tests.csproj
	test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj
	test/dotnet.Tests/dotnet.Tests.csproj
2017-12-07 09:55:12 -08:00
Livar Cunha
8b1c2c5026 One more old style version package name needed to change in redist. 2017-12-06 22:44:51 -08:00
Livar Cunha
d280a054d4 Fixing the versions of MSBuild and passing the right property to find roslyn files. 2017-12-06 22:14:02 -08:00
John Beisner
d61eb5de92 Fixing "RuntimeFrameworkVersion" 2017-12-06 12:48:45 -08:00
John Beisner
e09cbe0043 Updating version naming convention. 2017-12-06 12:41:08 -08:00
Livar Cunha
cd86a4cac4 Merge remote-tracking branch 'dotnet/release/2.0.0' into merges/release/2.0.0-to-release/15.5-20171206-080037
* dotnet/release/2.0.0:
  Fixed a typo...
  Nuget.config update to align with CLI:master - add comments in DependencyVersions.prop
  Even more package dependency re-names...
  Third pass clean-up of package names.
  Second pass clean-up of package names; resequencing download.
  Updating dependency version properties in alignment with sample orchestrated build file at: https://dotnetfeed.blob.core.windows.net/orchestrated/20171129-03/orchestration-metadata/PackageVersions.props
  The access key is already resolved: 'CoreSetupBlobAccessTokenParam'
  Fixed another typo...
  Fixed typo...
  The first pass will need the extra args [same as run-build.ps1].
  Dependency Uptake: download and import a package version props file.

 Conflicts:
	build/DependencyVersions.props
	src/redist/redist.csproj
	src/tool_roslyn/tool_roslyn.csproj
2017-12-06 12:18:28 -08:00
William Lee
55f62d9d64
Add install tool command (#8132)
* compose all the parts

* Fix on obtain and shim maker for better end to end experience
  * Fix error when there is space in the middle of path of nuget config
  * Fix path in profile.d is the tmp home path during install
  * better handle of ~home
  * remove profile.d file in uninstall script
  * Fix test since it looks up current directory
  * folder structure inside nupkg to tools/TFM/RID/mytool.dll
  * Add check for config file existence
  * Rename name space to Microsoft.DotNet.ShellShim
  * Rename name space to Microsoft.DotNet.ToolPackage
2017-12-04 14:13:24 -08:00
Nick Guerrera
e0931a7b36 Update xlf 2017-12-04 13:37:55 -08:00
John Beisner
80f5d9f8c7 Even more package dependency re-names... 2017-12-04 13:20:37 -08:00
test
090a241a12 update according to feedback 2017-12-04 11:30:38 -08:00
John Beisner
3cb1cca44d Third pass clean-up of package names. 2017-12-04 09:44:51 -08:00
John Beisner
4d694d2c56 Second pass clean-up of package names; resequencing download. 2017-12-04 09:31:28 -08:00
John Beisner
f0abfb6b12 Updating dependency version properties in alignment with sample orchestrated build file at: https://dotnetfeed.blob.core.windows.net/orchestrated/20171129-03/orchestration-metadata/PackageVersions.props 2017-12-01 20:07:48 -08:00
Zbyněk Sailer
1853e24a9a LOC CHECKIN | dotnet/cli-master | 20171201 2017-12-01 09:30:43 +01:00
Eric Erhardt
9b756cfae5
Merge pull request #8131 from eerhardt/CrossGenSdk-master
Crossgen Microsoft.NET.Build.Extensions.Tasks.dll
2017-11-29 14:14:45 -06:00
Eric Erhardt
98e5c2c609 Crossgen Microsoft.NET.Build.Extensions.Tasks.dll 2017-11-29 12:25:12 -06:00
Livar
fe1b4dc6b9
Merge pull request #8100 from peterhuene/test-no-restore
Make --no-build imply --no-restore for run, pack, and test commands.
2017-11-29 09:50:11 -08:00
Eric Erhardt
479a3f2d71 Crossgen the Sdks directory. 2017-11-28 21:16:02 -06:00
Peter Huene
56d54a5a19 Remove extraneous colon from "additional arguments" header.
This commit removes an extraneous colon from the "additional arguments"
header for commands like `dotnet run`.
2017-11-28 16:01:18 -08:00
Peter Huene
4f7c76b4e4 Make --no-build imply --no-restore for run command.
This commit makes the `--no-build` option for the run command
automatically imply `--no-restore`.

Fixes issue #7472.
2017-11-28 16:01:18 -08:00
Peter Huene
ea85555a97 Add verbosity option to run command.
This commit adds the verbosity option to the run command.

This will be used in tests for visibility into what the run command is
doing.

The default verbosity is unaffected.

Fixes issue #7932.
2017-11-28 16:00:36 -08:00
Peter Huene
40b0e0fcec Make --no-build imply --no-restore for pack command.
This commit makes the `--no-build` option for the pack command
automatically imply `--no-restore`.

Fixes issue #7472.
2017-11-27 23:53:22 -08:00
Peter Huene
de10b22bcd Make --no-build imply --no-restore for test command.
This commit makes the `--no-build` option for the test command
automatically imply `--no-restore`.

Fixes issue #7472.
2017-11-27 23:06:48 -08:00
Livar
4debf0cd4b
Merge pull request #8091 from KevinRansom/UpdateFSharp
Update F# for VS2017.6
2017-11-27 14:31:15 -08:00
William Lee
cc80ed43e0
Tools shim maker and env path handling (#8085)
* Tools shim maker and env path handling

Includes component:

* Given executable, create shim (all three OSs)
* Add executable path to Env PATH during first run
* including manual instruction when there is no access
2017-11-27 10:45:43 -08:00
Kevin Ransom
da8b3d3224 Update F# for VS2017.6 2017-11-22 20:09:47 -08:00
Livar
1239b21477
Merge pull request #8082 from peterhuene/fix-sln-remove-dependencies
Remove project dependencies when removing a project from a solution.
2017-11-21 21:52:26 -08:00
William Lee
584d3f0502
Global tools package obtain (#8035)
Add ExeutablePackageObtainer

Given a tools package id, it can create a fake project and restore to correct folder

- DI, aka no circular dependency of commands
- Parser of config XML
- I try to create test nupkg at build time, so I can run test and debug
easily with VSCode. The code is in test csproj.
2017-11-21 20:10:06 -08:00
Peter Huene
6210dab09c Remove project dependencies when removing a project from a solution.
This commit fixes #6198.

When a project is removed from a solution using the `sln remove`
command, any projects in the solution with a project dependency (note:
this is different from a project reference) on the project should have
the project removed as a dependency.

The fix is to scan the projects in the solution and remove any
dependencies on the projects being removed.  If the dependencies section
is empty after the remove, we skip serialization of the section like
Visual Studio does.
2017-11-21 18:20:05 -08:00
Parallels
678cf13d93 Using OrdinalIgnoreCase to work around locale specific issues when trying to determine if a command line input is an argument. 2017-11-17 16:07:23 -08:00
Nick Guerrera
20d4d77586
Merge pull request #7998 from dotnet/release/15.5
Merge release/15.5 to master
2017-11-11 10:15:25 -08:00
Nick Guerrera
1fef760409 Merge remote-tracking branch 'upstream/release/2.0.0' into merges/release/2.0.0-to-release/15.5-20171107-080033 2017-11-07 11:34:13 -08:00
Nick Guerrera
4db91a217f
Merge pull request #7973 from dotnet/merges/release/15.5-to-master-20171107-080036
Merge release/15.5 to master
2017-11-07 06:31:45 -08:00
Nick Guerrera
a2d18edb91 Don't attempt to generate profiling symbols on Mac OS 2017-11-03 10:05:36 -07:00
Nick Guerrera
4f31e3db66 Improve symbols zip archive
We were publishing a -debug zip with sdk code and symbols, but it was captured before
publishing was finished and had incorrect code content. Trying to use it would blow up
due to incorrect runtimeconfig.json.

Replace it with a -symbols zip that contains only symbols and that can be overlayed
over the main zip. This is just like the -langpack zip that has satellite assemblies.

Also add an option to leave the PDBs in the same directory/packages as code:
/p:SeparateSymbolsArchive=false. Setting this on local builds facilitates
debugging and profiling by removing the need to adjust symbol paths or copy PDBs
around.
2017-11-02 16:08:06 -07:00
Nick Guerrera
607907c67d Retarget VSTest before publishing with backward compatible runtimes 2017-11-02 15:09:17 -07:00
Nick Guerrera
116da0277c Generate symbols for profiling when running crossgen 2017-11-01 17:17:22 -07:00
Nick Guerrera
a64e671a8b Don't crossgen satellite assemblies 2017-11-01 17:15:52 -07:00
Tomas Weinfurt
f825477855 add basic support for FreeBSD 2017-11-01 15:06:28 -07:00
William Li
9a31be84d6 Fix merge 2017-10-31 13:05:46 -07:00
Livar
2031c9cf33
Merge branch 'master' into merges/release/15.5-to-master-20171031-070033 2017-10-31 10:15:11 -07:00
Zbyněk Sailer
746f092c57 LOC CHECKIN | dotnet/cli - release/15.5 | 20171031 2017-10-31 17:16:46 +01:00
Nick Guerrera
cd489a356a
Merge pull request #7896 from nguerrera/one-process-restore
Use msbuild /restore instead of a separate process
2017-10-27 15:33:09 -07:00
William Lee
cef9a90ad1
Hashed telemetry and event name change (#7919) 2017-10-27 10:58:25 -07:00
Nick Guerrera
35b7ad2789 Use msbuild /restore instead of separate invocations where possible
It is not currently possible when there is a -f|--framework argument because
we cannot force a TargetFramework global property on to the restore evaluation.
Doing so completely breaks restore by applying the TargetFramework to all
projects transitively. The correct behavior is to restore for all frameworks,
then build/publish/etc for the given target framework. Achieving that still
requires two distinct msbuild invocations.

This also changes the verbosity of implicit restore from quiet to that
of the subsequent command (default=minimal). Similar to global properties,
we cannot specify a distinct console verbosity for the /restore portion of
the overall execution. For consistency, we apply the same verbosity change
to the case where we still use two separate msbuild invocations.

This also fixes an issue where the separate restore invocation's msbuild log
would be overwritten by the subsequent command execution. However, this remains
unfixed in the case where we still use two separate msbuild invocations.
2017-10-26 16:01:34 -07:00
Nick Guerrera
8fead788d7 Fix dotnet build /clp:NoSummary 2017-10-26 06:37:45 -07:00
Nick Guerrera
20b0b820a8 Remove unnecessary handling of verbosity in RestoreCommand
We were taking care to set the console verbosity to minimal, but
only when no verbosity argument is passed. However, the default
verbosity for all CLI msbuild commands is already minimal and so
we can just get out of the way.
2017-10-24 15:04:24 -07:00
Peter Huene
03f0c51292 Fix relative path handling on Windows.
On Windows, `PathUtility.GetRelativePath` was not properly handling
paths that differed by case in the drive reference (e.g. "C:\" vs.
"c:\").  The fix was to add the missing case-insensitive comparison
argument.

Replaced uses of `PathUtility.GetRelativePath` with
`Path.GetRelativePath` where possible (requires 2.0.0+).

Additionally, `PathUtility.RemoveExtraPathSeparators` was not handling
paths with drive references on Windows.  If the path contained a drive
reference, the separator between the drive reference and the first part
of the path was removed.  This is due to `Path.Combine` not handling
this case, so an explicit concatenation of the separator was added.

This commit resolves issue #7699.
2017-10-24 11:23:52 -07:00
Livar Cunha
4577a7839a Fixing the windows build. 2017-10-17 13:43:19 -07:00
Livar Cunha
7af7c91eb6 Adding redist to the list of changes. I missed it in the merge commit. 2017-10-16 15:44:15 -07:00
Livar Cunha
e1916cc4dc Merge remote-tracking branch 'dotnet/release/15.5' into merges/release/15.5-to-master-20171016-070031
* dotnet/release/15.5: (21 commits)
  Manually merging some changes that git merged wrong and deleted from the 15.5 branch.
  Separating the 'legacy' URL construction from the 'current' URL construction methods and logic.
  Use temporary path for fake deps.json in test
  Use same build number for roslyn and F# satellites
  Updating Roslyn satellites and SDK versions
  Insert NuGet Build 4.5.0-preview2-4529 into cli
  Update NuGet to 4529 (signed)
  MSBuild 15.5.154
  MSBuild 15.5.153
  removed commented out config I'd meant to remove
  added a way to specify the asp.net template versions
  Porting 'dotnet-install.sh' from CLI:master to CLI:release/2.0.0
  'NuGet.master.config' does not appear to be used.
  Fixed tests
  Update branch info to release/15.5
  Updating the websdk version to 2.0.0-rel-20171010-665
  Insert NuGet Build 4.5.0-preview1-4526 into cli
  Update DependencyVersions.props
  Updated version of TestPlatform to 15.5.0-preview-20170923-02
  MSBuild 15.4.8
  ...
2017-10-16 15:42:40 -07:00
Livar Cunha
27aa698710 Manually merging some changes that git merged wrong and deleted from the 15.5 branch. 2017-10-13 09:56:08 -07:00
Eric Erhardt
484714df1b Exclude Desktop framework assemblies in the "Extensions" folder from crossgen.
Work around MSBuild globbing bug in a Target by just excluding the one assembly.

See https://github.com/Microsoft/msbuild/issues/2631
2017-10-11 22:31:27 -05:00
Nick Guerrera
ddae0875cf Revert release/2.0.0 back to 1bcee43995
There were incorrect merges from release/15.5 to release/2.0.0 since then
2017-10-09 13:55:13 -07:00
Nick Guerrera
4a2d3fae16 Fix up roslyn satellite assembly handling to match new insertion mechanism
1. Publish satellites with a separate project and merge the resulting .deps.json
   into (csc|vbc).deps.json

2. Move the build tasks satellites to the correct location next to main assembly
   (one level higher than bincore\)
2017-10-03 16:00:56 -07:00
Ashley Hauck
97b027b232 Remove CscToolPath 2017-10-02 12:26:52 -07:00
khyperia
04c8a68539 Improve the way Roslyn is pulled in 2017-10-02 08:01:44 -07:00
Mike Lorbetske
b1fda1c367 Update XLFs 2017-09-29 12:59:44 -07:00
Mike Lorbetske
ccbc9f73f7 Update the string that is displayed when there's a typo in the profile name or it's not a valid JSON object 2017-09-29 10:43:01 -07:00
Livar
d624a96a1f Merge pull request #7663 from livarcocc/move_testframework_from_output
Removing Microsoft.DotNet.TestFramework from the product code
2017-09-15 15:31:31 -07:00
Livar
0a482954ae Merge pull request #7645 from livarcocc/remove_archiver_code
Removing Microsoft.DotNet.Archive from the CLI
2017-09-15 09:58:03 -07:00
Livar Cunha
3efd44f935 Removing Microsoft.DotNet.TestFramework from the product code and from the SDK deployment and moving the code to the test folder. 2017-09-15 09:49:19 -07:00
Livar Cunha
9cdb20b7a5 Removing Microsoft.DotNet.Archive from the CLI and instead depending on a nupkg. 2017-09-13 14:04:09 -07:00
William Li
9c1fa7c9d9 Do not move forward if there is parsing error 2017-09-12 16:54:51 -07:00
Daniel Plaisted
9b331673fe Merge upstream changes 2017-09-01 13:17:40 -07:00
Nick Guerrera
f4f5100af1 Merge pull request #7480 from mikkelbu/list-store-and-help-as-commands
Add store and help to SDK commands
2017-09-01 12:48:58 -07:00
Nick Guerrera
2f5f56973d Merge pull request #7557 from droyad/test-logger-help
Fixed name of the LogFileName
2017-08-30 08:02:27 -07:00