Reputation: 876
Is there a signed version of LinqPad that I could use in order to access internals of signed assemblies?
Upvotes: 9
Views: 1074
Reputation: 131
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")]
...
Upvotes: 0
Reputation: 52798
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
:
[assembly: InternalsVisibleTo("LINQPadQuery")]
Upvotes: 12