You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CS0281 InternalsVisibleTo mismatch in Authentication test builds #3561
Release CI builds that run without ESRP signing enabled fail with CS0281 errors when compiling the Authentication.Test project:
nFriend access was granted by 'Microsoft.Graph.Authentication, Version=2.36.1.0, Culture=neutral, PublicKeyToken=null', but the public key of the output assembly ('') does not match that specified by the InternalsVisibleTo attribute in the granting assembly. n
Root Cause
The InternalsVisibleTo attributes in both Authentication and Authentication.Core use #if DEBUG / #else to conditionally require a PublicKey in Release builds. This assumes Release always means signed, but some CI pipelines build in Release without-EnableSigning, causing a mismatch since neither assembly is strong-named.
Authentication: Remove the conditional entirely — this assembly is never delay-signed at compile time (CSProjHelper.ps1 doesn't modify Authentication.csproj).
Authentication.Core: Replace #if DEBUG with #if SIGNED_BUILD and define SIGNED_BUILD in the .csproj when SignAssembly=true, so the condition tracks actual signing state.
Activity
fix: resolve CS0281 InternalsVisibleTo signing mismatch in Authentica…
fix: resolve CS0281 InternalsVisibleTo signing mismatch in Authentica…
fix: resolve CS0281 InternalsVisibleTo signing mismatch in Authentica…