In C/Front for Microsoft Dynamics NAV Version 5 SP1, it is no longer possible to initialise it in the usual way from Visual Basic. Often you would initialise C/Front like this:
Dim CFR As Microsoft.Navision.CFront.CFrontDotNet
CFR = New Microsoft.Navision.CFront.CFrontDotNet
But with SP1, this syntax will give you the following error in Visual Studio:
Error 1 'Microsoft.Navision.CFront.CFrontDotNet.Private Sub New()' is not accessible in this context because it is 'Private'.
This way to initialise C/Front was removed because there were various problems (mainly with memory corruption) when disposing C/Front. So to stabilise it, the public constructor of CFrontDotNet was removed. Now, initialise it like this instead:
CFR As Microsoft.Navision.CFront.CFrontDotNet
CFR = Microsoft.Navision.CFront.CFrontDotNet.Instance
i.e. don't use "New", and add ".Instance". The functionality remains unchanged.
Lars Lohndorf-Larsen (Lohndorf)
Microsoft Dynamics UK