比较来自两台服务器的GAC? [英] Compare GACs from two servers?

查看:84
本文介绍了比较来自两台服务器的GAC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在BizTalk迁移期间,我需要一种简单且受信任的方法来比较两台服务器上的GAC(全局程序集缓存).如果目标服务器中不存在GAC,我也想将其从QA移至正式版.这些都是BizTalk服务器,并具有大量GAC组装的程序集.我在网上看到了一些工具,但是指向其中一个的链接已断开(winmerge),而其他工具似乎并不真实.感谢您的帮助.

解决方案

每当我需要在GAC中查找某些内容时,我总是只从Visual Studio中运行Gacutil.exe /l > c:/gac.txt(或者,如果没有,则运行Windows SDK)命令提示,然后在文本编辑器中搜索输出文件.您可以在两台计算机上都做到这一点,并使用超越比较之类的工具来比较两个GAC.除了比较"之外,还可以让您进行目录比较,因此(如果您遵循此答案的下一部分)可能比导出GAC中的内容列表更容易.

要导出程序集,您可以按照因为GACing通常还不够.

但是,如果您尚未准备好MSI文件,那么现在是制作它们的好时机.如果使本地GAC可浏览,则应该易于浏览并将程序集作为资源添加到所需的任何BizTalk应用程序中,然后将该应用程序导出为MSI文件,其中将包括该应用程序的所有资源.这样,您不必完全手动完成所有操作.

如果没有任何准备好将所有内容都部署到新服务器上(也有文档记录),这是一种很好的方法,可以在灾难来袭时或者仅需要添加另一台BizTalk服务器以进行负载平衡时陷入困境./p>

I need a easy and trusted way to compare GAC (Global Assembly Cache) from two servers, during BizTalk migration. I also want to move the GAC from QA to Production if it doesn't exist in the destination server. These are both BizTalk servers and have tons of assemblies GAC'd. I saw some tools online but the link to one was broken (winmerge) and others did not seem really authentic. Thanks for your help.

解决方案

Whenever I need to find something in the GAC, I always just run Gacutil.exe /l > c:/gac.txt from a Visual Studio (or, if that's not available, Windows SDK) command prompt, and then search the output file in a text editor. You could do that on both machines and use a tool like Beyond Compare to compare the contents of the two GACs. Beyond Compare also let's you do directory comparisons, so that may be easier (if you follow the next part of this answer) than exporting a listing of what's in the GAC.

To export assemblies, you can follow the instructions at http://blogs.msdn.com/b/johnwpowell/archive/2009/01/14/how-to-copy-an-assembly-from-the-gac.aspx to make the GAC behave like a normal Windows directory, enabling you to copy and paste the files that you need.

I will say, though, that the best option is to have your BizTalk assemblies in packaged MSI files that you can simply import into whatever BizTalk server you want (and then actually execute to GAC). This ensures that what you need is in the BizTalk database, because GACing is often not enough.

If you don't already have your MSI files ready to go, though, then now would be a good time to make them. If have made the local GAC browseable then it should be easy to browse to and add assemblies as a resource to whatever BizTalk application you want and to then export the application as an MSI file, which will include all of the application's resources. That way you don't have to do it all totally manually.

Not having everything ready to be deployed to a new server (and documented too) is a great way to find yourself stuck in a bind when a disaster strikes, or if you just need to add another BizTalk server for load balancing.

这篇关于比较来自两台服务器的GAC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆