Define InternalsVisibleTo "attributes" in the csproj file
See original GitHub issueMany of the AssemblyInfo.cs file’s content are already generated from the project file, meaning in many (or more like most) cases we don’t need to have an AssemblyInfo.cs file in our projects.
There is one quite frequently used assembly level attribute though that still has to be defined as a traditional attribute - the InternalsVisibleToAttribute
.
It would be nice if this could also be defined from the project file, which would also mean we could easily define it in a solution level props file, enabling all projects implicitly to see their internal
s from the test project(s).
Issue Analytics
- State:
- Created 5 years ago
- Reactions:13
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Declaring InternalsVisibleTo in the csproj
A convention is to declare assembly attribute in the file AssemblyInfo.cs . With the new SDK-based project, there is no AssemblyInfo.cs by ...
Read more >Configure InternalsVisibleTo from csproj
Specifies that types that are ordinarily visible only within the current assembly are visible to a specified assembly. and for more detail follow...
Read more >Visual Studio 2017 and the new .csproj InternalsVisibleTo
The attributes are now auto-generated at build time from the Project > Properties > Package settings. That means you can now add this...
Read more >InternalsVisibleToAttribute Class (System.Runtime. ...
Specifies that types that are ordinarily visible only within the current assembly are visible to a specified assembly.
Read more >Declaring InternalsVisibleTo in a csproj file - Matthew King
A quick overview of how to declare InternalsVisibleTo in a csproj file. ... the InternalsVisibleTo attribute in the AssemblyInfo.cs file.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed by #3439
@Pilchie thanks for the feedback. Found another workaround on SO in the meantime here https://stackoverflow.com/a/49978185/2242485