升级到VS2022 17.2.4(x64)后,工作耐用功能项目不再在本地工作

发布于 2025-02-09 09:59:59 字数 760 浏览 2 评论 0 原文

我无法在此处向类似问题添加辅助或评论: 升级到VS2022 17.1.4

无论如何,我的问题与上述问题有关。 2022将安装了以下Nuget软件包。每当我添加Azure队列触发功能类时,这些软件包似乎相互冲突。当我添加类时,第一个软件包(DurableTask)在解决方案资源管理器中丢失,当我删除该类包时,该软件包重新出现。

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)

为什么会发生这种情况?谁能帮忙吗? 欢呼,亨克。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你与昨日 2025-02-16 09:59:59

我们在本地尝试了同样的尝试,并能够通过跟随解决方法来成功调试它。

我们使用您的配置创建了简单的耐用功能,但无法获得相同的问题。

.csproj 文件 -

 <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>

输出屏幕截图供参考: -

”在此处输入图像说明”

注意: - 确保您只有一个 azure untime runtime runtime runtime runtime runtime 安装在本地(即V4)中。并尝试在本地和开放的Visual Studio中重新启动Visual Studio并开始存储模拟器/Azurite和测试。

有关更多信息,请参阅以下链接: -

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:-
enter image description here
enter image description here

enter image description here
enter image description here

NOTE:- Make sure that you have only one Azure function runtime installed in local (i.e 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:-

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文