开发者

The type 'Microsoft.CompactFramework.Design.UnsafeControl' has no property named

I get this error when opening the design view of a form that has a Honeywell DecodeControl on it (for a Honeywell barcode scanner - Dolphin 6100 if anyone is interested).

I've googled this to death and done the following:

added an XMTA file with this in it:

<?xml version="1.0" encoding="utf-16"?>
<Classes xmlns="http://schemas.microsoft.com/VisualStudio/2004/03/SmartDevices/XMTA.xsd">
  <Class Name="Honeywell.DataCollection.WinCE.Decoding.DecodeControl">
    <Description></Description>
    <DesktopCompatible>true</DesktopCompatible>
    <DesignTimeVisible>true</DesignTimeVisible>
  </Class>
</Classes>

Set said 开发者_StackOverflow中文版XMTA's Build Action to 'none'

Ignoring the first error still gives me an 'Object reference not set to an instance of an object'.

This didn't help at all.

After some lengthy googling, this appears to be to do with controls that are device-specific, and this error is supposedly to stop anything that might cause instability in the designer...except that this control has been working quite happily in the designer all day at work, then when I get home it throws this at me. Nothing has changed - same dev machine, same device, same project, same code as when I last saved it at work.

I'm not even trying to debug the device on the desktop or an emulator - I have the device plumbed in via USB cradle.

Literally the only thing that's changed is that the dev machine is connected to my home network by wireless instead of the CAT5 to work's network. And I can't see that being even remotely related to this.

On a more related note, the control in question never showed up in the toolbox after I did Choose Items -> check the control. Not sure if this is related.

Can anyone shed any light?

I can post the designer code if necessary.

Thanks


Turns out I was targeting the wrong framework for the device - VS decided of it's own volition that I needed to target 3.5 instead of 2.0. Switched it back and all is well.


I ran into this error but it was caused by my playing around with the MessageBeep API in a form. Even though this form was not related in any way to my user controls or components, just having that reference to the Interop namespace in a form corrupted every control in my application and made it impossible to view them in the designer.

The moral of the story is DON'T USE Interop IN CE (PInvoke).

That was scary. Just a heads up for any other unfortunate soul trying to make a Beep sound.


I've the same problem in VS2102 with WEC2013.

And without P/Invoke but with a custom control, entirely managed .net code. The problem is the Enum properties of my custom control. And NO solution yet.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜