Using DotNet System.IO.Path in 2009 R2 Classic Client?

rorrison
Member Posts: 12
I read a blog post recently about using .NET in NAV (which, unfortunately, I can't find now). In it the author explained how easy it was to use .NET by creating a variable of type DotNet. The example he gave was using System.IO.Path to combine a directory and filename to get a full path without worrying about the presence or absence of a backslash in between. System.IO.Path also has some functions that I'd like to use now to split a path into directory and filename parts. However, NAV 2009 R2 is not listing System.IO.Path as an available assembly.
What I've done is create a global variable, of type DotNet, drill down on the Subtype, then drill down on the Assembly. I've got a long list of assemblies on the .NET tab, including System.IO.Log, but not System.IO.Path. I have Microsoft .NET framework 4.5.1 installed on my computer (though the original article said that System.IO.Path should be included by default in Windows 7).
What am I missing? How can I create a System.IO.Path variable?
Thanks,
Randy
What I've done is create a global variable, of type DotNet, drill down on the Subtype, then drill down on the Assembly. I've got a long list of assemblies on the .NET tab, including System.IO.Log, but not System.IO.Path. I have Microsoft .NET framework 4.5.1 installed on my computer (though the original article said that System.IO.Path should be included by default in Windows 7).
What am I missing? How can I create a System.IO.Path variable?
Thanks,
Randy
0
Answers
-
I found the article: http://www.v-kwadraat.be/programming/getting-started-with-nav-and-net-interop-part-1/. Part 2 is due soon - perhaps that will help.0
-
You cannot work with .NET in the Classic Client.
But here the way to get the assembly name for a .NET class of the standard framework:
- Search in the MSDN for the class you want to use (http://msdn.microsoft.com/en-us/library ... .file.aspx)
- Select the Framework Version you want to use (.NET 2 .. 4.5)
- Look for the Assembly, in this case: mscorlib (in mscorlib.dll)
- Search in the list of assemblies in NAV for the given name1 -
Thanks - I'm stuck with the Classic Client for now, so I guess I'm just out of luck.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions