Commit graph

369 commits

Author SHA1 Message Date
William Li
5e444258cb
Set DOTNET_ROOT in tests (#5584) 2019-11-08 13:58:10 -08:00
Peter Huene
33815f75c9
Remove Windows Desktop project templates for non-Windows.
This commit removes the Windows Desktop project templates for non-Windows
builds of the .NET Core SDK.

Fixes dotnet/cli#11425.
2019-05-29 19:06:11 -07:00
Livar Cunha
3ccbd61dc0 Fixing a build failure due to the merge from master. 2018-12-26 09:57:33 -08:00
Livar Cunha
3ce8eaefaa Merge branch 'master' into official_builds
* master:
  Adding a Wpf and Winforms templates registry key (#218)
  Update coresetup to preview-27218-01 (#216)
  Update WindowsDesktop Framework (#215)
  Update coresetup to preview-27217-02 (#214)
  Update coresetup to preview-27217-01
  Update coresetup to preview-27216-02 (#211)
  make GivenDotnetUsesDotnetTools test optional based on AspNetCore availability (#207)
  Update DependencyVersions.props
  Include the WindowsDesktop sharedframework in install 'Finish' page. (#208)
  Update readme; core-sdk:master (#209)
  Update WindowsDesktop
  Update toolset
  Update coresetup to preview-27214-02
  change debug to Debug to match managed part
  add entry for freebsd to badge processing
  update stage0 sdk to 3.0 preview
  Update coresetup to preview-27206-02 (#202)
  initial support for freebsd
2018-12-25 19:08:40 -08:00
Tomas Weinfurt
e1e6c25c1b make GivenDotnetUsesDotnetTools test optional based on AspNetCore availability (#207) 2018-12-14 20:08:38 -08:00
Daniel Plaisted
f974e2bbac Merge upstream changes 2018-12-05 18:08:40 -08:00
Livar Cunha
829bc78ccf Updating the CLi.Utils version that we use in core-sdk to one with a new muxer class that has the proper AppContext handling. 2018-12-05 15:48:17 -08:00
Daniel Plaisted
3df2eb5c8e Fix using wrong SDK when restoring
DotnetCommand should be used so that MSBuildSDKsPath gets unset
2018-11-29 23:43:09 -08:00
Daniel Plaisted
7d461295be Check bitness of dotnet under test instead of test host process 2018-11-29 23:38:49 -08:00
Daniel Plaisted
6fd4a5afad Refactor tests, add coverage for building templates 2018-11-20 10:53:39 -08:00
Daniel Plaisted
b7e4f06bed Use built version of redist instead of stage 0 for running tests 2018-11-12 11:31:10 -08:00
Daniel Plaisted
e13e5fca99 Merge upstream changes 2018-11-09 15:22:10 -08:00
Daniel Plaisted
cc5a67d2e5 Refactor / fix implicit version tests 2018-11-08 12:11:30 -08:00
Daniel Plaisted
ce468ec79e Move layout folder 2018-10-29 12:26:31 -07:00
Daniel Plaisted
96c79f9661 Enable tests 2018-10-29 11:26:53 -07:00
Daniel Plaisted
914f465b30 Get tests and skeleton build tasks building 2018-10-22 19:59:58 -07:00
Daniel Plaisted
bfcc6fa2a0 Merge CLI 2.2.1xx changes 2018-10-08 18:59:34 -07:00
Abood AbuHashem
7d2f3151e8
Implement the dotnet list package command.
This commit implements the `dotnet list package` command.
2018-09-20 10:26:01 -07:00
William Li
f3c7f5ed78 Merge remote-tracking branch 'oldcli/release/2.2.1xx' into merge-release/2.2.1xx 2018-09-09 20:42:17 -07:00
Livar Cunha
7bb693bff5 We have a few tests that write their own NuGet.Config file to use during restore. Those tests need access to the ExternalRestoreSources value to be added to this NuGet config so that they can restore properly. This change writes a file in the test/artifacts folder containing the value of ExternalRestoreSources value. The tests can then use it to write that to their NuGet.Config. There is a failure in ProdCon that this addresses. 2018-08-28 17:16:58 -07:00
Nick Guerrera
ceffacfef8 Merge branch 'release/2.2.1xx' into merges/release/2.1.4xx-to-release/2.2.1xx 2018-07-17 18:17:04 -07:00
Peter Huene
d9e8947ff4
Revert implementation of the --mode option for the publish command.
This commit reverts the implementation of the `--mode` option for the `dotnet
publish` command.  A bug in the apphost prevents this feature from working
properly in some cases and there currently is not a mechanism to service it
with this feature.

The team has decided to move this feature to 2.2.1xx for the .NET Core SDK.

Fixes dotnet/sdk#2380.
2018-07-09 12:46:13 -07:00
Nick Guerrera
1326c79a5d Merge branch 'release/2.2.1xx' into merges/release/2.1.4xx-to-release/2.2.1xx 2018-06-29 15:25:24 -07:00
Livar Cunha
e2b679c4bb Merge branch 'master' of /Users/livarcocc/Documents/git/cli into merge_master_cli
* 'master' of /Users/livarcocc/Documents/git/cli: (1063 commits)
  Updating signing project to use new intermediate directory (int).
  Update runtimeconfig.json doc for 2.1 (#9382)
  Shortening the path to the intermediate folder by renaming it to int.
  fix typo (#9364)
  Updating asp.net to 2.2.0 as well.
  Updating the build and tests to work with the 2.2.0 runtime.
  Simplified combining dictionaries in Telemetry
  Fixing 'Channel' and 'BranchName': "release/2.1.4xx" to "master" (#9362)
  Fix extraction of folders (#9335)
  Update Sha256Hasher.cs
  Fix relative path tool path (#9330)
  Insert updated SDK from 2.1.4xx branch
  MSBuild 15.8.60
  Fix crash when user home directory cannot be determined.
  Make `CliFolderPathCalculator` a static class.
  Don't add the ReleaseSuffix to the branding on the CLI when DropSuffix is set to true.
  Add retry when Directory.Move (#9313)
  Override new SdkResult public properties
  Add reference to Microsoft.Build.NuGetSdkResolver
  Disable crossgen for MSBuild inline-task refs
  ...
2018-06-25 22:38:01 -07:00
Peter Huene
bc96902c61
Implement mode option for dotnet publish.
This commit implements a `mode` option that can control how an application is
published with the `dotnet publish` command.

There are three supported modes:

* self-contained: publishes a self-contained application (same as
--self-contained).
* fx-dependent: publishes a framework-dependent application (with an
application host when a runtime is specified).
* fx-dependent-no-exe: publishes a framework-dependent application without an
application host.

The default when publishing without a runtime specified is
`fx-dependent-no-exe`.

The default when publishing with a runtime specified is `self-contained`.

`fx-dependent` requires netcoreapp2.1 or later when a runtime is specified.

The `--self-contained` option is still supported, but is now hidden so that
users will be encouraged to move to the `--mode` option.

Fixes #6237.
2018-06-11 15:43:55 -07:00
William Li
2594a6d7ec
Always store absolute full path in directory and file path (#9363)
There is no need to store relative path today. But some part of the system does not accept relative path and there is no indication if it is storing full path or not. This is the root cause of https://github.com/dotnet/cli/issues/9319

“someplace” means different full path for Path class on unix and Windows. And the mock file system uses real Path class. Change tests' setup to use essentially “TEMPATH/someplace” instead of  “someplace”
2018-06-06 11:22:19 -07:00
Livar Cunha
2f0f270a73 Updating the build and tests to work with the 2.2.0 runtime. 2018-05-31 19:14:24 -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
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
Wes Haggard
65d5730631 Replace alpine with linux-musl builds
We still build linux-musl on the alpine OS but we no longer
produce a alpine installer/tar file instead we just have the
linux-musl version.
2018-04-20 13:23:00 -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
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
7cb7535bae
Merge branch 'master' into merges/release/2.1.3xx-to-master 2018-04-06 09:05:57 -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
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 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
Peter Huene
abcdeba455
Merge pull request #8950 from peterhuene/server-command
Implement `buildserver shutdown` command.
2018-03-30 17:19:29 -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
a9742686ed Infer test packages path in tests if TEST_PACKAGES environment variable isn't set 2018-03-30 14:39:12 -07:00
Livar Cunha
6600612b9e Adding new docker files for opensuse.42.3, ubuntu.18.04 and fedora.27 and removing the project.json CLI from the build. It was not being used anymore. 2018-03-27 10:24:10 -07:00
Jeff Kluge
8d7009cb83 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-03-22 16:11:51 -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