2014-10-29 128 views
1

嗨,我有以下錯誤,當我運行一個.net應用程序難度運行.NET MQ應用程序

D:\Program Files\AscentSS\AscentSV\Staging\SimplePut>SimplePut -q ESB.BAT1.SERVICES.KOFAX.DOC.METADATA -h 10.49.97.31 -p 1417 -l BLI1.KOFAX.CLIENT 
Start of SimplePut Application 

Exception caught: System.IO.FileNotFoundException: Could not load file or assembly 'amqmdnet, Version=7.5.0.1, Culture=neutral, publicKeyToken=dd3cb1c9aae9ec97' or one of its dependencies. The system cannot find the file specified. File name: 'amqmdnet, Version=7.5.0.1, Culture=neutral, PublicKeyToken=dd3cb1c9aae9ec97' 
    at SimplePut.SimplePut.PutMessages() 
    at SimplePut.SimplePut.Main(String[] args) in C:\Users\youngj\Documents\Visual Studio 2010\Projects\SimplePut\SimplePut.cs:line 102 

WRN: Assembly binding logging is turned OFF. 
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. 
Note: There is some performance penalty associated with assembly bind failure logging. 
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 

Sample execution FAILED! 

End of SimplePut Application 

然而,同樣的公共令牌文件確實存在:

D:\Program Files\IBM\WebSphere MQ\bin>"C:\Program Files\Microsoft SDKs\Windows\v 
7.0A\bin\sn" -T amqmdnet.dll 

Microsoft (R) .NET Framework Strong Name Utility Version 3.5.30729.1 
Copyright (c) Microsoft Corporation. All rights reserved. 

Public key token is dd3cb1c9aae9ec97 

有任何想法嗎?應用程序在x64 Win7上編譯。試圖在x32 Win2003服務器上運行它。謝謝。

+0

據透露,全7.5.0.1 MQ客戶端安裝。 – 2014-10-29 18:42:32

+0

嘗試將'amqmdnet.dll'複製到'system32'和'syswow64' – Hackerman 2014-10-29 18:44:40

回答

1

MQs .NET層不是一個DLL,它是其中的一些(amqmdxcs,amqmdnet,amqmdmsg等) - 特別是自7.0.1版本以來。您是否實際安裝了MQ服務器/客戶端軟件,或者您是否嘗試部署一個引用了MQ的應用程序,並期望它隨MQ部件一起部署?

嘗試在MQ產品正確安裝的計算機上運行您的代碼 - 如果7.1或更高版本,您需要將其設置爲主要(默認爲)以獲取在GAC中註冊的MQ部件,或者需要配置文件指向文件系統上的MQ dll。看一下Tools \ dotnet \ samples \ cs \ base,然後嘗試讓基本樣本先工作。

如果一切都失敗了,做什麼instructios告訴你,並啓用日誌記錄,看看它顯示了:-)