question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TestWillNotBuildTheProjectIfNoBuildArgsIsGiven is failing CLI update stage 0

See original GitHub issue

When updating to the latest stage 0, TestWillNotBuildTheProjectIfNoBuildArgsIsGiven fails. This test is maintained by VSTest. It only fails in Linux.

Expected string \"The argument /Users/vsts/agent/2.155.1/work/1/s/artifacts/tmp/Release/test/dotnet-test.Tests/5/VSTestCore/bin/Release/netcoreapp3.0/VSTestCore.dll is invalid. Please use the /help option to check the list of valid arguments.\" to contain \"The test source file \\\"/Users/vsts/agent/2.155.1/work/1/s/artifacts/tmp/Release/test/dotnet-test.Tests/5/VSTestCore/bin/Release/netcoreapp3.0/VSTestCore.dll\\\" provided was not found.\".

However, once you fix the issue in vstest. We need an insertion to toolset. And we need to wait for toolset->core-sdk->CLI to unblock. I am wondering if you could move this test to vstest repo. I don’t think SDK is required to test argument validation.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Sanan07commented, Jun 22, 2020

@wli3 I was able to reproduce the issue and pass test in Linux. After dotnet 3.0.100-preview 8 there was a change in TestPlatform, which added new exception message, when user send incorrect arguments in console. You need to change your error message in your test to pass the build. Please look at this draft PR, which I created to reproduce the issue : https://github.com/dotnet/cli/pull/13401

0reactions
emmenlaucommented, Jun 4, 2021

Thanks a lot @Sanan07 !

I’ve added --diag and it does show something that may be related, but I’m not sure it makes sense, at least not to me. It says something about the path being absolute, albeit I’m not sure this is an error(?). Here is the output:

TpTrace Information: 0 : 999021, 1, 2021/06/04, 12:07:48.460, 254465373888146, vstest.console.dll, Using .Net Framework version:.NETCoreApp,Version=v3.1
TpTrace Information: 0 : 999020, 1, 2021/06/04, 12:07:48.466, 254465375936847, vstest.console.dll, FilePatternParser: The given file /data/Debug/thrift/lib/netstd/Thrift/bin/Thrift.Tests.dll is a full path.
TpTrace Error: 0 : 999020, 1, 2021/06/04, 12:07:48.473, 254465383300780, vstest.console.dll, ArgumentProcessorFactory.WrapLazyProcessorToInitializeOnInstantiation: Exception initializing argument processor: Microsoft.VisualStudio.TestPlatform.CommandLine.TestSourceException: The argument /data/Debug/thrift/lib/netstd/Thrift/bin/Thrift.Tests.dll is invalid. Please use the /help option to check the list of valid arguments.
   at Microsoft.VisualStudio.TestPlatform.CommandLine.CommandLineOptions.AddSource(String source)
   at Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.TestSourceArgumentExecutor.Initialize(String argument)
   at Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.ArgumentProcessorFactory.<>c__DisplayClass20_0.<WrapLazyProcessorToInitializeOnInstantiation>b__0()
nInstantiation>b__0()

And here is the output of dotnet --info:

.NET Core SDK (reflecting any global.json):
 Version:   3.1.409
 Commit:    217439b5ae

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  20.04
 OS Platform: Linux
 RID:         ubuntu.20.04-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.409/

Host (useful for support):
  Version: 3.1.15
  Commit:  dc339bd0fb

.NET Core SDKs installed:
  3.1.409 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.15 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.15 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
Read more comments on GitHub >

github_iconTop Results From Across the Web

update-stage — AWS CLI 1.29.30 Command Reference
The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found