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

runtimeconfig.json not found #96957

Closed
mcrepssdi opened this issue Jan 14, 2024 · 7 comments
Closed

runtimeconfig.json not found #96957

mcrepssdi opened this issue Jan 14, 2024 · 7 comments

Comments

@mcrepssdi
Copy link

Description

Run dotnet test --filter Category=UnitTest --no-build --verbosity normal
Build started 01/14/2024 10:49:40.
1>Project "/home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities.sln" on node 1 (VSTest target(s)).
1>ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Test run for /home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities/bin/Debug/net8.0/stunning-octo-chainsaw-utilities.dll (.NETCoreApp,Version=v8.0)
Microsoft (R) Test Execution Command Line Tool Version 17.8.0 (x64)
Copyright (c) Microsoft Corporation. All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Test run for /home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities-tests/bin/Debug/net8.0/stunning-octo-chainsaw-utilities-tests.dll (.NETCoreApp,Version=v8.0)
Testhost process for source(s) '/home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities/bin/Debug/net8.0/stunning-octo-chainsaw-utilities.dll' exited with error: The specified runtimeconfig.json [/usr/share/dotnet/sdk/8.0.101/testhost-8.0.runtimeconfig.json] does not exist
. Please check the diagnostic logs for more information.
Microsoft (R) Test Execution Command Line Tool Version 17.8.0 (x64)
Copyright (c) Microsoft Corporation. All rights reserved.

Test Run Aborted.

 1>Project "/home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities.sln" (1) is building "/home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities/stunning-octo-chainsaw-utilities.csproj" (2) on node 1 (VSTest target(s)).
 2>VSTest:
     MSB4181: The "Microsoft.TestPlatform.Build.Tasks.VSTestTask" task returned false but did not log an error.
 2>Done Building Project "/home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities/stunning-octo-chainsaw-utilities.csproj" (VSTest target(s)) -- FAILED.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities-tests/bin/Debug/net8.0/stunning-octo-chainsaw-utilities-tests.dll
NUnit3TestExecutor discovered 5 of 5 NUnit test cases using Current Discovery mode, Non-Explicit run
Passed Get_WhenRequstHttpStatusOk_ExpectOk [925 ms]
NUnit Adapter 4.5.0.0: Test execution complete
Passed Get_WhenUsingDictionaryAndHttpStatusOk_ExpectOk [386 ms]
Passed Get_WhenUsingObjectAndHttpStatusOk_ExpectOk [235 ms]
Passed GetWhenPassingHttpClient_WhenHttpStatusOk_ExpectOk [452 ms]
Passed Head_WhenHttpStatusOk_ExpectNoException [235 ms]

Test Run Successful.
Total tests: 5
Passed: 5
Total time: 3.2804 Seconds
1>Done Building Project "/home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities.sln" (VSTest target(s)) -- FAILED.

Build FAILED.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:05.42
Error: Process completed with exit code 1.

Reproduction Steps

Action Runs on a Class Library.

Simply re-run the action and the message happens

Expected behavior

runtimeconfig.json should be built and located next to the test dll

Actual behavior

runtimeconfig.json is missing thus breaking the action

Regression?

This did work previously and have instances where it is still working

Known Workarounds

None

Configuration

Net 8.
Mac OS
Test using ubuntu-latest runner
ARM
Class Library

Other information

No response

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jan 14, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jan 14, 2024
@ghost
Copy link

ghost commented Jan 15, 2024

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

Run dotnet test --filter Category=UnitTest --no-build --verbosity normal
Build started 01/14/2024 10:49:40.
1>Project "/home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities.sln" on node 1 (VSTest target(s)).
1>ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Test run for /home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities/bin/Debug/net8.0/stunning-octo-chainsaw-utilities.dll (.NETCoreApp,Version=v8.0)
Microsoft (R) Test Execution Command Line Tool Version 17.8.0 (x64)
Copyright (c) Microsoft Corporation. All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Test run for /home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities-tests/bin/Debug/net8.0/stunning-octo-chainsaw-utilities-tests.dll (.NETCoreApp,Version=v8.0)
Testhost process for source(s) '/home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities/bin/Debug/net8.0/stunning-octo-chainsaw-utilities.dll' exited with error: The specified runtimeconfig.json [/usr/share/dotnet/sdk/8.0.101/testhost-8.0.runtimeconfig.json] does not exist
. Please check the diagnostic logs for more information.
Microsoft (R) Test Execution Command Line Tool Version 17.8.0 (x64)
Copyright (c) Microsoft Corporation. All rights reserved.

Test Run Aborted.

 1>Project "/home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities.sln" (1) is building "/home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities/stunning-octo-chainsaw-utilities.csproj" (2) on node 1 (VSTest target(s)).
 2>VSTest:
     MSB4181: The "Microsoft.TestPlatform.Build.Tasks.VSTestTask" task returned false but did not log an error.
 2>Done Building Project "/home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities/stunning-octo-chainsaw-utilities.csproj" (VSTest target(s)) -- FAILED.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities-tests/bin/Debug/net8.0/stunning-octo-chainsaw-utilities-tests.dll
NUnit3TestExecutor discovered 5 of 5 NUnit test cases using Current Discovery mode, Non-Explicit run
Passed Get_WhenRequstHttpStatusOk_ExpectOk [925 ms]
NUnit Adapter 4.5.0.0: Test execution complete
Passed Get_WhenUsingDictionaryAndHttpStatusOk_ExpectOk [386 ms]
Passed Get_WhenUsingObjectAndHttpStatusOk_ExpectOk [235 ms]
Passed GetWhenPassingHttpClient_WhenHttpStatusOk_ExpectOk [452 ms]
Passed Head_WhenHttpStatusOk_ExpectNoException [235 ms]

Test Run Successful.
Total tests: 5
Passed: 5
Total time: 3.2804 Seconds
1>Done Building Project "/home/runner/work/stunning-onto-chainsaw-utilities/stunning-onto-chainsaw-utilities/stunning-octo-chainsaw-utilities.sln" (VSTest target(s)) -- FAILED.

Build FAILED.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:05.42
Error: Process completed with exit code 1.

Reproduction Steps

Action Runs on a Class Library.

Simply re-run the action and the message happens

Expected behavior

runtimeconfig.json should be built and located next to the test dll

Actual behavior

runtimeconfig.json is missing thus breaking the action

Regression?

This did work previously and have instances where it is still working

Known Workarounds

None

Configuration

Net 8.
Mac OS
Test using ubuntu-latest runner
ARM
Class Library

Other information

No response

Author: mcrepssdi
Assignees: -
Labels:

area-Host, untriaged, needs-area-label

Milestone: -

@vcsjones vcsjones removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jan 15, 2024
@vitek-karas
Copy link
Member

Probably fixed by microsoft/vstest#4792.

@cvpoienaru
Copy link
Member

Closing this issue since it has already been fixed in dotnet 8.0.2 by: microsoft/vstest#4792

@mcrepssdi
Copy link
Author

This appears to still be an issue since as of today all my test still fail on Github Action.

@luiz-soares
Copy link

despite apparently fixed by that PR, I can't see a new version for Microsoft.TestPlatform package with the fix, are there any plans?

@cvpoienaru
Copy link
Member

@mcrepssdi @luiz-soares TestPlatform v17.10.0-preview-24080-01 is now available !
Release notes
Microsoft.NET.Test.Sdk nuget
Microsoft.TestPlatform nuget

@elinor-fung
Copy link
Member

Closing as the fix is now available per #96957 (comment). Let us know if you keep hitting this issue.

@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Feb 14, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

7 participants