Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 22
    This should be the top answer imo. All the other answers are very outdated as .net is moving away from assembly info and moving the functionality into csproj definitions. Commented May 17, 2020 at 15:54
  • This approach won't work in a Unity project, as the csproj files are rebuilt by Unity. In this case the accepted answer is the way to go. Commented Jan 10, 2022 at 11:43
  • 2
    Very good answer tbh! It's way cleaner than having to add this AssemblyInfo file. Commented Feb 6, 2022 at 12:50
  • 12
    Nice, but already outdated. Use <InternalsVisibleTo> instead, as described in ihebiheb's answer. Commented Feb 23, 2023 at 13:34
  • This did not work for me with .NET Framework 4.8. But the @EricSchaefer answer using AssemblyInfo.cs did work. Commented Jun 22, 2023 at 17:32