AzureFunctionsOpenIDConnectAuthSample icon indicating copy to clipboard operation
AzureFunctionsOpenIDConnectAuthSample copied to clipboard

Use `FunctionsPreservedDependencies` to resolve "Could not load file or assembly" errors

Open bryanknox opened this issue 4 years ago • 2 comments

Use FunctionsPreservedDependencies instead of _FunctionsSkipCleanOutput to resolve "Could not load file or assembly" errors.

For some info about FunctionsPreservedDependencies, see: https://docs.microsoft.com/en-us/azure/azure-functions/functions-develop-vs#configure-your-build-output-settings

This approach is a possible means to address Issue: #27

bryanknox avatar Jul 18 '21 20:07 bryanknox

I'm not sure I like FunctionsPreservedDependencies better than _FunctionsSkipCleanOutput.

  • FunctionsPreservedDependencies is (minimally) documented.
  • _FunctionsSkipCleanOutput is not documented, but was recommended before FunctionsPreservedDependencies became available in Microsoft.NET.Sdk.Functions 3.0.12.
  • Hunting down the assembly names to list in FunctionsPreservedDependencies elements is time consuming, and will have to be updated as the assemblies used by the functions run-time or function app change.
    • I had to run tests on the SampleFunctionApp in multiple scenarios in order to discover the assembly names that needed FunctionsPreservedDependencies elements.

bryanknox avatar Jul 18 '21 20:07 bryanknox

See my summary and guidance notes in my comment in #27

bryanknox avatar Aug 14 '21 21:08 bryanknox

Closing this PR without changes. The issue is not something that is going to be fixed. And in-process functions will be retired with .NET 6 or 8.

See my blog post: _FunctionsSkipCleanOutput and FunctionsPreservedDependencies.

bryanknox avatar Jan 17 '24 01:01 bryanknox

And in-process functions will be retired with .NET 6 or 8.

Not until .NET 9. Still supported with .NET 8.

SeanFeldman avatar Jan 17 '24 04:01 SeanFeldman

To clarify , " .NET 8 to be the last LTS release to receive in-process model support in Azure Functions." That's from .NET on Azure Functions – August 2023 roadmap update

End of support for .NET 8 is November 10, 2026, as per .NET and .NET Core Support Policy

bryanknox avatar Jan 17 '24 20:01 bryanknox