SmartClientApplication

Jun 9, 2009 at 11:46 AM

Hi,

Thank you for showing this simplified version of scsf/mcsf. Your project has all important parts that i think are best parts in scsf/mcsf like DI, event pubs/sub, module loading, workspaces, smartparts. I have checked new P&P mobile application blocks but they are not upgrading cab parts at all.

I tried to use SmartClientApplication but i get following error

Type 'OpenNETCF.IoC.ModuleInfoStoreService' has no public parameterless constructor or injection constructor.
Are you missing the InjectionConstructor attribute?

I am using it like

 

 

 

 

 

public class ShellApplication : SmartClientApplication<Form1>
    {
        public ShellApplication()
        {
       
        }
        [MTAThread]
        static void Main()
        {
            new ShellApplication().Start();
        }
    }

 

How should i use it?

regards,

 

<font size="2">

Petri P.

</font>

 

Coordinator
Jun 10, 2009 at 7:36 PM

The code you have posted looks right and should work.  Can you attach a repro project or send it to me?

Jun 10, 2009 at 8:22 PM

Project is just  this ShellApplication class and just empty Form1 class.

When i tested your samples i got same error.

Maybe i have something wrong in my environment?

Coordinator
Jun 10, 2009 at 9:40 PM

Get the latest source (not the release, but from 'Source Code') and give it a try.  Also take a look at the new MVPSample app included with that as it makes use of the new features.

Jul 6, 2009 at 5:03 PM

Hi,

I have your latest source code and i am testing with wifisurvey sample. I still got this error message when trying to debug. I have tested this sample in other machines (both 32 and 64 bit vista) and sample works just fine in those machines. I just can't understand why i get

'OpenNETCF.IoC.ModuleInfoStoreService' has no public parameterless constructor or injection constructor.
Are you missing the InjectionConstructor attribute?

or when i have breakpoint in beginning of app code then i get

'OpenNETCF.IoC.ModuleInfoStoreService' has 1661611 defined injection constructors. Only one is allowed

I use this machine as my development machine everyday and i have not realized that kind of problems in any app code.

I know that your sample works but any idea why it breaks here? I have installed net framework 3.5sp1 with latest fixes available.

 

regards,

Petri P.

Coordinator
Jul 8, 2009 at 7:07 PM

Without seeing your project, there's no way to know why the sample works but your app does not.  It might be a bad or missing reference or it could be something else altogether.  You'll either have to attach your failing project or step through it with the debugger.

Jul 8, 2009 at 7:52 PM

your sample wifisurvey does not work in my machine but it works with other machines using same emulators. It compiles well but when debugging or running in emulator  it gets those exceptions (mobile 6 classic emulator). I can't figure out reason for  that.

Maybe emulator is broken or cf that vs installs to emulator...

I must test more...