Skip to content

Conversation

@andreasohlund
Copy link
Member

@andreasohlund andreasohlund commented Mar 30, 2023

To avoid

"System.Exception: 'Could not load '[C:\Users\XXXX\AppData\Local\AzureFunctionsTools\Releases\4.35.0\cli_x64\Azure.Security.KeyVault.Secrets.dll'.](file:///C:/Users/XXXX/AppData/Local/AzureFunctionsTools/Releases/4.35.0/cli_x64/Azure.Security.KeyVault.Secrets.dll'.) Consider excluding that assembly from the scanning.'"

Workaround

Manually exclude the problematic assemblies using:

public override void Configure(IFunctionsHostBuilder functionsHostBuilder)
{
    functionsHostBuilder.UseNServiceBus(endpointConfiguration =>
    {
        endpointConfiguration.AdvancedConfiguration.AssemblyScanner()
                .ExcludeAssemblies("Azure.Security.KeyVault.Secrets.dll");
    });
}

@andreasohlund andreasohlund enabled auto-merge (squash) March 30, 2023 06:37
@andreasohlund andreasohlund self-assigned this Mar 30, 2023
@andreasohlund andreasohlund added this to the 4.2 milestone Mar 30, 2023
@andreasohlund andreasohlund merged commit a03fe1d into master Mar 30, 2023
@andreasohlund andreasohlund deleted the excludes branch March 30, 2023 06:50
@andreasohlund andreasohlund changed the title Exclude Azure.Security.KeyVault.Secrets from scanning Exclude Azure.Security.KeyVault.Secrets from assembly scanning Apr 3, 2023
@andreasohlund andreasohlund modified the milestones: 4.2, 4.1.1 Apr 3, 2023
@andreasohlund andreasohlund changed the title Exclude Azure.Security.KeyVault.Secrets from assembly scanning Azure.Security.KeyVault.Secrets causes assembly scanning failure Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants