NAV and C# integration

KeeperRUKeeperRU Member Posts: 58
Where Can I read about C# integration?
I read some articles, but without working examples - i cannot repeat that :(

I am looking for easy example:
1) Run from Navision some application on C# (some form with few buttons)
2) C# apllication return value to Navision

I am using Visual Studio 2010 Express

Comments

  • pawanppawanp Member Posts: 90
    You can try to write a Automation control. See here
  • KeeperRUKeeperRU Member Posts: 58
    I cannot register my own automation in system.

    I write .bat filte like:
    set regasm=%windir%\Microsoft.NET\Framework\v2.0.50727\regasm.exe
    set gacutil=C:\program files\Microsoft SDKs\Windows\v6.0a\bin\gacutil.exe
    
    %regasm% “myAutomation.dll” /tlb:myAutomation.tlb
    %gacutil% /i “myAutomation.dll”
    

    but it didn't work, because of errors...

    Is there any articles about automation register?
  • pawanppawanp Member Posts: 90
    Can you show the error that you are getting?
  • KeeperRUKeeperRU Member Posts: 58
    Thank you, I beat that problem.
    And already can return String from C# to Navision.

    But How open a form in C# from Nav? Is that possible?
    Nothing happened.
  • KeeperRUKeeperRU Member Posts: 58
    If it not possible to open form through Automation Server, maybe there are different variants?
  • KeeperRUKeeperRU Member Posts: 58
    I call method from Nav, that open Application Form on C#.
    And have that error:
    Message: Could not load file or assembly '........' or one of its dependencies. The system cannot find the file specified.

    My project consist of 2 .dll
    Maybe problem with that?

    How properly register them, so they find each other
  • KeeperRUKeeperRU Member Posts: 58
    Ok, I get it.
    In my code was 3 projects : 2 library class, windows form class.
    In our situation we can use only library classes, and I combine 2 classes in 1.

    Experiment is over.
    Unfortunately this is impossible to install .NET FRAMEWORK + Microsoft SDK
    on every computer working with NAV + properly register .dll on every computer.

    I wonder, how create solution and install it ONLY on Nav Server, so that solution may work on every Client Nav?

    In 3-tier it sounds reasonable, but I heard in Nav 2013 no more Automation??
Sign In or Register to comment.