gpt4 book ai didi

Azure Function 无法发布并出现 'PackageDependencyResolution.targets' 错误

转载 作者:行者123 更新时间:2023-12-03 05:47:17 25 4
gpt4 key购买 nike

不知道如何解决此问题,但当我尝试发布我的 Azure 函数之一时收到此错误。

仅供引用 - 我将项目设置为 .Net 4.6.2,以及具有依赖项的其他项目。该项目构建但未发布

我应该恢复所有 NuGet 包还是可以尝试其他方法!?

这是错误 -

C:\Program Files\dotnet\sdk\2.1.202\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file 'C:\Users\chuckdawit\Source\Workspaces\YogaBandy2017\YogaBandy2017\Yogabandy2017.StripeWebhook\obj\project.assets.json' doesn't have a target for '.NETFramework,Version=v4.6.1'. Ensure that restore has run and that you have included 'net461' in the TargetFrameworks for your project. [C:\Users\chuckdawit\Source\Workspaces\YogaBandy2017\YogaBandy2017\Yogabandy2017.StripeWebhook\Yogabandy2017.StripeWebhook.csproj]

最佳答案

我建议尝试以下步骤:

  1. 尝试删除项目中的 bin 和 obj 文件夹并重新构建。
  2. 打开“发布”页面,然后打开“配置”对话框,然后重新保存。它可能只是对标签进行排序。
  3. 转至发布配置文件 (Properties/PublishProfiles/*.pubxml) 并检查 TargetFramework 是否已更新以反射(reflect)新框架。如果没有,请在此处手动更改或只需运行发布选项卡上的配置选项。

有一个关于类似问题的详细讨论here .

关于Azure Function 无法发布并出现 'PackageDependencyResolution.targets' 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52655408/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com