Custom control reference

  • Thread starter Thread starter Pope
  • Start date Start date
P

Pope

Hi

I hope someone can help with this, i'm tearing my hair out!

I've written a custom control in C# for a project at work
(OWPControl). When i add it to a new project it all looks
fine, i can drop it onto a form and it shows correctly
etc, BUT a reference does not get added! I've tried adding
the reference manually but that does nothing!

Because the reference doesn't get added VS complains that
it "Could not find type 'OWPControl'..." yadda yadda...

I'm guessing that I'm doing something wrong but I've
followed numerous howtos, etc and everything looks like it
should just work! :s
 
Make sure that the RuntimeAssembly attribute in your designer dll is correct
and exactly matches the signature of your runtime dll e.g.

[assembly:
System.CF.Design.RuntimeAssemblyAttribute("OpenNETCF.Windows.Forms.dll,
Version=1.3.50302.0, Culture=neutral, PublicKeyToken=null")]

Also make sure both dlls are accessible e.g. place the runtime assembly
here:-
C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE

and the design time version here:-
C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE

Adjusting for the root visual studio folder on the development machine.

Peter
 
Hi Peter

As far as I can tell my RuntimeAssembly is correct -

[assembly: System.CF.Design.RuntimeAssemblyAttribute
("CMS.OWP, Version 1.0.0.0, Culture=neutral,
PublicKeyToken=null")]

which matches the version set in AssemblyInfo.cs.

I assume you meant that I should put the designer dll in
the Designer subdirectory of "C:\Program Files\Microsoft
Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000
\Windows CE" - yep that's all where it should be!

I just don't get it... surely if it's loaded the control
to the extent that I can use it in the designer, it should
be able to add the reference etc?!?
-----Original Message-----
Make sure that the RuntimeAssembly attribute in your designer dll is correct
and exactly matches the signature of your runtime dll e.g.

[assembly:
System.CF.Design.RuntimeAssemblyAttribute ("OpenNETCF.Windows.Forms.dll,
Version=1.3.50302.0, Culture=neutral, PublicKeyToken=null")]

Also make sure both dlls are accessible e.g. place the runtime assembly
here:-
C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE

and the design time version here:-
C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE

Adjusting for the root visual studio folder on the development machine.

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://blog.opennetcf.org/pfoot/

Pope said:
Hi

I hope someone can help with this, i'm tearing my hair out!

I've written a custom control in C# for a project at work
(OWPControl). When i add it to a new project it all looks
fine, i can drop it onto a form and it shows correctly
etc, BUT a reference does not get added! I've tried adding
the reference manually but that does nothing!

Because the reference doesn't get added VS complains that
it "Could not find type 'OWPControl'..." yadda yadda...

I'm guessing that I'm doing something wrong but I've
followed numerous howtos, etc and everything looks like it
should just work! :s


.
 
Is your project a smartphone project? In which case you'll also need to copy
the files to the equivalent in the Smartphone folder within C:\Program
Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE

If you add the reference manually does the project build and deploy
successfully?

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://blog.opennetcf.org/pfoot/

Hi Peter

As far as I can tell my RuntimeAssembly is correct -

[assembly: System.CF.Design.RuntimeAssemblyAttribute
("CMS.OWP, Version 1.0.0.0, Culture=neutral,
PublicKeyToken=null")]

which matches the version set in AssemblyInfo.cs.

I assume you meant that I should put the designer dll in
the Designer subdirectory of "C:\Program Files\Microsoft
Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000
\Windows CE" - yep that's all where it should be!

I just don't get it... surely if it's loaded the control
to the extent that I can use it in the designer, it should
be able to add the reference etc?!?
-----Original Message-----
Make sure that the RuntimeAssembly attribute in your designer dll is correct
and exactly matches the signature of your runtime dll e.g.

[assembly:
System.CF.Design.RuntimeAssemblyAttribute ("OpenNETCF.Windows.Forms.dll,
Version=1.3.50302.0, Culture=neutral, PublicKeyToken=null")]

Also make sure both dlls are accessible e.g. place the runtime assembly
here:-
C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE

and the design time version here:-
C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE

Adjusting for the root visual studio folder on the development machine.

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://blog.opennetcf.org/pfoot/

Pope said:
Hi

I hope someone can help with this, i'm tearing my hair out!

I've written a custom control in C# for a project at work
(OWPControl). When i add it to a new project it all looks
fine, i can drop it onto a form and it shows correctly
etc, BUT a reference does not get added! I've tried adding
the reference manually but that does nothing!

Because the reference doesn't get added VS complains that
it "Could not find type 'OWPControl'..." yadda yadda...

I'm guessing that I'm doing something wrong but I've
followed numerous howtos, etc and everything looks like it
should just work! :s


.
 
No, it's a Pocket PC project (WM2003 in case it matters)...

If i try to add the reference manually, nothing happens...
the reference doesn't appear but I don't get an error
message :s
-----Original Message-----
Is your project a smartphone project? In which case you'll also need to copy
the files to the equivalent in the Smartphone folder within C:\Program
Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE

If you add the reference manually does the project build and deploy
successfully?

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://blog.opennetcf.org/pfoot/

Hi Peter

As far as I can tell my RuntimeAssembly is correct -

[assembly: System.CF.Design.RuntimeAssemblyAttribute
("CMS.OWP, Version 1.0.0.0, Culture=neutral,
PublicKeyToken=null")]

which matches the version set in AssemblyInfo.cs.

I assume you meant that I should put the designer dll in
the Designer subdirectory of "C:\Program Files\Microsoft
Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000
\Windows CE" - yep that's all where it should be!

I just don't get it... surely if it's loaded the control
to the extent that I can use it in the designer, it should
be able to add the reference etc?!?
-----Original Message-----
Make sure that the RuntimeAssembly attribute in your designer dll is correct
and exactly matches the signature of your runtime dll e.g.

[assembly:
System.CF.Design.RuntimeAssemblyAttribute ("OpenNETCF.Windows.Forms.dll,
Version=1.3.50302.0, Culture=neutral, PublicKeyToken=null")]

Also make sure both dlls are accessible e.g. place the runtime assembly
here:-
C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE

and the design time version here:-
C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE

Adjusting for the root visual studio folder on the development machine.

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://blog.opennetcf.org/pfoot/

Hi

I hope someone can help with this, i'm tearing my hair out!

I've written a custom control in C# for a project at work
(OWPControl). When i add it to a new project it all looks
fine, i can drop it onto a form and it shows correctly
etc, BUT a reference does not get added! I've tried adding
the reference manually but that does nothing!

Because the reference doesn't get added VS complains that
it "Could not find type 'OWPControl'..." yadda yadda...

I'm guessing that I'm doing something wrong but I've
followed numerous howtos, etc and everything looks
like
it
should just work! :s


.


.
 
No, it's a Pocket PC project (WM2003 to be exact in case that
matters)...

I've tried adding the reference manually and nothing happens... the
reference isn't added but i don't get an error message?!?
 
Back
Top