Commit graph

1065 commits

Author SHA1 Message Date
Piotr Puszkiewicz
d6cab4af58 use Sdks attribute in dotnet new templates (#4916)
* Move dotnet-new templates to Sdk attribute

* Update to MSBuild 15.1.0-preview-000454-01

To pick up a fix for Microsoft/msbuild#1431.

* Fix template newlines

* Fix casing on Microsoft.Net.Sdk

* Move migration test csproj's to Sdk attribute

* Disable parallel sdk restore

Each SDK restore operation will try to manipulate the same assets.json file since the dependency name&version are injected into a common csproj file. This can cause runtime failures when two NuGets try to restore the project at once.

* Make casing of SDK 'NET' and not 'Net'

* Remove redundatn imports

* Fix test string

* Additional race

* Replacing the SDK with the Web.Sdk when it is a Web project.

* Fixing the test by writting the csproj before running the migration rule.
2016-12-04 22:31:58 -08:00
Scott Carlton
dc3d88c587 Localize changes for dotnet-remove (#4900)
* Rename centralized LocalizableStrings file

* Added RemoveDefinition

* Rebase

* rebase, remove localizablestrings for help

* loc for help command

* remove localizablestrings

* Localization changes for dotnet-remove

* Slight refactoring
2016-12-04 21:33:43 -08:00
Piotr Puszkiewicz
caad95491a Fix output race (#4911)
* Fix output race

TestCommand starts the test process before wiring up stderr & stdout. This change delays process start until after the wireup is finished so that the test process cannot shut down before we have wired up output redirection.

* Bypass stream forwarder when it fails to attach to a process

CLI has tests failing errenously when, due to timing issues, the StreamForwarders fail to attach to a process because it managed to exit before attachment occurs. 

We tried attaching the forwarders prior to Process Start but this proved impossible because the OUT and ERR streams are not available to attach before the process starts. 

This exposes a fundamental flaw in our output redirection mechanisms. We should probably move to using https://msdn.microsoft.com/en-us/library/system.diagnostics.process.outputdatareceived.aspx or a similar mechanism. However, I don't know that @brthor hadn't considered and discarded this approach.

For the time being I am attempting to make tests more deterministic by capturing the associated exceptions and moving to a different mechanism when StreamForwarders are not available.

Opened https://github.com/dotnet/cli/issues/4913 to track the broader issue.

* File.Copy is not atomic...
2016-12-04 11:54:29 -08:00
Livar
ac4f903731 Merge pull request #4897 from livarcocc/no_publish_iis
Skipping dotnet publish-iis when migrating scripts as it is now part of the web.sdk
2016-12-04 09:36:52 -08:00
Piotr Puszkiewicz
d2d0353e60 Include Microsoft.Net.Sdk in CLI layout (#4895)
* WiP

* Update test

* Working version of Net SDK

* Latest SDK doesn't work as packageref

* DCR + PR

* Harden CLI tests against #4884
2016-12-03 14:19:54 -08:00
Rohit Agrawal
4311926366 update nuget to 4.0.0-rc2 (dev build 2067) (#4904) 2016-12-02 19:19:54 -08:00
Livar Cunha
7583bcb2fd Skipping dotnet publish-iis when migrating scripts as it is now part of the web.sdk 2016-12-02 10:41:25 -08:00
Piotr Puszkiewicz
da82bdb05d Centralize Microsoft.Net.SDK Version (#4890)
* Centralize Microsoft.Net.Sdk package version

Note: Templates were omitted as their version needs to be static.

* Unifying additional missmatched versions

* prefercliruntime

whitespace threw off ReplaceAll

* Additional missed globs

* Revert SDK version for performance tests

* PR Feedback

* Roll back VSTestXunitDesktopAndNetCore.csproj SDK version
2016-12-02 09:34:03 -08:00
Piotr Puszkiewicz
f18967e39a Update CLI's MSBuild Version to 15.1.0-preview-000451-02 (#4889)
* Centralize definition of MSBuild Version in CLI

* MSBuild --> 15.1.0-preview-000451-02
2016-12-01 20:10:42 -08:00
Piotr Puszkiewicz
ecfd970045 Extra strings for localization (#4880)
* Update strings for localization

* re-align strings
2016-12-01 16:01:29 -08:00
Piotr Puszkiewicz
e82ed6799d Enable overriding MSBuildSDKsPath with env var (#4885) 2016-12-01 14:45:55 -08:00
Martin Andreas Ullrich
4af30914c9 Show meaningful error when failing to migrate invalid scripts (#4842) 2016-11-30 20:36:13 -08:00
Krzysztof Wicher
7312e1cb3a Merge pull request #4868 from krwq/i4746-dotnet-remove
Add dotnet-remove-p2p
2016-11-30 16:14:47 -08:00
Justin Goshi
8afb8ebf31 sln reader/writer (#4870)
* Snap of sln reader/writer from https://github.com/mono/monodevelop

* Remove unnecessary code

* Create a new test asset with an sln file because adding an sln to an existing one broke other tests

* Remove commented out line

* Removing unneeded PropertyGroup per PR comments

* Update the license

* Fixing the license
2016-11-30 14:08:28 -10:00
Krzysztof Wicher
0349aed9a7 complete tests 2016-11-30 12:07:13 -08:00
Krzysztof Wicher
23b46490a3 add some test cases stubs 2016-11-29 16:14:05 -08:00
Krzysztof Wicher
65f699f1cc Prepare test project for dotnet-remove-p2p 2016-11-29 15:47:30 -08:00
Krzysztof Wicher
f49e29711f Merge pull request #4758 from krwq/i4521
Fix 4521: Add dotnet-add-p2p
2016-11-28 13:51:08 -08:00
Piotr Puszkiewicz
b47d728516 Hide restore output of first-run experience (#4740)
* Fix 4066

* Merge Conflict

* Move fix to the DotNetCommandFactory

* More normalization

The `\r\n` issue is oddly non-deterministic. This change did not affect the message endings and yet CI started failing. Normalizing both string should have the desired result...
2016-11-28 00:46:26 -08:00
Enrico Sada
7b0117ac85 Update fsharp templates for preview4 with latest msbuild style (#4836)
* update web template

* add test build of fsharp/web template

* align fsharp/xunittest template

* add test for all template projects

* align fsharp/console template to #4821

* align fsharp/lib template to #4821

* align fsharp/mstest template to #4821

* align fsharp/xunittest template to #4821

* fix shortened test directory path (was same for c# test)

* try fix ci failure
2016-11-28 00:45:38 -08:00
Enrico Sada
a0060ac321 Fix for current ci fails (#4838)
* test ci

* try fix ci failure
2016-11-28 00:45:17 -08:00
Livar
325b849858 Merge pull request #4814 from livarcocc/invoke_tool_cli_fx
Making Project Tools use the CLI shared runtime
2016-11-25 16:12:38 -08:00
Faizan2304
eb8e0cfa40 Bug fixes (#4810)
* Bug fixes

* Nitpick

* -Fixed failed tests
-Added test to cover trx logger scenario.

* Fix for issue https://github.com/Microsoft/vstest/issues/241

* Fix for failed test. We have taken fix where dotnet test will return nonzero if test fails. In multi TFM scenario if test fails it termates the whole process as dotnet test is returning 1. As a fix of this we should continue if some test fails for next TFM

* Bump Microsoft.Testplatform.CLI and Microsoft.NET.Test.Sdk version
2016-11-24 00:48:54 -08:00
Piotr Puszkiewicz
3a3ab7e0b0 MSBuildSDKsPath (#4824)
* Tests in place

* Implementation
2016-11-23 23:54:44 -08:00
Livar
9862fbb4d7 Checking that the lock file exists before trying to acquire the lock for it. (#4797)
* Checking that the lock file exists before trying to acquire a lock for it, which takes up to 30 seconds.

* Adding a test for failing when reading the lock file and it does not exists.
2016-11-23 22:59:54 -08:00
Enrico Sada
2cf0675270 add F# templates to dotnet new (#4789)
* add F# templates to `dotnet new`

* add dotnet new tests

* avoid conflict with cs test dir

* fix test
2016-11-23 22:57:54 -08:00
Krzysztof Wicher
8b565616a0 Strings->LocalizableStrings, Extensions->ProjectRootElementExtensions, fix long lines, remove empty line 2016-11-23 15:35:48 -08:00
Livar
923320b66b Merge pull request #4829 from jeffkl/4753
Move project.lock.json during migration
2016-11-23 14:02:35 -08:00
Krzysztof Wicher
93c30898e4 fix non-windows failures 2016-11-23 14:02:19 -08:00
Krzysztof Wicher
2bd020d015 attempt to fix broken linux build 2016-11-23 13:46:44 -08:00
Livar Cunha
9e9d7f1d52 Turns out I had missed one code review comment. Fixing the string validation for one of the tests. 2016-11-23 12:56:37 -08:00
Krzysztof Wicher
b22276a4a6 add fake msbuild.exe to workaround the msbuild issue 2016-11-23 11:03:39 -08:00
Livar Cunha
d5f7efbe86 Addressing code review comments. 2016-11-23 10:19:00 -08:00
Jeff Kluge
2205a8577c Move project.lock.json during migration
Closes #4753
2016-11-23 09:46:36 -08:00
Livar Cunha
dc87680337 Making Project Tools use the CLI shared runtime if they have the prefercliruntime in the root of their package. This allows for project tools to not have to change when a new runtime comes up as long as they are compatible with the runtime that the CLI is using. 2016-11-23 09:25:47 -08:00
Livar
da0e7b744b Revert "update NuGet to 4.0.0-rc2 build (#4802)" (#4818)
This reverts commit 0bafbd061e.
2016-11-23 09:01:32 -08:00
Krzysztof Wicher
b8b7d98256 last touches 2016-11-22 14:46:33 -08:00
Krzysztof Wicher
58fe57e315 Lock on spec - all tests passing on Windows 2016-11-22 14:46:32 -08:00
Krzysztof Wicher
19dde128ba detect non-existing references and tiny refactor of tests 2016-11-22 14:46:32 -08:00
Krzysztof Wicher
8e5ffaf176 fix some of the stuff in the feedback 2016-11-22 14:46:32 -08:00
Krzysztof Wicher
5d1deeeea1 test project - almost finished - not all review changes included 2016-11-22 14:46:32 -08:00
Rob Relyea
0bafbd061e update NuGet to 4.0.0-rc2 build (#4802) 2016-11-22 00:51:12 -08:00
Livar
09f62cdd7e Merge pull request #4741 from piotrpMSFT/piotrpMSFT/issues/4739-xprojUser
add *.xproj.user to backup file types
2016-11-16 09:30:17 -08:00
Livar
9847196c95 Merge pull request #4737 from livarcocc/migrate_authors
Adding Authors migration.
2016-11-16 09:29:13 -08:00
Livar
11f871b715 Merge pull request #4733 from livarcocc/migrate_adds_rids_for_desktop
Emitting runtime identifiers if the source project has any full framework TFMs
2016-11-16 09:29:01 -08:00
Piotr Puszkiewicz
d39ee4a463 add *.xproj.user to backup file types 2016-11-16 01:10:55 -08:00
Justin Goshi
be61afcfa5 Remove unused project.json and .xproj files (#4735)
* Remove unused project.json and .xproj files

* Update the test msi script
2016-11-15 16:12:19 -10:00
Livar Cunha
c364f27346 Adding Authors migration. 2016-11-15 16:36:04 -08:00
Livar Cunha
9513428013 Emitting runtime identifiers if the source project has any full framework TFMs. 2016-11-15 14:07:35 -08:00
Krzysztof Wicher
7a3bc96f75 Fix 4508: CLI verbs that call into msbuild should control their output (#4719)
* Fix 4508: CLI verbs that call into msbuild should control their output

* fix failing tests + tiny bufix in dotnet test
2016-11-15 11:56:39 -08:00