How to use a custom attribute on an assembly in .NET Core 1.1

五迷三道 提交于 2019-12-04 03:26:28

You can always create a new AssemblyInfo.cs file or any other .cs file to do the same.

However you can also use the new auto-generated assembly info mechanism. You can add this to your csproj file, replace the value replacing the Include attributes value with the type name of your custom attribute:

<ItemGroup>
  <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
    <_Parameter1>DasMulli.Win32.ServiceUtils.Tests</_Parameter1>
  </AssemblyAttribute>
</ItemGroup>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!