Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New templated probing path is breaking dotnet test #847

Closed
eerhardt opened this issue Jun 8, 2017 · 0 comments
Closed

New templated probing path is breaking dotnet test #847

eerhardt opened this issue Jun 8, 2017 · 0 comments

Comments

@eerhardt
Copy link
Member

eerhardt commented Jun 8, 2017

Description

With the latest .NET Core SDK, we’ve recently added a new additionalProbingPath to the runtimeconfig.dev.json file that is breaking the dotnet test functionality.

See dotnet/sdk#1306

The issue is that we have templated this path with |arch| and |tfm| that get substituted at runtime by the host with the current process’s architecture and the app’s TFM.

{
  "runtimeOptions": {
    "additionalProbingPaths": [
      "C:\\Users\\eerhardt\\.dotnet\\store\\|arch|\\|tfm|",
      "C:\\Users\\eerhardt\\.nuget\\packages"
    ]
  }
}

The problem is that dotnet test is reading these paths and expecting them to be valid full paths:

https://github.com/Microsoft/vstest/blob/5deac05760d13de70ffae373fc4fa0ed58612cef/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs#L360-L364

Steps to reproduce

Using the latest build from dotnet/sdk:

dotnet new xunit
dotnet test

Expected behavior

The test should run

Actual behavior

> dotnet test
Build started, please wait...
Build completed.

Test run for F:\DotNetTest\TestTest\bin\Debug\netcoreapp2.0\TestTest.dll(.NETCoreApp,Version=v2.0)
Microsoft (R) Test Execution Command Line Tool Version 15.3.0-preview-20170601-03
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
Illegal characters in path.
Parameter name: path

Environment

.NET Command Line Tools (2.0.0-preview2-006367)

Product Information:
 Version:            2.0.0-preview2-006367
 Commit SHA-1 hash:  3f5e5241a3

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.15063
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   F:\cli\artifacts\win10-x64\stage2\sdk\2.0.0-preview2-006367\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview2-25407-01
  Build    : 40c565230930ead58a50719c0ec799df77bddee9

dotnet/sdk build is 2.0.0-preview2-20170608-1

eerhardt added a commit to eerhardt/vstest that referenced this issue Jun 8, 2017
dotnet/sdk#1306 brought in templated probing paths into the runtime.config.json.  These are breaking dotnet test because we assume the paths are valid.

Skipping any invalid paths by catching exceptions from Path.Combine.

Fixes microsoft#847
codito pushed a commit that referenced this issue Jun 9, 2017
dotnet/sdk#1306 brought in templated probing paths into the runtime.config.json.  These are breaking dotnet test because we assume the paths are valid.

Skipping any invalid paths by catching exceptions from Path.Combine.

Fixes #847
codito pushed a commit that referenced this issue Jun 9, 2017
dotnet/sdk#1306 brought in templated probing paths into the runtime.config.json.  These are breaking dotnet test because we assume the paths are valid.

Skipping any invalid paths by catching exceptions from Path.Combine.

Fixes #847
codito pushed a commit to codito/dotnet-cli that referenced this issue Jun 9, 2017
livarcocc added a commit to dotnet/cli that referenced this issue Jun 20, 2017
…se/2.0.0-to-master-20170620-070043

* dotnet/release/2.0.0: (34 commits)
  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 microsoft/vstest#632 microsoft/vstest#844 microsoft/vstest#847 microsoft/vstest#840 microsoft/vstest#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
  Make dotnet-sln-list.Tests pass on localized setup
  ...
livarcocc added a commit to dotnet/cli that referenced this issue Jun 21, 2017
…se/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 microsoft/vstest#632 microsoft/vstest#844 microsoft/vstest#847 microsoft/vstest#840 microsoft/vstest#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
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant