none
Where to put CFRONT.dll serverside (not referenced but needed)

    질문

  • Hi,

    i'm just testing out LS and currently trying to do some simple tasks in our (old) native Navision Database via CFRONT. I succesfully referenced CFRONTDOTNET and my own .dll with a couple of tools i need.

     

    However, in Order to use CFRONT it does not only need the referenced .dll but also the CFRONT.dll (or CFRONTSQL.dll), which i usually just add to the applications root directory in vb.net. Just adding them to the ServerProject while in Fileview in Lightswitch obviously isn't enough (-;

     

    Where do i have to put these files to access them serverside? As far as i know i don't have the ability to specify a custom path to those .dlls (at least cfrontdotnet.navisionpath=xxx didn't work").

     

    This is the error message:

    The Navision CFront initialization failed, Please verify that Cfront.dll/CFrontsql.dll are available and located in the directory where the application is started.


    2012년 1월 9일 월요일 오후 12:10

답변

  • well that was easy (-; it just has to be placed in the root \debug\ directory. - i'm pretty sure i tested that though. Maybe it got mixed up with another problem.

    Anyways i simply let the server spit out a messagebox with:

     

    System.IO.Directory.GetCurrentDirectory()

     

    to find it out.

    • 답변으로 표시됨 2012년 1월 13일 금요일 오전 8:47
    2012년 1월 13일 금요일 오전 8:47

모든 응답

  • I'm not familiar with Navision, & how it works. But to me it looks like the DLL that you've referemced is looking for the other DLL's & can't find them.

    I'd suggest maybe adding a reference to each of them as well (in the Server project). That *should* then copy them to the same place as the original DLL.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    If you find a reply helpful, please click "Vote as Helpful", if a reply answers your question, please click "Mark as Answer"
     
    By doing this you'll help people find answers faster.
    2012년 1월 10일 화요일 오전 1:06
    중재자
  • I'm not familiar with Navision, & how it works. But to me it looks like the DLL that you've referemced is looking for the other DLL's & can't find them.
    


    Exactly.

     

    I'd suggest maybe adding a reference to each of them as well (in the Server project). That *should* then copy them to the same place as the original DLL.
    

     

    I tried that, unfortunatly the additional .dlls are not a valid Assembly / COM component... therefore they cant be added as a reference.

     

    2012년 1월 10일 화요일 오전 8:01
  • "Just adding them to the ServerProject while in Fileview in Lightswitch obviously isn't enough"

    Did you try setting the "Build Action" to "Content", and the "Copy to Output" to "Copy Always"?


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    If you find a reply helpful, please click "Vote as Helpful", if a reply answers your question, please click "Mark as Answer"
     
    By doing this you'll help people find answers faster.
    2012년 1월 10일 화요일 오전 10:29
    중재자
  • I really appreciate your help!

     

    Actually i did (it was set to only copy if newer though...) without success.

    The Question is, does the "server" even have an actual "Startuppath"? I'm fairly new to lightswitch - but isn't the server 'hosted' somehow rather that running out of any of the bin\debug\ Directories?

    2012년 1월 10일 화요일 오전 10:52
  • You're welcome. I'm a little embarrassed that I'm not being much help.

    Have you tried the same thing in the ServerGenerated project?


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    If you find a reply helpful, please click "Vote as Helpful", if a reply answers your question, please click "Mark as Answer"
     
    By doing this you'll help people find answers faster.
    2012년 1월 10일 화요일 오전 11:30
    중재자
  • well that was easy (-; it just has to be placed in the root \debug\ directory. - i'm pretty sure i tested that though. Maybe it got mixed up with another problem.

    Anyways i simply let the server spit out a messagebox with:

     

    System.IO.Directory.GetCurrentDirectory()

     

    to find it out.

    • 답변으로 표시됨 2012년 1월 13일 금요일 오전 8:47
    2012년 1월 13일 금요일 오전 8:47
  • Glad you got it sorted.
    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    If you find a reply helpful, please click "Vote as Helpful", if a reply answers your question, please click "Mark as Answer"
     
    By doing this you'll help people find answers faster.
    2012년 1월 13일 금요일 오후 12:15
    중재자