Nav 2013 With Framework 4

uri84uri84 Member Posts: 30
edited 2014-04-07 in NAV Three Tier
Hi, i have a problem and i don't know the reason as well...

i just start with Nav 2013 and i'm trying to do a code unit that call a .NET function from a WebService.

To do this i create New project with Framework 4.0 with visual Studio 2010 adding web reference, and then building the solution.

I put this DLL on Addin folder in nav70, and then i create the codeunit i do DotNet Var and i load the assembly without problems, the code compiles without problems but when i execute, show an error message.
The Message is... Cannot create an instance of the following .NET Framework object: assembly........

The question is... Nav 2013 Works with generated dll from Framework 4 and visual studio 2010 or must be generated with 4.5 framework and visual studio 2012??

Thanks!

Comments

  • Vincent_VancalberghVincent_Vancalbergh Member Posts: 10
    NAV 2013 can only use assemblies from .Net Framework 4.0 and lower.

    About the error: did you deploy it to your service's addin folder (if it's supposed to run on the server) or on the RTC's addin folder (if it's supposed to run on the client)?
    Senior Technical Consultant at Edan Business Solutions/Sphinx IT
    Owner of V-Kwadraat (see my blog about Programming and my feed about Gaming!)
  • uri84uri84 Member Posts: 30
    NAV 2013 can only use assemblies from .Net Framework 4.0 and lower.

    About the error: did you deploy it to your service's addin folder (if it's supposed to run on the server) or on the RTC's addin folder (if it's supposed to run on the client)?


    Hi,

    now is in the Client Folder, must be in service?
    anyones knows about any tutorial to create DLL for .NET functions and call it from C/AL NAV 2013?

    Thanks!
  • knaraharisknaraharis Member Posts: 4
    Hi, I am new to Navision and was trying a sample for .Net interoperability. I have followed all the steps and everything worked fine when i copied the .Net dll into services addin folder.

    But after a while when i wanted to update the code in dll and re deploy the new dll into the same folder. I am just unable to delete the file which says the file is open in Microsoft Dynamics Nav Server.

    I have tried closing all my client windows and Nav 2013 R2 development environment too but still I am unable to delete the file. I also tried to delete all the references to the code in dll in all my pages and still i was unable to delete the dll file.

    Can someone guide me in the right direction here.
  • beranberan Member, Microsoft Employee Posts: 80
    You have to close the dev environment, the clients and stop the Nav Server Service. That should be sufficient. You can actually leave the dev enverionment till you need to update the AL code where the used interfaces have changed.
    Eric Beran
    Software Design Engineer II
    Dynamics NAV Office 365
    Microsoft

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • knaraharisknaraharis Member Posts: 4
    Thank you, May be i need to try stopping the Nav service once. Actually the server on which i have been working now is a demonstration license. Will stopping and starting the service would make my license expire and force to reload a new license ?
  • aashish1206aashish1206 Member Posts: 4
    For me the issue is solved by closing the NAV RTC, Development environment application and reinstalling Data Director. Earlier DD was unable to created LS Retail Add Ins in RTC folder because RTC application was open while installing DD.
Sign In or Register to comment.