解决办法:
1. 如果是用Visual Studio .NET,在预生成事件命令行中键入:
copy /y "$(ProjectDir)App.config" "$(TargetPath).config"
copy /y "$(ProjectDir)hibernate.cfg.xml" "hibernate.cfg.xml"
copy /y "$(ProjectDir)hibernate.cfg.xml" "hibernate.cfg.xml"
最后的样式就是 yourassembly.dll.config