Skip to content

Winform程序集子文件夹使用

约 107 字小于 1 分钟

winform

2023-08-24

当项目引用的程序集过多的时候,可以使用配置子文件夹的方式,让项目结构更清晰

App.config中配置

<configuration> 
	<runtime> 
		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
			<probing privatePath="bin;bin2\subbin;bin3"/> 
			<probing privatePath="pay"/> 
		</assemblyBinding> 
	</runtime>
</configuration>
  • [!] 在 privatePath 中指定的目录必须是应用程序基目录的子目录。