使用 JetBrains Rider 每隔重新构建/构建调试 Azure 函数时,都会收到以下错误消息:
Microsoft.Azure.Functions.Worker.Sdk.targets(169,9):警告 MSB3026:无法复制“C:*\Local\Temp n3kt121.jsm uildout in\Microsoft.Azure” .WebJobs.Extensions.FunctionMetadataLoader.dll”到“C:\Dev** in\Debug\
”
然后我必须寻找进程“func”并手动关闭它,或者关闭并重新打开 Rider 以使其再次构建。这非常令人沮丧。有谁知道这个问题的解决方法吗?
Microsoft.Azure.Functions.Worker.Sdk.targets(169,9):警告 MSB3026:无法复制“C:Local\Temp n3kt121.jsm uildout in\Microsoft.Azure.WebJobs.Extensions.FunctionMetadataLoader.dll” ”到“C:\Dev in\Debug\
要解决此错误,请删除 C:\Users\***\AppData\Local\
下的
Azure Function Tools文件夹(如评论中所述)=> 重新启动 Rider IDE 并运行该函数。
bin
和 obj
文件夹并重建项目,这会强制 Rider 从头开始清理和重建整个项目,并解决配置问题(如果有)。File=>Invalidate Caches=>Invalidate Restart
。隔离功能:
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.16.0" />
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.1.0" />
<PackageReference Include="Azure.Storage.Queues" Version="12.11.1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.21.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.1.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="1.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs" Version="6.3.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="1.2.0" />
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.7.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
</ItemGroup>
launchsettings.json:
{
"profiles": {
"FunctionApp1": {
"commandName": "Project",
"commandLineArgs": "--port 7147",
"launchBrowser": false
}
}
}