Visual Studio 2017 and the new .csproj InternalsVisibleTo

后端 未结 2 420
刺人心
刺人心 2020-12-13 11:56

Where do I put InternalsVisibleTo from AssemblyInfo in the new Visual Studio 2017 .csproj project file?

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-13 12:50

    To clarify Hans Passant's comment above, you simply have to add InternalsVisibleTo to any cs file in your project. For example, I created an AssemblyInfo.cs file in the root of the project and then added the following content (only):

    using System.Runtime.CompilerServices;
    
    [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=")]
    

提交回复
热议问题