Running an azure function locally prompted an install to azure function tools this morning. It downloaded 2.2.2 but running the following .csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AzureFunctionsVersion>v2</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.ServiceBus" Version="3.0.0-beta5" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.14" />
</ItemGroup>
<ItemGroup>
<None Update="local.settings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
caused this error:
Failed to load the dll from [C:\Users\me\AppData\Local\AzureFunctionsTools\Releases\2.2.2\cli\hostpolicy.dll], HRESULT: 0x800700C1
An error occurred while loading required library hostpolicy.dll from [C:\Users\me\AppData\Local\AzureFunctionsTools\Releases\2.2.2\cli\]
What can I do to resolve this? This is running happily in azure.
What is your OS version?
Windows x64 Version 1709
Just to add, I'm experiencing the same issue with 2.2.2. Function project was running fine pre-update and works in Azure. (The specified DLL DOES exist)
Visual Studio version: 15.7.3
Windows 10.0.17134
Thanks
/cc @fabiocav do you know what might be the issue here? I think 2.2.2 might be the first release with dotnet 2.1 (@soninaren please correct me if I'm wrong).
I can't repro this, but I do see few discussions on the clr repo about these types of errors. Just thought I'd verify with you before I start investigating what could be going wrong
This would happen if you have older version Azure function tools for VS, it is trying to execute the 32 bit version of CLI (func.dll) with the 64 bit version of dotnet.exe.
Updating the Azure functions tools for visual studio would fix the issue. Please do the following to fix issue.
Tools -> Extension and Updates -> Updates (on the side bar) -> Select "Azure Functions and Web Jobs Tools" -> Click update
Related information here
See whether this SO thread is related.
thanks @JohnReeson your SO link helped to solve my problem. =>
Thank you @jeromekol @JohnReeson that solved it!
@soninaren My tools were at the latest version already @ 15.8.3047.0
The other fixes that @JohnReeson have suggested do work. Though I'm concerned about calling that "fixed" having to manually change something in appdata feels wrong. Maybe some further information about what that change is doing would help?
I'm also quite concerned about the upgrade program, such that an auto-upgrade completely breaks running of the app. What are the rollback strategies? I really want upgrades to be pushed out there but I'm sure, as others have felt, having a broken experience for several days is not good.
Closing old issue. Please open another one if you're still running into any issues.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
thanks @JohnReeson your SO link helped to solve my problem. =>