Posted 11/10/2024

Visible internal classes from diferent project

To be able see internal classes you have to add this code to source project .csproj file, fill _Parameter1 attribute with destination project name:

	<ItemGroup>
		<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
			<_Parameter1>fill with destination project name</_Parameter1>
		</AssemblyAttribute>
	</ItemGroup>

Example

File.Core.csproj:

	<ItemGroup>
		<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
			<_Parameter1>File.Core.UnitTests</_Parameter1>
		</AssemblyAttribute>
	</ItemGroup>

File.Core.UnitTests is destination project name. See real project.