Adding Designer Support in Compact Framework user controls

A

Andres Aguiar

We created our controls and designer project following the steps in
http://msdn.microsoft.com/library/d...en-us/dnnetcomp/html/customctrlscompactfx.asp

We create a C# project with the user controls, and copy the runtime assembly
file to "C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\" and the design-time assembly
file to the "C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\Designer\".

We have found some problems:

1) If we have a form open with our control, then we cannot overwrite the
design time assembly file because it's use by VS. We have to close all form
and restart VS and then we can update this file. Is there any workaround for
this?

2) If we have a project that has a reference to the runtime assembly open in
VS, then the same happens and we cannot update the runtime assembly until we
restart VS. We can work around this issue by adding the reference to the
controls project instead of the runtime assembly, but we don't know if it's
correct.

3) The Designer Project cannot be created using VB .net because it doesn't
compile. There is another way to create the designer assemblies for VB .net?

Thanks,

Andres
 
P

Peter Foot [MVP]

Answers inline:-

Andres Aguiar said:
We created our controls and designer project following the steps in
http://msdn.microsoft.com/library/d...en-us/dnnetcomp/html/customctrlscompactfx.asp

We create a C# project with the user controls, and copy the runtime assembly
file to "C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\" and the design-time assembly
file to the "C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\Designer\".

We have found some problems:

1) If we have a form open with our control, then we cannot overwrite the
design time assembly file because it's use by VS. We have to close all form
and restart VS and then we can update this file. Is there any workaround for
this?

This is to be expected because the forms designer loads the assembly to
allow designing in your consuming project. This is only an issue when
developing/testing the designer library.
2) If we have a project that has a reference to the runtime assembly open in
VS, then the same happens and we cannot update the runtime assembly until we
restart VS. We can work around this issue by adding the reference to the
controls project instead of the runtime assembly, but we don't know if it's
correct.

If you have copied a prior version to the "C:\Program Files\Microsoft Visual
Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\" and change your
project to reference the project rather than this file, it will still be
this older file which is deployed as Visual Studio favours any assembly in
this folder over that in a local project folder.
3) The Designer Project cannot be created using VB .net because it doesn't
compile. There is another way to create the designer assemblies for VB ..net?

Yes currently device control design time libraries can only be created in
C#.

Peter
 
A

Andres Aguiar

Thanks Peter.

Andres

Peter Foot said:
Answers inline:-


http://msdn.microsoft.com/library/d...en-us/dnnetcomp/html/customctrlscompactfx.asp

This is to be expected because the forms designer loads the assembly to
allow designing in your consuming project. This is only an issue when
developing/testing the designer library.
open until

If you have copied a prior version to the "C:\Program Files\Microsoft Visual
Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\" and change your
project to reference the project rather than this file, it will still be
this older file which is deployed as Visual Studio favours any assembly in
this folder over that in a local project folder.


Yes currently device control design time libraries can only be created in
C#.

Peter

--
Peter Foot
Windows Embedded MVP
OpenNETCF.org Senior Advisor
www.inthehand.com | www.opennetcf.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top