You can resolve the CodeFoundButOutOfSync MDrivenServer status when your uploaded CodeDress C# code is found but one or more referenced DLL versions do not match the versions expected by that code.
What the status means
CodeFoundButOutOfSync is an MDrivenServer status for an application that uses C# code of its own through CodeDress.
The status means both of the following are true:
- MDrivenServer has found your CodeDress C# code.
- A reference used by that code and the corresponding DLL file have different versions.
For example, your CodeDress assembly may have been built against one version of a dependency DLL, while the server has another version of that DLL in its runtime files. MDrivenServer can find the code, but it cannot bring the code and its referenced assemblies into a consistent state.
After a successful upload and CodeDress processing, the expected status is CodeFoundAndDressed. Processing can take about a minute after upload. The application can also return error pages one or two times immediately after a model upload because changed assets are unpacked and can trigger a host restart.
Resolve an out-of-sync DLL
Use this procedure when you know, or can identify, the DLL responsible for the version discrepancy.
- Locate the
ModelCodeAssembliesdirectory on the Turnkey server. - Locate the
ModelCodeAssembliesdirectory on the MDrivenServer. - Identify the DLL that should be replaced. This is the DLL you believe is responsible for the version mismatch between the C# code and its referenced assemblies.
- Delete that DLL from the
ModelCodeAssembliesdirectory on both servers. - Upload the model again so that the required assembly is uploaded and dressed again.
- Wait for CodeDress processing to complete, then check the MDrivenServer status. A successful result is CodeFoundAndDressed.
Verify the result
Check the status after the new upload has had time to process.
| Status | Meaning | Action |
|---|---|---|
| CodeFoundAndDressed | The CodeDress code was found and applied. | No further action is required for this issue. |
| CodeFoundButOutOfSync | The code was found, but a referenced DLL version still differs from the version expected by the code. | Recheck which DLL is stale or mismatched in the ModelCodeAssemblies directories, remove that DLL from both locations, and upload again.
|
Related CodeDress considerations
CodeDress supplies C# implementations for behavior in the model. For example, a model operation without an OCL implementation can have a C# implementation that CodeDress applies at runtime. See Documentation:CodeDress for how CodeDress works and how to confirm that it is active from within the model.
If the issue began after changing generated code or model methods, also review Documentation:Codegen failed. Generated code that no longer corresponds to the model can cause checksum comparison issues between compiled code and the model.
