1. My fault – the plugins does not exists in output
this should be added to the output in order to the plugins to be copied to the output directory
<ItemGroup>
<None Remove=”plugins\” />
<Content Include=”plugins\**\*.dll” CopyToOutputDirectory=”Always” />
</ItemGroup>
2. Deploying,I should see what it is convenient: context.FunctionDirectory OR context.FunctionAppDirectory
log.LogInformation($”!!! C# Timer trigger function executed at: {DateTime.Now} next {myTimer.FormatNextOccurrences(1)} “);
var folder = Path.Combine(context.FunctionDirectory,”plugins”);
log.LogInformation($”!!! Folder {folder} Folder exists: {Directory.Exists(folder)}”);folder = Path.Combine(context.FunctionAppDirectory,”plugins”);
log.LogInformation($”!!!Folder {folder} Folder exists: {Directory.Exists(folder)}”);
3. Plugins loading – missing dll’s
Because I work with Nate Mc Master Plugins,https://github.com/natemcmaster/DotNetCorePlugins,I encounter the error “ could not load file or assembly ‘System.Runtime.Loader,Version=4.1.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a
I was trying self-contained in building Azure – does not publish the file ‘System.Runtime.Loader . But the InfoValutarLoadingLibs/InfoValutarLoadingLibs.csproj it does!
Solution : publish self contained loading libs,build azure function,copy files from loading libs to azure function project
4. Now encountering this one:
https://github.com/Azure/Azure-Functions/issues/1250
Leave a Reply