应用程序缺少必需的文件

时间:2015-06-22 16:51:27

标签: c# .net windows winforms sharpdevelop

错误图片:http://s23.postimg.org/7uj6qcxtn/9708083373e57a9ec91e4296e302f88e.png

  

无法下载应用程序。应用程序缺少必需的文件。联系应用程序供应商以获取帮助。

所以我正在使用SharpDevelop 5.2构建一个Windows窗体应用程序,我试图创建一个其他人可以在另一台机器上使用的独立/版本。在sharpdevelop(和视觉工作室2015RC),当调试程序运行正常并打开,一切正常,没有错误。但是每当我尝试运行它时,虽然/ bin / Debug /或/ bin / Release /中的文件都不起作用。

当我运行.exe时没有任何反应,没有窗口没有弹出窗口,当我运行.application文件时,我得到上面图片中的错误,细节给了我这个:

module ActionView::Helpers::ActiveModelInstanceTag
  def error_message_with_associations
    if @method_name.end_with?('_ids')
      # Check for a has_(and_belongs_to_)many association (these always use the _ids postfix field).
      association = object.class.reflect_on_association(@method_name.chomp('_ids').pluralize.to_sym)
    else
      # Check for a belongs_to association with method_name matching the foreign key column
      association = object.class.reflect_on_all_associations.find do |a|
        a.macro == :belongs_to && a.foreign_key == @method_name
      end
    end
    if association.present?
      object.errors[association.name] + error_message_without_associations
    else
      error_message_without_associations
    end
  end
  alias_method_chain :error_message, :associations
end

我的程序是在带有Windows窗体的C#中完成的,并不涉及任何在线组件或任何下载或更新它的网址,所以我想要做的就是制作任何人都可以运行的版本一台Windows机器。

我的机器是Windows 8.1

1 个答案:

答案 0 :(得分:1)

您的程序正在构建目录中查找compas.ico,而它可能位于项目的其他目录中。

相关问题