Skip to content

Archloader.Build() throws exception if project file contains UserSecretsId-Attribute #398

Description

@SeEnglert

Reproduction steps:

  • Create a new Project
  • Add UserSecretsId attribute to the PropertyGroup. E.g.:
<PropertyGroup>
  ...
  <TargetFramework>net9.0</TargetFramework>
  <UserSecretsId>abcdefgh-ijkl-mnop-qrst-uvwxyz123456</UserSecretsId>
  <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
  ...
</PropertyGroup>
  • Execute "new ArchLoader().LoadAssemblies(assemblies.ToArray()).Build();" and pass the assembly with the UserSecretsId attribute into LoadAssemblies()
  • The execution of Build() fails and an exception is thrown:
    System.ArgumentException: 'Attribute type Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute is not an attribute.'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions