Unity-Technologies / UnityTestRunnerResultsReporter

Other
37 stars 9 forks source link

UnityTestRunnerResultsReporter.dll not found? #4

Open kbleighton opened 2 years ago

kbleighton commented 2 years ago
C:\Users\KyleLeighton\.dotnet\tools\UnityTestRunnerResultsReporter>dotnet UnityTestRunnerResultsReporter.dll --resultsPath=C:\TestRunner
Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET program, but dotnet-UnityTestRunnerResultsReporter.dll does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

I've searched the repo and this file does not exist anywhere, yet that is what we are calling in the dotnet command. Am I missing something here? I'm running on dotnet-sdk-6.0.101-win-x64

image

mgarbade commented 1 year ago

same question here

mgarbade commented 1 year ago

Not working

PS D:\Git\UnityTestRunnerResultsReporter> dotnet build
Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
C:\Program Files\dotnet\sdk\5.0.103\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp2.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [D:\Git\UnityTestRunnerResultsReporter\UnityTestRunnerResultsReporter.csproj]
C:\Program Files\dotnet\sdk\5.0.103\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp2.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [D:\Git\UnityTestRunnerResultsReporter\UnityTestRunnerResultsReporter.csproj]
  All projects are up-to-date for restore.
C:\Program Files\dotnet\sdk\5.0.103\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp2.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [D:\Git\UnityTestRunnerResultsReporter\UnityTestRunnerResultsReporter.csproj]
  UnityTestRunnerResultsReporter -> D:\Git\UnityTestRunnerResultsReporter\bin\Debug\netcoreapp2.0\UnityTestRunnerResultsReporter.dll
  File not found - Template
  0 File(s) copied
D:\Git\UnityTestRunnerResultsReporter\UnityTestRunnerResultsReporter.csproj(14,5): error MSB3073: The command "xcopy "*Undefined*\Template" "D:\Git\UnityTestRunnerResultsReporter\bin\Debug\netcoreapp2.0\" /e /Y" exited with code 4.

Build FAILED.

C:\Program Files\dotnet\sdk\5.0.103\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp2.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [D:\Git\UnityTestRunnerResultsReporter\UnityTestRunnerResultsReporter.csproj]
C:\Program Files\dotnet\sdk\5.0.103\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp2.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [D:\Git\UnityTestRunnerResultsReporter\UnityTestRunnerResultsReporter.csproj]
C:\Program Files\dotnet\sdk\5.0.103\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp2.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [D:\Git\UnityTestRunnerResultsReporter\UnityTestRunnerResultsReporter.csproj]
D:\Git\UnityTestRunnerResultsReporter\UnityTestRunnerResultsReporter.csproj(14,5): error MSB3073: The command "xcopy "*Undefined*\Template" "D:\Git\UnityTestRunnerResultsReporter\bin\Debug\netcoreapp2.0\" /e /Y" exited with code 4.
    3 Warning(s)
    1 Error(s)

My dotnet --version : 5.0.103

Still the command creates a .dll file which however seems to be corrupt. When I execute the dll with the above mentioned command I get 2022-12-01 17_08_34-aisc06 - Remote Desktop Connection a

mgarbade commented 1 year ago

Moving forward. Using powershell to compile the project

dotnet new sln
Get-ChildItem -Recurse *.csproj | ForEach { dotnet sln add $_.FullName }
dotnet build

-> builds without errors

However, when running it complains about "UnityLog.txt" file not being found. As far as I know this file is not created during test runs...

mgarbade commented 1 year ago

works now:

dotnet .\bin\Debug\netcoreapp2.0\UnityTestRunnerResultsReporter.dll --resultsPath="D:\CI-CD\MyGame\PlayModeTests" --resultXMLName="results.xml" --report=D:\ --unityLogName=C:\Users\myUser\AppData\Local\Unity\Editor\Editor.log`