5 个共享同一报表程序集的 MVC Web 应用(5 次)


我有一个 IIS 站点,其中包含 5 个共享相同报表程序集的 MVC webApp.

WITHOUT 使用 GAC,有没有办法让我的所有 5 个 webApp 使用包含这些报表程序集的共享/公共 bin 文件夹,而无需我在每个 Web 应用程序的 bin 中都有 5 个程序集副本?
这些程序集通过 nuget 使用, 并将 Web 应用发布到我的部署管道中的文件夹。

>https://learn.microsoft.com/en-us/dotnet/framework/deployment/how-the-runtime-locates-assemblies 提示我在我的web.config中使用"探测路径"。我在此路径上添加了 webApp 的一个箱,并删除了生成管道中的重复程序集。

参见:https://learn.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/runtime/probing-element

例如

<configuration>  
<runtime>  
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
<probing privatePath="bin;bin2subbin;bin3"/>  
</assemblyBinding>  
</runtime>  
</configuration> 

最新更新