No suitable constructor found
No edit summary
(Replacing message template with parser tag)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Working with CodeDress and if you get this error "No suitable constructor found" check the following:
<message>Write the content here to display this box</message>
* In the GAC check that you only have the current Eco.Interfaces - and not any old copies of the assembly - and that the GACed version is the version in MDrivenServer/bin: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Eco.Interfaces
If you are working with CodeDress and you get this error "No suitable constructor found", check the following:
* Also check the CodeDress assemblies (\ModelCodeAssemblies) so that you do not have any Eco.* assemblies there - the linker will wrongfully mix in these instead of the ones in your running application (Turnkey or MDrivenServer)
* In the GAC, check that you only have the current Eco.Interfaces - not old copies of the assembly - and that the GACed version is the version in MDrivenServer/bin: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Eco.Interfaces
* When the linker tries to resolve the reference to Eco.Interfaces - it may end up with the wrong one and then nothing matches up correctly and we have no access to the correct contstructor.
* Also, check the CodeDress assemblies (\ModelCodeAssemblies) so that you do not have any Eco.* assemblies there - the linker will wrongfully mix in these instead of the ones in your running application (Turnkey or MDrivenServer).
* This issue does not normally arise on the server since you probably have not installed MDrivenFramework there. The problem arises due to a fight on what version to use between MDrivenFramework (that must GAC assemblies to allow for VisualStudio to work) and MDrivenServer that does not GAC assemblies.
When the linker tries to resolve the reference to Eco.Interfacesit may end up with the wrong one and nothing will match up correctly - you will have no access to the correct constructor.
In Visual Studio doing "Clean" on your solution and rebuilding usually helps.


==== Play - button in MDriven Designer gives exception "No suitable constructor found" ====
This issue does not normally arise on the server since you probably have not installed MDrivenFramework there. The problem arises due to a fight on what version to use between MDrivenFramework (that must have GAC assemblies to allow for VisualStudio to work) and MDrivenServer which does not have GAC assemblies.
When you hit play the system tries to start - as part of system start we look for [[CodeDress]] assemblies. If your model is saved in such a location so that the codedress logic will need to scan irrelevant assemblies it may be the reason for the "No suitable constructor found"-exception.  


<u>Try and move your model to a directory of its own</u> where codedress logic will not find other irrelevant files assemblies.
In Visual Studio, doing a "Clean" on your solution and rebuilding usually helps.
 
==== Play - button in MDriven Designer gives an exception to "No suitable constructor found" ====
When you hit play, the system tries to start. As part of the system starts,  we look for [[CodeDress]] assemblies. If your model is saved in a location where the CodeDress logic will need to scan irrelevant assemblies, it may be the reason for the "No suitable constructor found" exception.
 
<u>Try to move your model to a directory of its own</u> where CodeDress logic will not find other irrelevant file assemblies.
 
==== Report From Reality ====
The description of eco.interfaces.dll has changed from "ECO ..." to "MDriven ..." as we implemented the Nugets for .net5. This counts as a big change. I got the error above when the MDrivenServer had one version and CodeDress was compiled with another (2021-10-12).
[[Category:MDriven Turnkey]]
[[Category:MDriven Server]]
{{Edited|July|12|2024}}

Latest revision as of 07:46, 17 June 2024

If you are working with CodeDress and you get this error "No suitable constructor found", check the following:

  • In the GAC, check that you only have the current Eco.Interfaces - not old copies of the assembly - and that the GACed version is the version in MDrivenServer/bin: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Eco.Interfaces
  • Also, check the CodeDress assemblies (\ModelCodeAssemblies) so that you do not have any Eco.* assemblies there - the linker will wrongfully mix in these instead of the ones in your running application (Turnkey or MDrivenServer).

When the linker tries to resolve the reference to Eco.Interfaces, it may end up with the wrong one and nothing will match up correctly - you will have no access to the correct constructor.

This issue does not normally arise on the server since you probably have not installed MDrivenFramework there. The problem arises due to a fight on what version to use between MDrivenFramework (that must have GAC assemblies to allow for VisualStudio to work) and MDrivenServer which does not have GAC assemblies.

In Visual Studio, doing a "Clean" on your solution and rebuilding usually helps.

Play - button in MDriven Designer gives an exception to "No suitable constructor found"

When you hit play, the system tries to start. As part of the system starts, we look for CodeDress assemblies. If your model is saved in a location where the CodeDress logic will need to scan irrelevant assemblies, it may be the reason for the "No suitable constructor found" exception.

Try to move your model to a directory of its own where CodeDress logic will not find other irrelevant file assemblies.

Report From Reality

The description of eco.interfaces.dll has changed from "ECO ..." to "MDriven ..." as we implemented the Nugets for .net5. This counts as a big change. I got the error above when the MDrivenServer had one version and CodeDress was compiled with another (2021-10-12).

This page was edited 12 days ago on 06/17/2024. What links here