diff --git a/Documentation/specs/corehost.md b/Documentation/specs/corehost.md index 249c8c324..88a62993f 100644 --- a/Documentation/specs/corehost.md +++ b/Documentation/specs/corehost.md @@ -78,7 +78,7 @@ During host start-up, the host identifies if a `.deps` file is present and loads A `.deps` file is **not** required to successfully launch an application, but without it, all the dependent assemblies must be located within the same folder as the application. Also, since servicing is performed on the basis of packages, an application without a `.deps` file cannot use the servicing index to override the location of assemblies. -The host looks for the `.deps` file in the Application Base with the file name `[AssemblyName].deps`. The path to the deps file can be overriden by specifying `--corehost-depsfile:{path to deps file}` as the first parameter to the application. +The host looks for the `.deps` file in the Application Base with the file name `[AssemblyName].deps`. The path to the deps file can be overriden by specifying `--depsfile:{path to deps file}` as the first parameter to the application. Given the set of assembly names, the host performs the following resolution. In some steps, the Package ID/Version/Relative Path data is required. This is only available if the assembly was listed in the deps file. If the assembly comes from the app-local folder, these resolution steps are skipped. diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolver.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolver.cs index ae8cceb11..0e3e35156 100644 --- a/src/Microsoft.DotNet.Cli.Utils/CommandResolver.cs +++ b/src/Microsoft.DotNet.Cli.Utils/CommandResolver.cs @@ -176,7 +176,7 @@ namespace Microsoft.DotNet.Cli.Utils if (depsPath != null) { - depsArg = $"\"--corehost-depsfile:{depsPath}\" "; + depsArg = $"\"--depsfile:{depsPath}\" "; } args = $"\"{dllPath}\" {depsArg}{args}"; diff --git a/src/corehost/cli/args.h b/src/corehost/cli/args.h index 67ef39581..a9bdbc558 100644 --- a/src/corehost/cli/args.h +++ b/src/corehost/cli/args.h @@ -8,7 +8,7 @@ #include "pal.h" #include "trace.h" -static const pal::string_t s_depsArgPrefix = _X("--corehost-depsfile:"); +static const pal::string_t s_depsArgPrefix = _X("--depsfile:"); struct arguments_t { diff --git a/src/corehost/common/utils.cpp b/src/corehost/common/utils.cpp index bff1afb2f..930250507 100644 --- a/src/corehost/common/utils.cpp +++ b/src/corehost/common/utils.cpp @@ -20,8 +20,7 @@ bool ends_with(const pal::string_t& value, const pal::string_t& suffix) bool starts_with(const pal::string_t& value, const pal::string_t& prefix) { - return prefix.length() <= value.length() && - (0 == value.compare(0, prefix.length(), prefix)); + return value.find(prefix.c_str(), 0, prefix.length()) == 0; } void append_path(pal::string_t* path1, const pal::char_t* path2)