Commit graph

1931 commits

Author SHA1 Message Date
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
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
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
60e798598d Add test cases per PR feedback 2018-04-05 17:58:38 -07:00
Livar
4c948fefcc
Merge branch 'master' into merges/release/2.1.3xx-to-master 2018-04-05 09:09: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
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 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
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
Daniel Plaisted
8b1b153651 Add latest patch versions to BundledVersions.props, and tests to make sure that they are up to date 2018-03-30 11:32:36 -07:00
William Li
f949fb884e Show version guide only when restore fails 2018-03-29 17:29:05 -07:00
Maira Wenzel
c551b88048 added in use info to the --version option 2018-03-26 18:16:56 -07:00
William Lee
76d4824c39
Add xml setting version warning (#8860) 2018-03-26 12:50:09 -07:00
Livar
14098449e5
Merge pull request #8863 from mlorbetske/dev/mlorbe/UpdatePrecedenceOfAspNetUrlsForLaunchSettings
Update launch settings for ApplicationUrl handling
2018-03-23 13:06:47 -07:00
Mike Lorbetske
eec79d83fc Try shorter test names 2018-03-23 10:30:47 -07:00
Peter Huene
e61a7a3570
Merge pull request #8796 from peterhuene/project-type-guid
Fix project type GUIDs when adding projects to solution files.
2018-03-22 22:27:01 -07:00
Peter Huene
e30fe29aab
Fix project type GUIDs when adding projects to solution files.
This commit ensures the correct property (`ProjectTypeGuids`) is respected when
adding a project to a solution file.

Additionally, we now error if a project type GUID cannot be determined rather
than incorrectly mapping to the C# project type.

Enabled previously disabled tests that were waiting on upstream changes from
MSBuild and F#.

Fixes #5131.
Fixes #7742.
2018-03-22 21:32:39 -07:00
Mike Lorbetske
c1fff9649a Update launch settings for ApplicationUrl handling 2018-03-21 21:19:24 -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
Peter Huene
60d71618be
Implement the --tool-path option for the list tool command.
This commit implements the missing `--tool-path` option for the list tool
command.  This enables the command to list locally installed tools.

Fixes #8803.
2018-03-20 16:54:50 -07:00
Peter Huene
4f8ac7dce5
Ensure tool package store root is a full path.
This commit fixes the tool package store such that it stores a full path
instead of, potentially, a relative path.

This prevents a relative path from inadvertently being passed to NuGet
during the restore and causing it to restore relative to the temp project
directory.

Fixes #8829.
2018-03-20 16:54:34 -07:00
Peter Huene
3ce2d4da0f
Fix list tool command tests to be localizable.
Currently the list tool command tests, while localizing the column headers,
didn't properly take into account the fact that localized builds might produce
strings longer than the English versions of the column header strings.  This
results in a mismatch of the actual from the expected due to additional column
padding.

The fix is to stop using a static expected table and do a simple calculation of
the expected table based on the length of the localized strings.

Fixes issue related to PR #8799.
2018-03-20 16:53:49 -07:00
Nate McMaster
ba8e18dac7
Fix #4139 - escape quoted strings for process start 2018-03-20 16:53:42 -07:00
William Lee
9cc2b7cd2f
Change --source to --source-feed and make it additional (#8833)
Other than change source to source-feed and make it additional instead of exclusive. I changed source to be multiple. Because restore support multiple source https://github.com/Microsoft/dotnet/issues/361

As for mock. The offline feed and source feed is considered the same, so remove the category of “source”. I renamed source to “AdditionalFeed” because that is more accurate on implementation level.

Note:
NuGet feed don’t have order. Whichever responses the fastest, is the first.
No change on restore.

scripts/cli-test-env.sh change is due to mac 10.13 is finally added to RID graph. And it is “considered” one of the CLI supported RID
2018-03-19 22:22:45 -07:00
William Lee
3f09a889d9
Update tool (#8794) 2018-03-15 19:45:11 -07:00
Livar
6d9177f143
Merge pull request #8770 from livarcocc/re_enable_template_test
Re-activate templating test.
2018-03-13 18:11:23 -07:00
Livar
782354acf9
Removing left over comment. 2018-03-13 10:19:44 -07:00
Livar Cunha
a6db27bdd7 Re-activating the net461 tests for the Resolver in the hopes that the failures fixed themselves. 2018-03-12 15:06:25 -07:00
Livar Cunha
b0e57e1712 Re-activate templating test. 2018-03-12 13:16:45 -07:00
William Lee
3861fc1700
Convert to graceful exception (#8751) 2018-03-08 15:49:16 -08:00
Peter Huene
4c2b07023a
Merge pull request #8734 from peterhuene/tool-install-message-cleanup
Remove temp project path from tool install warnings and errors.
2018-03-08 15:05:51 -08:00
Peter Huene
52478e8947
Stop modifying current working directory from test.
This commit fixes the ToolPackageInstaller tests so that they no longer modify
the current working directory.  The directory being set is now being properly
passed in as an argument to override the default of the current working
directory.

Additionally, this commit also changes the package root to a temp location
rather than based off of the current working directory.
2018-03-08 13:46:01 -08:00
Livar
a71450a305
Merge pull request #8736 from livarcocc/improve_info
Updating the dotnet --info message.
2018-03-07 21:27:58 -08:00
Livar Cunha
9da134cad1 Localizing portions of dotnet --info. 2018-03-07 12:39:46 -08:00
Livar Cunha
b8685bebb9 Updating the dotnet --info message. 2018-03-07 09:40:06 -08:00
Peter Huene
e2d9c2f892
Remove temp project path from tool install warnings and errors.
This commit attempts to filter the diagnostic messages emitted during tool
installation.  The diagnostic messages may be prefixed with the temporary
project; since this is an implementation detail that only causes confusion and
clutter in the diagnostic messages, the prefix is removed if present.

Fixes #8707.
2018-03-06 17:12:32 -08:00
William Lee
0598e6cb70
tool-path option -- "Session tool" (#8716)
* Change to escape string via XML

* tool-path option -- "Session tool"

From the beginning design, shim and packageInstaller take package location from constructor and don't have assumption anymore. From previous discussion, tool-path will simply change global location to the one user want, and everything else is the same.

However, this "override" need to happen during the call, that means InstallToolCommand will create different shim and packageInstaller object according to the tool-path during the call instead of constructor DI.

* global package location change

* block of leading dot as command name

* Localization of tool-path option
2018-03-06 15:58:05 -08:00
Livar
c83cafcf33
Merge pull request #8713 from livarcocc/clean_verbosity
Make the default verbosity for dotnet clean `normal`. This way we can…
2018-03-06 10:36:23 -08:00
Peter Huene
0cdc4b8f19
Merge pull request #8691 from peterhuene/list-command
Implement the `list tool` command.
2018-03-05 16:52:40 -08:00