Microsoft.Extensions.X Version 7.0.0 Issue - .NET 7 FunctionApp - c#

I've just started upgrading my functionapps to .NET 7. I've updated them all to use the .NET 7 SDK and all of the Microsoft.Extensions.X deps in my project to 7.0.0.
I'm getting this error:
Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified. .
Having had similar issues when upgrading to .NET 6, I had to upgrade my functions to the V4 runtime.
However, they're already on the V4 runtime and this table suggests that V4 supports .NET 7.
Is this a case of Microsoft just not having updated all of its function runners or am I missing something?

The Table of which you have shown providing the general details like Compatible Runtime Languages & Versions with Azure Functions but not the In-Process or Out-of-Process Type.
Current month Update - .NET 7 in Azure Functions is supported by leveraging the .NET Isolated Worker process. as mentioned in this Microsoft TechCommunity article
If you click on the .NET 7.0 shown in the same table, you will see another table like .NET 7.0 came in Isolated Worker Process.

Related

Microsoft.AspNetCore.Mvc.Abstractions not found in Azure Function - .NET 7

I have a simple Azure Function which was running in .NET Core 3.1
I am now trying to update it to .NET 7 version 4.x and Im getting a very unhelpful message
System.Private.CoreLib: Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
Has anyone come across this?
My packages are shown below
Even more annoying is that when I try to create a new function even though I have the latest Visual Studio I dont see .NET 7, only .NET 6 which is of no help either
The documentation on MS has instructions that havent been updated since 17.4 was in preview
Can anyone help please?
Paul
I am now trying to update it to .NET 7 version 4.x and Im getting a very unhelpful message
(OR)
though I have the latest Visual Studio I don’t see .NET 7
As of now, Only Isolated worker process is released in .NET 7 Azure Functions 4.x as shown in this MS Doc.
System.Private.CoreLib: Could not load file or assembly ‘Microsoft.AspNetCore.Mvc.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’. The system cannot find the file specified.
I found two issues 74368240 and 74470489 that says version 7.0.0 of Microsoft.X NuGet Package is having the issues and not compatible with .NET 7 Version which is not yet released.
Even the package Microsoft.AspNetCore.Mvc.Abstractions you’re using is compatible with the .NET 7:
It does not work until the .NET 7 (In-process) is released for the Azure Functions 4.x version.

Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=7.0.0.0. The system cannot find the file specified

I have a project target framework of .net6.0. I want to upgrade to ef 7.0.0 from ef6.0.0. In my solution I have a separate project for functionApps, there I am getting an error "Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.".
As i have to upgrade to ef 7.0.0, all the dependencies should be at 7.0.0. As per this link, Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0 in Azure Functions, I cannot downgrade the version. Below is the function app error screenshot.
Any help will be appreciated. Cheers !
This issue is registered in the Azure Functions Host GitHub Repository where the Function is throwing the NuGet Package load exception with the Version 7 of Entity Framework Core and Microsoft.Extensions.Configuration.Abstractions which are released recently.
Few users mentioned it is working with Version 6 NuGet Packages installed in .NET 6 v4 Azure Functions and also for .NET 7 with the removal of the specific package Microsoft.NET.Sdk.Functions ash shown practically in the same SO Forum of Azure Functions, .NET 7 In-Process is not yet release for Azure Functions which will be released soon.
You can track this GitHub Azure Functions Host Issue 8984 for the .NET 6 v4 NuGet (EF Core & Config.Abstractions Versioned 7) Packages Runtime Issue and will update the answer with the fix accordingly.

Azure function .net 7 upgrade issue: System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Extensions.Http, <...>'

In my Azure function, I'm having issues after upgrading from.NET Core 3.1 to.NET Core 7.0.
System.IO.FileNotFoundException: 'Could not load file or assembly
'Microsoft.Extensions.Http, Version=7.0.0.0, Culture=neutral,
PublicKeyToken=adb9793829ddae60'. The system cannot find the file
specified.'
All of my nuget packages have been updated to the most recent version, but I still don't understand why this keeps happening.
What is the problem?
In my Azure function, I'm having issues after upgrading from.NET Core 3.1 to.NET Core 7.0
.NET 7.0 In-Process is not yet released for the Azure Functions as mentioned in this MS Doc of Azure Functions - .NET Supported Versions.
Also, in .csproj file, you have written the Target Framework as Net7.0 to the v3 Azure Functions Version which is incorrect.
Azure Functions Core Tools Version 3 Supports only 3.1 in .NET and v4 supports .NET 6, 7 and Framework 4.8 as stated in this MS Doc.
Also, Microsoft recommends migrating the .NET 3.1 v3 Azure Functions Project to the .NET 6 In-Process for good workflow as you can see in below official screenshot:
Refer to this MS Doc and Nicksnettravels article for more information on migration steps of .NET 3.1 to Higher Versions to make sure your code is compatible.
Upgrade your function Code from .NET 3.1 to the supported Versions such as .NET 6 (In-process, Isolated Process) and .NET 7 Isolated process for the good compatibility code workflow.

Calling Trimble Connect APIs from a C# App

I am trying to use a C# application to interact with a Trimble Connect Project. To do this, I'm trying to follow this link: APIs tutorial.
The problem is that after adding a lot of missed dependencies I'm stuck with this:
Could not load type 'System.ServiceModel.Description.DispatcherSynchronizationBehavior' from assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
This problem is becasue you are trying to build this application using .Net Core framework. .net Core core 5.0 framework did changes on ServiceModel along with other. You can refer this link
Here how you can use application. As per documentation of SDK, they supported .Net Framework 4.0 and onwards. Hence you need to use VS 2017 with framework 4.6 or 4.7. Here is the sample running application code from github. you can download this application and open in VS 2017.
You can also download other running code based on different targets from here. Incase you are strugging with Trimble, you can write mail on 'connect-integrate#trimble.com'

SelectPDF .Net Core 2.2: Exception: Conversion failure. Unable to load shared library 'kernel32.dll' or one of its dependencies

I am trying to implement SelectPdf.
I am working on a OS X and I think that is why I am getting this problem:
Exception: Conversion failure. Unable to load shared library 'kernel32.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libkernel32.dll, 1): image not found
Is there an alternative way for macOs?
Indeed, this is a dependency to Windows kernel library.
If I believe https://selectpdf.com/docs/Installation.htm the .NET Core version is Windows only: ".NET Core version - Windows only" and "Note 2: The .NET Core version is for .NET Core 2.0 or above through .NET Standard 2.0. Currently it requires a Windows system to run. It does not work on Linux or Mac or Xamarin."

Categories

Resources