升级到VS2022 17.1.4后,工作耐用功能项目不再在本地工作
我有一个 .NET 6 V4 Durable Functions 项目,自从升级到 Visual Studio 17.1.3(和 17.1.4)后,该项目不再在本地运行。我收到以下错误(关键位是 local.settings.json
中指定的存储连接字符串):
Azure Functions Core Tools
Core Tools Version: 4.0.4426 Commit hash: N/A (64-bit)
Function Runtime Version: 4.1.3.17473
Can't determine project language from files. Please use one of [--csharp, --javascript, --typescript, --java, --python, --powershell, --custom]
Can't determine project language from files. Please use one of [--csharp, --javascript, --typescript, --java, --python, --powershell, --custom]
[2022-04-13T13:39:54.245Z] Using the default storage provider: AzureStorage.
[2022-04-13T13:39:54.245Z] A host error has occurred during startup operation '9291bc18-db2c-4cf3-ad6a-1b1b03882388'.
[2022-04-13T13:39:54.248Z] Microsoft.Azure.WebJobs.Extensions.DurableTask: Unable to find an Azure Storage connection string to use for this binding.
Value cannot be null. (Parameter 'provider')
我已尝试运行早期版本的 Azure Functions Core Tools,并尝试使用本地调试Visual Studio Code 但总是出现相同的错误。因此我得出的结论是,一些非常低级的东西被破坏了。
项目文件
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="2.6.1" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage.Blobs" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\tests\RemitlyCallbacks.Mocks\RemitlyCallbacks.Mocks.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="Entities\" />
</ItemGroup>
</Project>
local.settings.json
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet"
}
}
host.json
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensions": {
"durableTask": {
"hubName": "<myHubName>",
"storageProvider": {
"connectionStringName": "AzureWebJobsStorage"
}
}
}
}
最新版本的 Azure Functions Core Tools 提到了变量名称的更改,但我找不到有关可能发生更改的具体细节。
我现在不知道如何恢复本地调试体验。欢迎任何建议。
I have a .NET 6, V4 Durable Functions project which no longer runs locally since I upgraded to Visual Studio 17.1.3 (and 17.1.4). I get the following error (the critical bit being the storage connection string which is specified in local.settings.json
):
Azure Functions Core Tools
Core Tools Version: 4.0.4426 Commit hash: N/A (64-bit)
Function Runtime Version: 4.1.3.17473
Can't determine project language from files. Please use one of [--csharp, --javascript, --typescript, --java, --python, --powershell, --custom]
Can't determine project language from files. Please use one of [--csharp, --javascript, --typescript, --java, --python, --powershell, --custom]
[2022-04-13T13:39:54.245Z] Using the default storage provider: AzureStorage.
[2022-04-13T13:39:54.245Z] A host error has occurred during startup operation '9291bc18-db2c-4cf3-ad6a-1b1b03882388'.
[2022-04-13T13:39:54.248Z] Microsoft.Azure.WebJobs.Extensions.DurableTask: Unable to find an Azure Storage connection string to use for this binding.
Value cannot be null. (Parameter 'provider')
I have tried running earlier releases of the Azure Functions Core Tools and also tried local debugging with Visual Studio Code but always get the same error. I therefore conclude that something very low-level is broken.
Project File
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="2.6.1" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage.Blobs" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\tests\RemitlyCallbacks.Mocks\RemitlyCallbacks.Mocks.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="Entities\" />
</ItemGroup>
</Project>
local.settings.json
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet"
}
}
host.json
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensions": {
"durableTask": {
"hubName": "<myHubName>",
"storageProvider": {
"connectionStringName": "AzureWebJobsStorage"
}
}
}
}
The latest release of Azure Functions Core Tools mentions changes to variable names but I can't find specific details about what may have changed.
I am now out of ideas as to how to get my local debugging experience back. Any suggestions welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论