使用一键安装

时间:2016-03-15 11:21:42

标签: c# .net dll reference publish

会发生什么?

过去一周我一直在讨论这个问题,我觉得我每天都越来越接近,但不能指责它是什么。

我购买了名为“Streamcoders”的第三方程序许可证(允许您对实时流进行编码)。安装此程序时,它会为您(据我所知)提供x86和x64版本的两个.dll的' MediaBase '和' MediaSuite ”。我已将x86版本添加到我的参考文献中,因为这是我需要的版本。

这些dll的属性是:

  • Embed Interop Types = false.
  • Copy Local = true.
  • Aliases = global.
  • Specific Version = false.

所以我去发布我的应用程序。我指定位置,然后指定我希望用户从网站安装应用程序。一切正常,应用程序已安装。

我转到客户端计算机并安装应用程序,我收到错误:

System.IO.FileNotFoundException: Could not load file or assembly 'MediaSuite.dll' or one of its dependencies. The specified module could not be found.

我的测试+代码

因此,在查看我的代码时,我尝试将MessageBox.Show("");添加到错误发生位置。

因此,在我的登录页面构造函数中,我调用方法CheckUserRegistry()

        try
        {
            if (Registry.GetValue("HKEY_CURRENT_USER", "URL", "").ToString() == string.Empty)
            {
                //User has not used the application before.
                MessageBox.Show("NO URL FOUND");
                return false;
            }
            else
            {
                MessageBox.Show("GENERATE");
                //User has used the application before and is generating that user a session GUID.
                Global.podiaClient = new podiaPublish.PublishClient();
                Global.podiaClient.Endpoint.Address = new System.ServiceModel.EndpointAddress(string.Format(Registry.GetValue("HKEY_CURRENT_USER", "URL", "").ToString() + "/wcf/publish.svc"));
                //Global.podiaSession = Global.podiaClient.Login(Registry.GetValue("HKEY_CURRENT_USER", "UID", "").ToString(), Global.Decrypt(Registry.GetValue("HKEY_CURRENT_USER", "PWD", "").ToString()));
                Global.podiaSession = Global.podiaClient.Login(Registry.GetValue("HKEY_CURRENT_USER", "UID", "").ToString(), Registry.GetValue("HKEY_CURRENT_USER", "PWD", "").ToString());


                return true;
            }
        }
        catch (Exception ex)
        {

            //Global.HandleError(ex);
            MessageBox.Show("here");
            MessageBox.Show(ex.InnerException.ToString());
            return false;
        }

它成功点击MessageBox.Show("GENERATE");,之后似乎点击catch并显示错误。

如果我注释掉下面的代码行没有错误。 podiaPublish是我项目中的服务参考。

Global.podiaClient = new podiaPublish.PublishClient();
Global.podiaClient.Endpoint.Address = new System.ServiceModel.EndpointAddress(string.Format(Registry.GetValue("HKEY_CURRENT_USER", "URL", "").ToString() + "/wcf/publish.svc"));
Global.podiaSession = Global.podiaClient.Login(Registry.GetValue("HKEY_CURRENT_USER", "UID", "").ToString(), Registry.GetValue("HKEY_CURRENT_USER", "PWD", "").ToString());

有没有人知道发生了什么?

0 个答案:

没有答案