The [StronglyTypedId] and [StronglyTypedIdDefaults] attributes are decorated with [Conditional], meaning they are stripped from the build output and won't be visible via runtime reflection.
To preserve these attributes in the build output, define the STRONGLY_TYPED_ID_USAGES MSBuild constant. Note: This creates a runtime dependency on StronglyTypedId.Attributes.dll, so you must ensure it is included in your build output (do not exclude compile or runtime assets).
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<!-- Define the MSBuild constant to preserve usages -->
<DefineConstants>STRONGLY_TYPED_ID_USAGES</DefineConstants>
</PropertyGroup>
<!-- Add the package -->
<PackageReference Include="StronglyTypedId" Version="1.0.0-beta08" PrivateAssets="all" />
</Project>