How does compilation to c# work "under the hood"

ta5
Member Posts: 1,164
Hi
I just try to sort out how the compilation to c# works under the hood.
I mean this:
When an object is stored with compilation in the database, what kind of processes then start to create the c# files for the service tier?
How do the files get to the directory of the service tier and does this also work if more than one service tier is installed for the same db?
Of course I know this is not basic know how but I hope to understand some things better...
Thanks in advance
Thomas
I just try to sort out how the compilation to c# works under the hood.
I mean this:
When an object is stored with compilation in the database, what kind of processes then start to create the c# files for the service tier?
How do the files get to the directory of the service tier and does this also work if more than one service tier is installed for the same db?
Of course I know this is not basic know how but I hope to understand some things better...
Thanks in advance
Thomas
0
Comments
-
When you edit your AL code with the Client, the Client will create the C# code and store it in a BLOB in the Object Metadata Table.
Next time the Service Tier needs that object it will pick up the new C# code - store it in the source folder and compile it into a module and load that.
So yes - it will work with multiple service tiers.
If you set the Debug flag in the service tier customsettings.config - then all the C# files will be written in this directory.
This is why Visual Studio can connect to the service tier process and you can set breakpoints in the code running on the service tier.
Hope that explained the basics.Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Wow, thanks a lot for the detailed explanation. =D>
Thomas0 -
I just checked and the objects are stored in plain text in cSharp. We can finally track objects changes automatically.0
-
Btw:
Where about is the source folder for the rtc and for the nst?0 -
you can export the blob field from Object Metadata table and you'll see the source code.
In order to see it in a folder, you need to change the config file to enable debug.
It then puts it in
the location in XP where c# is created is in a different folder. It's in
C:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server
For vista it puts it in another folder.
C:\ProgramData\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\
http://blogs.msdn.com/clausl/archive/20 ... -2009.aspx0 -
Where about is the source folder for the rtc and for the nst?Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Thanks for all your answers!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