Replies: 1 comment
-
From the code shared above, it looks like an in-proc dotnet function. For in-proc issues, https://github.com/Azure/azure-functions-host is the repo to open an issue against. Keep in mind that, the current(V4) in-proc model is built on .NET6. So if you are using dependencies greater than 6.X, that may cause issues. The isolated model (the code present in this repo) is more flexible and allows you to use newer version of dependencies/.NET runtimes without issues. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just to let you guys know in Functions Dotnet V6 I am having nothing but issues somewhere with the assembly or incompatability with azure functions or dependencies leaving me this error :
For detailed output, run func with --verbose flag. [2024-02-08T17:47:31.771Z] Host lock lease acquired by instance ID '000000000000000000000000EA2C7E34'. [2024-02-08T17:48:41.653Z] Executing 'DeletePatient' (Reason='This function was programmatically called via the host APIs.', Id=b06115ff-8c2e-47de-8022-c6ba5efa99c0) [2024-02-08T17:48:41.907Z] Error deleting patient with ID 2: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified. [2024-02-08T17:48:41.907Z] [2024-02-08T17:48:41.925Z] Executed 'DeletePatient' (Succeeded, Id=b06115ff-8c2e-47de-8022-c6ba5efa99c0, Duration=347ms)
From this code:`using System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using MySql.Data.MySqlClient; // Import the MySqlClient namespace instead of System.Data.SqlClient
namespace PatientDELETE
{
public static class DeletePatientFunction
{
[FunctionName("DeletePatient")]
public static async Task Run(
[HttpTrigger(AuthorizationLevel.Function, "delete", Route = "patients/{id}")] HttpRequest req,
ILogger log,
int id)
{
try
{
string connectionString = Environment.GetEnvironmentVariable("MySqlConnectionString"); // Update the connection string key as per your configuration
}
`
Hope this might help or be a known issue?
Beta Was this translation helpful? Give feedback.
All reactions