www.skelta.com
Home      Members   Calendar   Who's On

Welcome Guest ( Login | Register )
      

Home » BPM.NET 2007/Sharepoint Accelerator 2007 » BPM.NET 2007/Sharepoint Accelerator 2007 » Application Development » Could not find file or assembly error


Could not find file or assembly errorExpand / Collapse
Author
Message
Posted Tuesday, March 11, 2008
Senior Member

Senior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior Member

Group: Forum Members
Last Login: Friday, March 14, 2008
Posts: 9, Visits: 26
For the "Update" to run on the Script Action Code editor without getting an error, I had to enter the Reference to my new C#.NET DLL as follows:

References             Assembly Path

SkeltaScript1         C:\\dev\\SkeltaWF\\SkeltaScript1\\bin\\Debug\\

Yes that is double-slashes, and yes that trailing double slash is required.

The Code editor validates that ref, and validates the Class and Function its calling, so all seems fine.  

The script code is trivial:

SkeltaScript1.SkeltaScript1 loSkeltaScript1 = new SkeltaScript1.SkeltaScript1();
loSkeltaScript1.LocalLog("Called from WFLaunch Script1");
return "";

However, at runtime, I get the error (in the Skelta Logger Console):  (Unforntunatly it doesn't show the Path its trying to open):  (I also tried running it from an unrelated .NET project and it ran fine).

! - Error while running the Action or Handling the event- Script1 for ExecutionD
etailsID=63, - Exception has been thrown by the target of an invocation., Inner
Exception :Could not load file or assembly 'SkeltaScript1, Version=1.0.0.0, Cult
ure=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot
find the file specified., ApplicationName - SkeltaEvalRepo2, WorkflowName - WFLa
uncher, ExecutionId - 31, ExecutionDetailsId - 63, Module - C:\WINDOWS\assembly\
GAC_MSIL\Workflow.NET.NET2\3.5.0.0__c932f724c984e915\Workflow.NET.NET2.dll, File
Name - RunTime.cs, Source -    at Workflow.NET.PropertyTypes.PropertyMemo.x48be1
481a42c19e3(Int32 x99bbe3a0831cff64, Int32 x8e463abe161afc8c, Context _x0f7b23d1
c393aed9, Action xab8fe3cd8c5556fb, String x04c44b8a1c5eaf5e)
   at Workflow.NET.ActionHandler.ScriptHandler.Run(Int32 ExecutionID, Int32 Exec
utionDetailsId, Context CurrentContext, Action CurrentAction, String InlinkOutpu
t, Boolean Retry, String& Output)
   at Workflow.NET.Engine.RunTime.PerformActionThread(Object Params), pauyoupc3,
 Process - WFEngine.NET2, 3/11/2008 4:54:07 PM
Post #651
Posted Tuesday, March 11, 2008
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Thursday, July 31, 2008
Posts: 145, Visits: 619

Hi,

 

The Script-Activity executes the Run method. Hope the code is written within Run method. When you give assembly path you need to include the name of assembly also.

E.g. C:\\dev\\SkeltaWF\\SkeltaScript1\\bin\\Debug\\ SkeltaScript1.dll

 

Hope this helps.

Regards,

BiNo

Post #653
Posted Wednesday, March 12, 2008
Senior Member

Senior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior Member

Group: Forum Members
Last Login: Friday, March 14, 2008
Posts: 9, Visits: 26
I understand about the Run function, I had wired that in first, but then tried a simpler one in case that was the problem.

When I add the dll name to the end of the Assembly Reference:

C:\\dev\\SkeltaWf\\SkeltaScript1\\bin\\Debug\\SkeltaScript1.dll

When I click "Update" in the "Code" window, it gives me the error:

Metadata file c:\dev\SkeltaWf\SkeltaScript1\bin\Debug\SketaScript1.dllSkeltaScript1.dll could not be found- Line Number = 0

And it won't save any code changes.  It also will not "Publish" nor "Validate" when its entered that way, I get roughly the same error.

Which is how I came to the conclusion that the Assmebly Reference did NOT want the dll file name, just the Path.

However, I tried leaving the "References" column blank - and it accepts that.

After publish, I still get this error when running that workflow:

i - **** Error while executing GetProcessedValue : System.Reflection.TargetInvoc
ationException: Exception has been thrown by the target of an invocation. ---> S
ystem.IO.FileNotFoundException: Could not load file or assembly 'SkeltaScript1,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencie
s. The system cannot find the file specified.
File name: 'SkeltaScript1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
'
   at Script1.Run(Int32 ExecutionId, Int32 ExecutionDetailsId, Context ctx, Acti
on action, String inlink)

Post #654
Posted Sunday, March 16, 2008
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Wednesday, June 04, 2008
Posts: 131, Visits: 423
Hi,
Sorry for the delayed response. We were able to replicate this scenario. The team is working on the fix.

For calling components outside skelta and also to do complicated operations it's recommend to use Custom Activity.

regards,

Moderator
Post #657
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
-
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.

All times are GMT -5:00, Time now is 5:02pm

 
Execution: 0.141.16 queries.Compression Enabled.

Copyright © 2002 - 2007 Skelta Software. All rights reserved. Tel: 1 (703) 229-6732 | Email:sales@skelta.com
Skelta - A BPM Workflow Software Company