Skip to content

FunctionsPreservedDependencies doesn't preserve files #499

@NickSevens

Description

@NickSevens

I'm building an Azure Function app and have an issue where it fails to load System.IdentityModel.Tokens.Jwt.dll.

It seems the dll is removed due to the assembly cleaning process, which I can disable using <_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput> (this works as described)

However I read at https://docs.microsoft.com/en-us/azure/azure-functions/functions-develop-vs#configure-your-build-output-settings I could preserve a single dll using:

<ItemGroup>
    <FunctionsPreservedDependencies Include="System.IdentityModel.Tokens.Jwt.dll" />
</ItemGroup>

This doesn't seem to preserve the DLL however. I can see in the \bin\Debug\netcoreapp3.1\bin the DLL is indeed not available. It is available when _FunctionsSkipCleanOutput was used.

Environment:

Tool Version
Visual Studio Enterprise 16.8.4
Azure Functions and Web Jobs Tools 16.8.557.25636 (not sure if this is relevant?)
Azure Functions Core Tools 3.0.3284 (not sure if this is relevant?)
Azure Functions Runtime Version 3.0.15371.0 (not sure if this is relevant?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions