.net core 提前加载程序集

 

Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute
  <ItemGroup>
    <AssemblyAttribute Include="Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute">
      <_Parameter1>Adnc.Demo.Usr.Application</_Parameter1>
    </AssemblyAttribute>
  </ItemGroup>

  

测试 

  string appname = "Adnc.Demo.Usr.Api";
  Assembly assembly2 = Assembly.Load(new AssemblyName(appname));
  var array = assembly2.GetCustomAttributes<ApplicationPartAttribute>();

  

.NET Core Web APi类库内嵌运行的方法_实用技巧_脚本之家 (jb51.net)

 

 

posted on 2024-08-26 19:38  是水饺不是水饺  阅读(30)  评论(0)    收藏  举报

导航