OS: Windows 10
Hello,
Have multiple versions of Dynamics NAV installed on the same machine in order to have a single entrypoint to all of our NAV-versions:
Dynamics NAV; 90 CU42, 100 CU3, 110 CU9, 110 CU13
Dynamics NAV Business Central; 140 CU0,140 CU5, 140 CU8
When I open "Nav Development Environment" (finsql) and the correct version of finsql matching the version of Nav I want to open and try to "design" a codeunit the application crashes with the following error messages:
Application: finsql.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ComponentModel.Composition.ChangeRejectedException
at Microsoft.Dynamics.Nav.Prod.CodeEditor.CompositionRoot.LoadComponents()
at Microsoft.Dynamics.Nav.Prod.CodeEditor.CompositionRoot <>c.<.cctor>b__72_0()
at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
.CreateValue()
at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.LazyInitValue()
at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.get_Value()
at Microsoft.Dynamics.Nav.Prod.CodeEditor.CodeViewModel..ctor()
at Microsoft.Dynamics.Nav.Prod.CodeEditor.CodeEditor..ctor(IntPtr)
at Microsoft.Dynamics.Nav.Prod.CodeEditor.CodeEditorFactory.CreateCodeEditor(IntPtr)
at <Module>.CreateCodeEditor(Void*)
at <Module>._WinMainCRTStartup()
Faulting application name: finsql.exe, version: 11.0.24232.0, time stamp: 0x5b883a31
Faulting module name: KERNELBASE.dll, version: 10.0.14393.3564, time stamp: 0x5e5f4b25
Exception code: 0xe0434352
Fault offset: 0x000dc232
Faulting process id: 0x894
Faulting application start time: 0x01d5fcf51c13dcbb
Faulting application path: C:\Program Files (x86)\Microsoft Dynamics NAV\110 CU9\RoleTailored Client\finsql.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: 9b63bf4f-d767-479a-b14c-89e38fd100b7
Faulting package full name:
Faulting package-relative application ID:
I can "run" a table just fine but as soon as I try to "edit" a codeunit then the Nav Development Environment-application crashes.
What I've tried:
* Registered DLLs as per this website:
https://dynamicsuser.net/nav/b/peik/posts/running-and-debugging-in-all-dynamics-nav-clients-on-the-same-machine
C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /register "C:\Program Files (x86)\Microsoft Dynamics NAV\90\RoleTailored Client\Microsoft.Dynamics.Nav.Client.WinForms.dll" /tlb C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /register "C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client\Microsoft.Dynamics.Nav.Client.WinForms.dll" /tlb C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /register "C:\Program Files (x86)\Microsoft Dynamics NAV\110\RoleTailored Client\Microsoft.Dynamics.Nav.Client.WinForms.dll" /tlb C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /register "C:\Program Files (x86)\Microsoft Dynamics NAV\110 CU9\RoleTailored Client\Microsoft.Dynamics.Nav.Client.WinForms.dll" /tlb C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /register "C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\140\RoleTailored Client\Microsoft.Dynamics.Nav.Client.WinForms.dll" /tlb C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /register "C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\140 CU5\RoleTailored Client\Microsoft.Dynamics.Nav.Client.WinForms.dll" /tlb C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /register "C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\140 CU8\RoleTailored Client\Microsoft.Dynamics.Nav.Client.WinForms.dll" /tlb
* Renamed "Microsoft.Dynamics.Nav.Client.exe.config" to "Microsoft.Dynamics.Nav.Client.exe.config_old" and tried with finsql again, no change
* Deleted "C:\Users\<my-user>\AppData\Roaming\Microsoft\Microsoft Dynamics NAV\PersonalizationStore.xml" and tried with finsql again, no change
* Ran "sfc /scannow" and restarted my computer and tried with finsql again, no change
* Removed the "110 CU9"-folder and downloaded "110 CU9" again and extracted the folder to make sure the folder / files haven't been corrupted and tried with finsql again, no change:
Anyone who have had the same issue and if so how did you sort it?
Found this so it seems to be an old issue [GERMAN, use Google Translate
http://www.msdynamics.de/viewtopic.php?f=78&t=35406
Krgds - CloudViking86
Update:
I found this article:
https://www.archerpoint.com/blog/Posts/correcting-issue-microsoft-business-central-developer-environment-crashing
Writing the answer here as well for posterity:
Start NavDevEnv (finsql) with the parameter "useoldeditor=yes"
This works, wondering what the difference is between the old editor and the new editor.
For more about the parameter:
https://docs.microsoft.com/en-us/dynamics-nav/using-the-development-environment-from-the-command-prompt#finsqlexe-parameters
Update:
The solution above didn't work.
I was able to successfully open the codeunit with the "Design"-option but according to our Nav-developer:
"I can run design on codeunits now but the environment seems a bit strange. No auto-complete and looks like a really old version"
So to my untrained eye I was happy it "worked" but that did not solve the issue since the old editor isn't a feasible solution to work with.