Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=8.0.0.0' with Microsoft.Azure.WebJobs.Extensions.Storage #2480

Open
anime-shed opened this issue May 9, 2024 · 5 comments

Comments

@anime-shed
Copy link

New V4 app or existing V3 app migrated to V4: New App in V4

dotnet --version
9.0.100-preview.3.24204.13

Also verified in dotnet 8 sdk

Case

We are creating Azure function v4 with .net core 8.

Error:

image

Packages

image

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <AzureFunctionsVersion>v4</AzureFunctionsVersion>
    <ImplicitUsings>enable</ImplicitUsings>
    <SelfContained>false</SelfContained>
    <OutputType>Exe</OutputType>
  </PropertyGroup>
  <ItemGroup>
    <FrameworkReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.22.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.2" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="1.2.1" />
    <PackageReference Include="DotNetZip" Version="1.16.0" />
    <PackageReference Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.3.1" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Core" Version="3.0.39" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.3.0" />

    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
      <PackageReference Include="CsvHelper" Version="32.0.2" />
      <PackageReference Include="Polly" Version="8.3.1" />
	<PackageReference Include="Serilog" Version="3.1.1" />
	<PackageReference Include="Telegram.Bot" Version="19.0.0" />
  </ItemGroup>
  <ItemGroup>
    <Using Include="System.Threading.ExecutionContext" Alias="ExecutionContext" />
  </ItemGroup>
  <ItemGroup>
    <None Update="host.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="local.settings.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <CopyToPublishDirectory>Never</CopyToPublishDirectory>
    </None>
  </ItemGroup>
</Project>
@bhagyshricompany bhagyshricompany self-assigned this May 20, 2024
@bhagyshricompany
Copy link

Thanks for informing will check and confirm the same.

@bhagyshricompany
Copy link

bhagyshricompany commented May 24, 2024

I checked it seems fine.can you try again else share your code also.
image
image

@anime-shed
Copy link
Author

I'm sorry, it's a private project, so I won't be able to share the code. I can provide snippets that may help you debug the cause.

I tried to try again on my project, but for some reason, I am facing:

[2024-05-28T15:16:31.037Z] Found Using for user secrets file configuration.
[2024-05-28T15:16:32.849Z] No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
[2024-05-28T15:16:32.899Z] The 'FUNCTIONNAME' function is in error: The binding type(s) 'blobTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.
For detailed output, run func with --verbose flag.

@dsgb1987
Copy link

I am also having the same issue after upgrading from .Net 6 to .Net 8.

Microsoft.Azure.WebJobs.Script: Error building configuration in an external startup class. FileNetWorkFlows.Workflows: Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=8.0.0.0

I even attempted adding that package to the project explicitly.

@anime-shed
Copy link
Author

@dsgb1987, will it be possible to share your code snippet for @bhagyshricompany since I am facing an error on my end?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants