diff --git a/Kudu.Services.Web/KuduWebUtil.cs b/Kudu.Services.Web/KuduWebUtil.cs index 75879d12..cf58d04f 100644 --- a/Kudu.Services.Web/KuduWebUtil.cs +++ b/Kudu.Services.Web/KuduWebUtil.cs @@ -230,6 +230,10 @@ internal static void MigrateToNetCorePatch(IEnvironment environment) { FileSystemHelpers.WriteAllText(gitPostReceiveHookFile, fileText.Replace("dotnet", "benv dotnet=2.2 dotnet")); } + else if(!fileText.Contains("dotnet") && fileText.Contains("$KUDU_EXE") && isRunningOnAzure) + { + FileSystemHelpers.WriteAllText(gitPostReceiveHookFile, fileText.Replace("$KUDU_EXE", "benv dotnet=2.2 dotnet $KUDU_EXE")); + } } else {