From: 김상욱/Common Platform Lab(SR)/Engineer/삼성전자 Date: Fri, 24 Apr 2020 02:37:07 +0000 (+0900) Subject: Do not pass a native image path to coreclr_execute_assembly (#222) X-Git-Tag: submit/tizen_5.5/20200427.054914~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=da08ea5a9b057822e02003e492d0cd8bb37d1cea;p=platform%2Fcore%2Fdotnet%2Flauncher.git Do not pass a native image path to coreclr_execute_assembly (#222) Passing a native image path will result in a BadImageFormatException --- diff --git a/NativeLauncher/launcher/exec/corerun.cc b/NativeLauncher/launcher/exec/corerun.cc index 4842867..2ac5d63 100644 --- a/NativeLauncher/launcher/exec/corerun.cc +++ b/NativeLauncher/launcher/exec/corerun.cc @@ -37,7 +37,7 @@ void DisplayUsage() { "counters monitor or collect performance counters\n" "dump capture or analyze a coredump\n" "gcdump capture a heapdump\n" - "trace collect or convert a diagnostic event trace\n"); + "trace collect or convert a diagnostic event trace\n\n"); } int main(int argc, const char* argv[]) { @@ -114,16 +114,12 @@ int main(int argc, const char* argv[]) { fprintf(stderr, "This command is not currently supported.\n"); return -1; } else { - managedAssemblyPath = toolDllsPath + "/dotnet-" + arg; + managedAssemblyPath = toolDllsPath + "/dotnet-" + arg + ".dll"; - if (isFileExist(managedAssemblyPath + ".ni.dll")) { - managedAssemblyPath += ".ni.dll"; - } else if (isFileExist(managedAssemblyPath + ".dll")) { - managedAssemblyPath += ".dll"; - } else { + if (!isFileExist(managedAssemblyPath)) { fprintf(stderr, "Could not execute because dotnet-%s does not exist.\n" - "Follow the instructions for tool installation: https://github.com/Samsung/diagnostic-tools\n", argv[0]); + "Go to https://developer.samsung.com/tizen to learn how to install tools.\n\n", argv[0]); return -1; }