ardalis/modulith

Prefer csproj method for InternalsVisibleTo

Aperta

#55 aperta il 30 set 2024

 (0 commenti) (1 reazione) (0 assegnatari)C# (20 fork)github user discovery
enhancementgood first issuehelp wanted

Metriche repository

Star
 (184 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#internalsvisibleto

This way, you can skip the AssemblyInfo.cs creation.

Also, this might work:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <InternalsVisibleTo Include="$(AssemblyName).Tests" />
  </ItemGroup>
</Project>

Guida contributor