Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

project.json Equivalent of InternalsVisibleTo

.Net Core's project.json allows configuration of various assembly properties (e.g. title, version, copyright) that a traditional .Net application would define using attributes typically placed in AssemblyInfo.cs (e.g. AssemblyTitle, AssemblyCopyright, AssemblyVersion). However, one assembly property I haven't figured out how to set in project.json is InternalsVisibleTo.

Is there a way to use project.json to indicate that another assembly should have internal visibility into the current project?

like image 500
Ben Gribaudo Avatar asked Oct 27 '16 13:10

Ben Gribaudo


1 Answers

No - just put it in AssemblyInfo.cs as normal. That's still a perfectly fine place to put assembly attributes. If one isn't created for you in the template you're using, just create your own AssemblyInfo.cs file (or any other name, of course). You can put the assembly attributes wherever you want, basically.

like image 64
Jon Skeet Avatar answered Oct 06 '22 09:10

Jon Skeet