ardalis/modulith

Prefer csproj method for InternalsVisibleTo

Open

#55 opened on Sep 30, 2024

View on GitHub
 (0 comments) (1 reaction) (0 assignees)C# (20 forks)github user discovery
enhancementgood first issuehelp wanted

Repository metrics

Stars
 (184 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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>

Contributor guide