c# - FileNotFoundException was unhandled - But the file is there -


i'm struggling this. wpf app, in debug/release works fine. after publish it, via installshield express, runtime exception , program crashes.

when program crashes, can choose debug program in visual studio, breaks in relaycommand looks like

public class relaycommand : icommand {     public action<object> _execute;      public relaycommand(action<object> execute)     {         this._execute = execute;     }      public bool canexecute(object parameter)     {         return true;     }      public event eventhandler canexecutechanged;      public void execute(object parameter)     {         this._execute(parameter); // breakpoint     } } 

the error message is

filenotfoundexception unhandled
not load file or assembly 'taskscheduler, version=1.0.0.0, culture=neutral, publickeytoken=null' or 1 of dependencies. system cannot find file specified

i'm lost why is. have other commands on page, , set in following manner

   public icommand savescheduledtaskcommand { get; set; }    public icommand openfilecommand { get; set; }      #region constructor      public myapp()     {         openfilecommand = new relaycommand(new action<object>(openfile)));         scheduledtaskcommand = new relaycommand(new action<object>(savescheduledtask));     }      #endregion      private void openfile(object o)     {         messagebox.show("of"); //works fine     }          private void savescheduledtask(object o)     {         messagebox.show("ts"); //never shows         taskscheduler ts = new taskscheulder();         //more code     }     

i guess issue taskscheduler.dll (based upon error message) but, .dll exists in installed folder (under c:\program files\compamy\myapp)...

i don't think matters but, taskscheduler.dll saved outside of project (it saved on desktop) assume not relevant installer take copy of , save program files folder way?

i used installshield express create installer , other this, works fine. 3rd party dll, xceed, , work fine in app.

i'm totally lost can can't see how can fix code! why can't application "see" dll?

since taskscheduler included because missing include assembly referenced taskscheduler.dll.

debug step 1
inspect dependencies of taskscheduler.dll , make sure include dependencies in installation package (except framework assemblies).

debug step 2
if cannot inspect dependencies of taskscheduler.dll follow guide, how enable assembly bind failure logging (fusion) in .net, find out assemblies missing.


Comments

Popular posts from this blog

Regex find and replace between <div class="customclass"> and </div> tag -

frame rate - JAVA simple fps animation(how can i work with?) -