简体   繁体   中英

Working Durable Functions Project no longer works locally after upgrading to VS2022 17.2.4 (x64)

I am unable to add an adjunct or comment to the similar question here: Working Durable Functions Project no longer works locally after upgrading to VS2022 17.1.4

In any case, my question is related to the above question. I have the latest v4 Azure Functions Core Tools installed and I am having trouble with an Azure Durable Function project in Visual Studio 2022 which has the following NuGet packages installed. The packages appear to conflict with each other whenever I add an Azure Queue Trigger Function class. When I do add the class, the first package (DurableTask) goes missing in the solution explorer and when I delete that class the package reappears.

Microsoft.Azure.WebJobs.Extensions.DurableTask (2.7.2) -- this goes missing and comes back depending on whether the Storage package is being used of not.
Microsoft.Azure.WebJobs.Extensions.Storage (4.0.5) -- QueueTrigger uses this package.
Microsoft.Extensions.Configuration.UserSecrets (6.0.1)
Microsoft.NET.Sdk.Functions (4.1.1)

Why does this happen? Can anyone help with this? Cheers, Henk.

We have tried the same in our local and able to debug it successfully by following workaround.

We have created simple durable function with your configuration but unable to get the same issue .

.csproj file -

 <Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <AzureFunctionsVersion>v4</AzureFunctionsVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="2.7.2" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.0.1" />
    <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>

OUTPUT SCREENSHOT FOR REFERENCE:- 在此处输入图像描述 在此处输入图像描述

在此处输入图像描述 在此处输入图像描述

NOTE:- Make sure that you have only one Azure function runtime installed in local (ie v4 ) . And try to restart visual studio and start storage emulator/Azurite in local and open visual studio and test.

For more information please refer the below links:-

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM