In this post, I’m going to explain to you how to make the internal components of a DotNet assembly visible to another one.
First steps.
- There are two different approaches to solve this. They’re the same, the only difference is where you will write the statement.
- You must have access to the project file that contains the internal components.
- You can’t make visible internals in an already compiled assembly.
- Furthermore, you must know the assembly name of the project that will use the internals.
AssemblyInfo.cs approach.
If you have the file «YourProject/Properties/AssemblyInfo.cs» available in your project, then you can add the next statement.
Csproj approach.
In SDK project files, you should add this statement in your project file. The compiler will add the InternalVisibleTo attribute when your solution is being built.
Últimas entradas de Gustavo Sánchez (ver todo)
- NVL in SQL Server - 2023-11-01
- ¿Que es Cake Build? - 2023-02-22
- #How to fix error: MSB4019: The imported project «Microsoft.Data.Tools.Schema.SqlTasks.targets» was not found - 2023-02-20