Fix absolute paths to dotnet (#597)

This commit is contained in:
Justin Kotalik 2018-02-20 15:03:37 -08:00 committed by GitHub
parent c395db12e6
commit ff496ca580
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 9 deletions

View File

@ -188,6 +188,9 @@ HOSTFXR_UTILITY::GetHostFxrParameters(
{ {
// Check if hostfxr is in this folder, if it is, we are a standalone application, // Check if hostfxr is in this folder, if it is, we are a standalone application,
// else we assume we received an absolute path to dotnet.exe // else we assume we received an absolute path to dotnet.exe
if (!struExeLocation.EndsWith(L"dotnet.exe") &&
!struExeLocation.EndsWith(L"dotnet"))
{
hr = GetStandaloneHostfxrParameters( hr = GetStandaloneHostfxrParameters(
struExeLocation.QueryStr(), struExeLocation.QueryStr(),
pcwzApplicationPhysicalPath, pcwzApplicationPhysicalPath,
@ -198,6 +201,7 @@ HOSTFXR_UTILITY::GetHostFxrParameters(
ppwzArgv); ppwzArgv);
goto Finished; goto Finished;
} }
}
else else
{ {
if (FAILED(hr = HOSTFXR_UTILITY::FindDotnetExePath(&struExeLocation))) if (FAILED(hr = HOSTFXR_UTILITY::FindDotnetExePath(&struExeLocation)))