综合应用WPF/WCF/WF/LINQ之十七:关于简化发布新版本的步骤的问题

对于比较简单的项目,我们可以直接编译项目,然后将bin\Debug下面的文件Copy到发布目录即可。
  但对于比较复杂的项目,如加入了配置文件的项目,则不能这样做。这时要求发布目录下的文件除xbap、manifest文件之外,其它文件都以deploy后缀结尾。
  这时,如果仍用手工Copy的方式,就显得太过麻烦了。这种情况下,我们可以借助于bat文件来实现的。
    1 copy "..\Eallies.OA.UI\bin\Debug\Eallies.OA.Info.dll" "..\Eallies.OA.Web\Eallies.OA.Info.dll.deploy"
    2 copy "..\Eallies.OA.UI\bin\Debug\Eallies.OA.Info.Enum.dll" "..\Eallies.OA.Web\Eallies.OA.Info.Enum.dll.deploy"
    3 copy "..\Eallies.OA.UI\bin\Debug\Eallies.OA.Service.Contract.Fault.dll" "..\Eallies.OA.Web\Eallies.OA.Service.Contract.Fault.dll.deploy"
    4 copy "..\Eallies.OA.UI\bin\Debug\Eallies.OA.Service.Wrapper.dll" "..\Eallies.OA.Web\Eallies.OA.Service.Wrapper.dll.deploy"
    5 copy "..\Eallies.OA.UI\bin\Debug\Eallies.OA.UI.Controls.Common.dll" "..\Eallies.OA.Web\Eallies.OA.UI.Controls.Common.dll.deploy"
    6 copy "..\Eallies.OA.UI\bin\Debug\Eallies.OA.UI.Controls.Logical.dll" "..\Eallies.OA.Web\Eallies.OA.UI.Controls.Logical.dll.deploy"
    7 copy "..\Eallies.OA.UI\bin\Debug\Eallies.OA.UI.exe" "..\Eallies.OA.Web\Eallies.OA.UI.exe.deploy"
    8 copy "..\Eallies.OA.UI\bin\Debug\Eallies.OA.UI.exe.config" "..\Eallies.OA.Web\Eallies.OA.UI.exe.config.deploy"
    9 copy "..\Eallies.OA.UI\bin\Debug\Eallies.OA.UI.exe.manifest" "..\Eallies.OA.Web"
   10 copy "..\Eallies.OA.UI\bin\Debug\Eallies.OA.UI.xbap" "..\Eallies.OA.Web"
   11 copy "..\Eallies.OA.UI\bin\Debug\Eallies.OA.Utility.dll" "..\Eallies.OA.Web\Eallies.OA.Utility.dll.deploy"
   12 copy "..\Eallies.OA.UI\bin\Debug\Eallies.OA.Workflow.Service.Wrapper.dll" "..\Eallies.OA.Web\Eallies.OA.Workflow.Service.Wrapper.dll.deploy"
  这样一来,在没有增加新文件的情况下的新版本发布,就变得简单很多了:更改发布版本号,编译,运行bat文件。




本文转自 Eallies 51CTO博客,原文链接:http://blog.51cto.com/eallies/79025,如需转载请自行联系原作者
上一篇:javaweb连接mysql的两种方法


下一篇:大数据:食品安全的“补天石”