Is there a signed version of LinqPad that I could use in order to access internals of signed assemblies?
LinqPad access to internals of signed assemblies
1k Views Asked by Joao Silva At
2
There are 2 best solutions below
1
On
Extra information for those puzzled how to insert assembly attributes into AssemblyInfo.cs;
Visual Studio (tested 2022) generates MyProject.AssemblyInfo.cs from your MyProject.csproj file.
Add this to your MyProject.csproj:
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>LINQPadQuery</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
After a rebuild, the MyProject.AssemblyInfo.cs, found in the obj directory, now contains below line:
...
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("LINQPadQuery")]
...
Yes. In LINQPad, go to: Edit, Preferences... and then the Advanced tab, and change the following setting:
And then (as it says in the screenshot) add the following to your project's
AssemblyInfo.cs: