Wednesday, July 24, 2013

CLRObject could not be created error While Clicking Tools --> Option

CLRObject could not be created error While Clicking Tools --> Option

 
This could be due to hot swapping feature in AX 2012.
 
Uncheck "Enable the hot-swapping of assemblies for each development session" option mentioned  in AX Server Configuartion Utility as shown below.
 
What is Hot Swapping:
 
In your development environment, you can use the hot-swap feature of the Application Object Server (AOS) to use updated assembly DLL files without having to repeatedly stop and restart the AOS. Restarting the AOS terminates the connections from other developer clients, which can be an inconvenience.

Scenario with Hot-Swapping Off

The hot-swap configuration value is set to off when Microsoft Dynamics AX is installed. Under this default, one application domain is created when the AOS starts. No additional domains will be created. All .NET Framework assemblies that are loaded into the AOS share the single domain. Also, the single domain is shared by all client connections.
To test the updated assembly, you must restart the AOS. Then connect an AX32.exe client to the AOS, and run the tests. Having to restart the AOS after every compilation is inconvenient. The inconvenience is increased if other developers are sharing the same AOS, because their connections are broken with each restart. Their connections can be from an AX32.exe client, and from Visual Studio.
It is not necessary to stop and restart the AOS when you need the AOS to load a new assembly that it has not loaded before.

Scenario with Hot-Swapping On

When the hot-swap configuration value is on, each new client connection to the AOS is assigned to a new application domain that is dedicated to that connection. Each connection has its own application domain. The creation of new application domains does not affect other connections.
Each new application domain is populated with the versions of assembly DLLs that are available to the AOS when the DLLs are loaded into the new domain. In any given application domain, no updates can be made to any assembly DLL that is already loaded into the domain.
In Visual Studio, after you modify your C# code and again compile the assembly DLL, you only need to start a new AX32.exe client to gain access to the updated assembly for testing.


Learn more about Hot-swapping @  http://msdn.microsoft.com/en-us/library/hh538487.aspx

No comments:

Post a Comment