When EF7 RC is referenced from a Function App, the app throws a runtime error on startup
See original GitHub issueA minimal reproduceable repo is here: https://github.com/elninoisback/ef7rc-fnapp-issue
The following error is thrown in the console when the function app startsup. It goes away when you remove the ef core dependancy,
The 'Function1' function is in error: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
The following is my .csproj file of the function app.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<RootNamespace>ef7rc_fnapp_issue</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.0-rc.1.22426.7" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.1" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
EF Core version: 7.0.0-rc.1.22426.7 Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer) Target framework: (e.g. .NET 6.0) Operating system: Windows 10 Pro IDE: Visual Studio Enterprise 2022
Issue Analytics
- State:
- Created a year ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
When EF7 RC is referenced from a Function App, the app ...
The following error is thrown in the console when the function app startsup. It goes away when you remove the ef core dependancy,....
Read more >Troubleshoot error: Azure Functions Runtime is unreachable
The most common reason for this is that the function app has lost access to its storage account.
Read more >Azure Functions Portal error - The function runtime is ...
The function Runtime is unable to start which states: changed the FUNCTIONS_EXTENSION_VERSION to ~1 and restarted, and it looks like things ...
Read more >New aggregate function support in EF Core 7 - YouTube
Aggregate functions such as COUNT, MAX or AVG compute a single value from multiple rows. EF7 adds support for custom provider aggregate ...
Read more >Ef core 6 breaking changes. Replace this call in 'MyFunction (s
Ef core 6 breaking changes. Replace this call in 'MyFunction (string, string)' with a call to 'string. EF6 requires changes to app. 2...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
hmm looks to me that the aspnetcore shared framework is referenced right? if so ensure that:
in the csproj of the function application.
Currently I would recommend for you to test this with .NET 7’s TFM and see if you can still reproduce it with that as well.