FreeAndNil commented on code in PR #306:
URL: https://github.com/apache/logging-log4net/pull/306#discussion_r3792555058


##########
src/log4net.Tests/log4net.Tests.csproj:
##########
@@ -19,6 +19,7 @@
     <VSTestLogger>quackers</VSTestLogger>
   </PropertyGroup>
   <ItemGroup>
+    <Compile Include="..\log4net\Util\CallerAssembly.cs" 
Link="Util\CallerAssembly.cs" />

Review Comment:
   Not an option here. log4net is strong-named (SignAssembly + log4net.snk), 
and the test assembly 
   intentionally is not. A strong-named assembly's InternalsVisibleTo has to 
name a strong-named friend and carry its full PublicKey - an unsigned friend 
assembly is rejected outright. So using InternalsVisibleTo would mean 
strong-naming the tests, which we don't want.
   
   Linking the source in is the established pattern in this repo for exactly 
this reason - log4net.Ext.Mail does the 
   same with Log4NetAssert and the Diagnostics/CodeAnalysis polyfills, and 
there is no InternalsVisibleTo anywhere in the tree.
   
   The identity observation is correct, though: the linked copy's Fallback 
resolves to the test assembly rather than to log4net. It doesn't affect what 
these tests assert - FallbackIsAvailable only checks it is non-null, and the 
frame test is about which assembly GetCallingAssembly reports, not which one 
Fallback names.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to