Commit graph

322 commits

Author SHA1 Message Date
Livar Cunha
b1fca8c4d2 Replacing the short form version of implicit msbuild parameters with longform ones. 2018-04-02 22:54:51 -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
William Lee
149bdfd0fa
Change command order for tools (#8862)
dotnet install tool -> dotnet tool install
dotnet uninstall tool -> dotnet tool uninstall
dotnet list tool -> dotnet tool list
dotnet update tool -> dotnet tool update
2018-03-21 19:12:32 -07: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
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
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
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
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
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
Jan Vorlicek
1abd2d9209 Enable Alpine 3.6 CLI build
This change enables CLI build for Alpine 3.6 and also adds CI job for
it. It is mostly based on changes that were necessary to
enable building of rhel.6 CLI
2017-12-13 12:10:44 +01:00
Livar Cunha
90e254b9ed More fixes that were missing from the merge. 2017-12-07 13:23:27 -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
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
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
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
Jan Vorlicek
90e217831b Enable RHEL 6 support
This change enables RHEL 6 support. It also adds a new command line option to the
run-build.sh script that enables passing in a folder containing a bootstrap CLI.
This helps in bringup of new target platforms.
2017-09-21 15:20:55 +00: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
Daniel Plaisted
97b7553e31 Rename output folder from out to bin 2017-09-01 16:43:02 -07:00
Daniel Plaisted
4c3b13e4a8 Use a shorter path for test working directories, get rid of Stage 0 project.json based CLI 2017-08-29 17:59:34 -07:00
Daniel Plaisted
dcb3a7ade7 Use shorter output paths to avoid max path issues on Windows
For example, "out/2" instead of "artifacts/stage2"
2017-08-29 06:55:43 -07:00
Daniel Plaisted
107252ebe7 Merge upstream changes 2017-08-28 11:09:19 -07:00
Nick Guerrera
497f6c5b0c Fix warnings in test projects 2017-08-25 20:17:58 -07:00
Daniel Plaisted
13da213183 Support new artifacts layout in tests and other build logic 2017-08-24 15:49:13 -07:00
Daniel Plaisted
ae0aa8ed24 Move dir.props to auto-imported Directory.Build.props
This is necessary for setting the intermediate output path to work correctly
2017-08-24 15:46:45 -07:00
Daniel Plaisted
60e5fabde2 Update tool tests to target netcoreapp2.1 2017-08-18 18:07:14 -07:00
John Doe
8fc8a03081 typo 2017-08-14 21:26:49 -07:00
Livar
58c580dbcc Merge pull request #7201 from dotnet/merges/release/2.0.0-to-master-20170720-070024
Merge release/2.0.0 to master
2017-07-20 11:53:12 -07:00
Nick Guerrera
a1c423c0f6 Honor UI language override in test runs
Also fix some incorrect unlocalized test expectations that slipped in.
2017-07-18 22:03:31 -07:00
Livar Cunha
5cab325335 Merge remote-tracking branch 'dotnet/release/2.0.0' into merges/release/2.0.0-to-master-20170621-070039
* dotnet/release/2.0.0: (35 commits)
  Fixing an issue in the RepoDirectoriesProvider where it assumed that the only directory under SDK was the SDK directories. This is no longer true now that we moved the NuGet fallback folder there.
  Simple clean up to the store tests
  Updating xlf files for the Configurer.
  Removing NuGetConfig from the first run experience and replacing the sentinel with the FirstUseNoticeSentinel when needed.
  Moving the expanding fallback folder to the dotnet folder hive. The folder will be expanded at sdk/NuGetFallbackFolder.
  Fixing CRLF issue.
  Updating xlf and fixing line ending problems with one file.
  Add rhel and Debian download link
  Fix race in telemetry msbuild arg tests
  Avoid repeating the first-run message if lzma archive is missing
  Use fluent helper for line-end normalization
  Update CoreSetup to preview3-25419-01
  Updating Roslyn to 2.3.0-beta3-61816-04
  Update CoreSetup to preview3-25418-01
  insert new tpv2 which fixes following issue https://github.com/Microsoft/vstest/issues/632 https://github.com/Microsoft/vstest/issues/844 https://github.com/Microsoft/vstest/issues/847 https://github.com/Microsoft/vstest/issues/840 https://github.com/Microsoft/vstest/issues/843
  Windows installer refresh
  Update SDK to 1.1.0-alpha-20170615-3
  Updating NuGet to 4.3.0-preview3-4168
  MSBuild 15.3.388
  Make dotnet-sln-add.Tests pass on localized setup
  ...
2017-06-21 08:51:19 -07:00
Parallels
235482b8da Fixing an issue in the RepoDirectoriesProvider where it assumed that the only directory under SDK was the SDK directories. This is no longer true now that we moved the NuGet fallback folder there. 2017-06-20 22:05:44 -07:00
Livar Cunha
529d7caa79 Moving the expanding fallback folder to the dotnet folder hive. The folder will be expanded at sdk/NuGetFallbackFolder. 2017-06-20 10:59:23 -07:00
Ashley Hauck
ca848eddd3 Detect git worktrees correctly
Git worktrees are represented as a file named .git, with contents that
look like:

    gitdir: E:/cli/.git/worktrees/cli2
2017-06-19 10:57:38 -07:00
Nick Guerrera
11967b7d9c Merge branch 'release/2.0.0' into loc 2017-06-16 18:20:44 -07:00
Livar Cunha
0a4a0a082c Updating the SDK. Mostly, had to change PackageTargetFallback to AssetTargetFallback. 2017-06-14 00:27:26 -07:00
Nick Guerrera
419562ba95 Make dotnet-help.Tests pass on localized setup 2017-06-13 19:24:30 -07:00
Nick Guerrera
981e3ae19c Made dotnet-(vs)test.Tests pass on localized setup 2017-06-12 18:32:31 -07:00
Livar Cunha
f4bb13acaa Merge branch 'rel/1.1.0' into merge_rel_110
* rel/1.1.0: (41 commits)
  Updating the Sdk to one that includes the error surfacing work.
  Update NuGet to 4.3.0-preview2-4082
  Update NuGet to 4.3.0-preview1-4081 and SDK to corresponding 1.1.0 based version
  Updating MSBuild to 15.3.0-preview-000246-05 to match VS.
  Updating the global.json creation to use the IFile interface and adding a unit test to cover it.
  Making restore use a config file so that it does not use fallback folders that may exist in the machine.
  Dropping a global.json when running the first run experience with a version that matches the version of the CLI being used in the command that triggered the first run.
  Updating the websdk version for 1.0
  Trying to fix the opensuse42 test failure, where we tried to invoke a tool that target 1.0.4 where the 1.0 runtime is not available.
  Pinning the stage0 to the last build out of rel/1.0.1 and adding a project to download 1.0 dependencies for test assets.
  Updating the branding to rel/1.1.0
  Dummy commit.
  Adding the access token to the lzma url.
  Dummy change to force a build.
  Reverting the msbuild version to the release version.
  Adding the web feed to nuget.config, as some packages failed to mirror and we need a build ASAP.
  Updating the msbuild, SDK and Web SDK versions.
  Dummy commit to kick off the build.
  the FSharp.NET.Sdk version `-bundled` contains only the Sdk dir
  bump f# sdk package version
  ...
2017-06-01 09:43:31 -07:00
Livar Cunha
8b07dfa149 Adding the runtime identifier option to dotnet clean. 2017-05-25 12:29:51 -07:00
Livar Cunha
f67a72d9c4 Making restore use a config file so that it does not use fallback folders that may exist in the machine. 2017-05-22 09:42:40 -07:00
Daniel Plaisted
cc9e942ede Apply code review feedback 2017-04-27 09:30:40 -07:00
Daniel Plaisted
01d3895b24 Add tests for behavior of tools that target previous major version of shared framework 2017-04-27 09:30:39 -07:00
Eric Erhardt
bfab25c259 Rename publish --target to --manifest.
Fix #6244
2017-04-14 16:08:32 -05:00
William Li
a6d3012da1 Replace dotnet help parser with CliCommandLineParser
CliCommandLineParserVersion 138 cannot use help as command and --help as
opinion at the same timem, update to 142
2017-04-10 22:11:14 -07:00
Eric Erhardt
99f9786ac7 Merge pull request #6270 from eerhardt/CacheRename
Rename `cache` to `store`.
2017-04-10 12:15:25 -05:00
Livar Cunha
c8b042fd1b Fixing the build. 2017-04-08 00:31:27 -07:00
Livar Cunha
e286c65d25 Removing Additional Framework entirely and renaming LegacyRuntime to something more appropriate: BackwardsCompatibleRuntimes. Also, turning off some tests that I forgot to turn off for linux-x64. 2017-04-08 00:31:27 -07:00
Livar Cunha
772e838ff8 Removing the additional shared framework from the official stage2 build of the CLI. Instead, I also create a stage2 build with the legacy runtime so that we can continue to run tests tthat depend on it, but most importantly, we will be able to run backwards compatibility tests using it. 2017-04-08 00:31:27 -07:00
Eric Erhardt
95ff3f9bf8 Fix tests for cache => store rename. 2017-04-07 15:51:37 -05:00
Eric Erhardt
b00384f497 Merge pull request #6234 from eerhardt/SelfContained
Add --self-contained to publish.
2017-04-04 12:03:09 -05:00
Eric Erhardt
ab15200500 Add --self-contained to publish.
This flows to the $(SelfContained) property added in https://github.com/dotnet/sdk/pull/1053
2017-04-03 18:17:08 -05:00