create design time library using vs.net

G

gerry

has anybody successfully created a design time version of a cf control
library from within VS.NET ?
i can create one from the command line fine but would much rather be able to
do everything from within vs.

from cf webcasts i have seen this is possible but there must be some trick
that is never being mentioned.
basically I a doing is :
- copy the runtime library project file to a new design time project file
within the same project directory
- add the new design time project to the solution within vs.net
- add the appropriate conditional compilation constant
- specify the new output file name
- add the approprriate System.CF references to the design time project
- edit the design time project.csdproj file & rearrange the references to
place the System.CF references before all other references

[ I found that if i create the design time project from scratch rather than
copy the runtime project that everything compiles ok and the controls can be
added to the toolbar and dropped on a cf form but the controls are never
actually added to the form - there are no errors generated but nothing seems
to happen. ]

here is a condensed version of the task list ouput after compiling
( i realize that the redefinition warnings can be ignored )

C:\...\CFLib\CFControl.cs(22): 'System.Drawing.Bitmap' is defined in
multiple places; using definition from
'c:\..\Designer\System.CF.Drawing.dll'
C:\...\CFLib\CFControl.cs(19): 'System.Drawing.Graphics' is defined in
multiple places; using definition from
'c:\..\Designer\System.CF.Drawing.dll'
C:\...\CFLib\CFControl.cs(13): 'System.Windows.Forms.Control' is defined in
multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'
C:\...\CFLib\CFControl.cs(107): 'System.Windows.Forms.MouseEventArgs' is
defined in multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'
C:\...\CFLib\CFControl.cs(142): 'System.Windows.Forms.PaintEventArgs' is
defined in multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'

c:\...\Designer\System.CF.Windows.Forms.dll Referenced class
'System.Windows.Forms.Control' has base class or interface
'System.ComponentModel.ISynchronizeInvoke' defined in an assembly that is
not referenced. You must add a reference to assembly 'System'.
c:\...\Designer\System.CF.Windows.Forms.dll Referenced class
'System.Windows.Forms.Control' has base class or interface
'System.Windows.Forms.IWin32Window' defined in an assembly that is not
referenced. You must add a reference to assembly 'System.Windows.Forms'.

The dependency 'Accessibility' could not be found.
The dependency 'ConMan' could not be found.
The dependency 'ConManDataStore' could not be found.
The dependency 'EnvDTE' could not be found.
The dependency 'Microsoft.VisualStudio' could not be found.
The dependency 'Microsoft.VisualStudio.Designer.Interfaces' could not be
found.
The dependency 'System.Design' could not be found.
The dependency 'System.Drawing.Design' could not be found.
The dependency 'System.Runtime.Serialization.Formatters.Soap' could not be
found.

C:\...\CFLib\CFControl.cs(262): The type or namespace name 'Browsable' does
not exist in the class or namespace 'System.ComponentModel' (are you missing
an assembly reference?)
C:\...\CFLib\CFControl.cs(66): The type or namespace name 'Category' does
not exist in the class or namespace 'System.ComponentModel' (are you missing
an assembly reference?)
C:\...\CFLib\CFControl.cs(68): The type or namespace name 'Description' does
not exist in the class or namespace 'System.ComponentModel' (are you missing
an assembly reference?)

gerry
 
C

Chris Tacke, eMVP

You need to modify your build so that only certain imports are used for the
design version and others are used for the run time version. Look at any of
the OpenNETCF SDF controls - they all have design-time support.

--
<ctacke/>
www.OpenNETCF.org
Your CF searches start and end here


gerry said:
has anybody successfully created a design time version of a cf control
library from within VS.NET ?
i can create one from the command line fine but would much rather be able
to
do everything from within vs.

from cf webcasts i have seen this is possible but there must be some trick
that is never being mentioned.
basically I a doing is :
- copy the runtime library project file to a new design time project file
within the same project directory
- add the new design time project to the solution within vs.net
- add the appropriate conditional compilation constant
- specify the new output file name
- add the approprriate System.CF references to the design time project
- edit the design time project.csdproj file & rearrange the references to
place the System.CF references before all other references

[ I found that if i create the design time project from scratch rather
than
copy the runtime project that everything compiles ok and the controls can
be
added to the toolbar and dropped on a cf form but the controls are never
actually added to the form - there are no errors generated but nothing
seems
to happen. ]

here is a condensed version of the task list ouput after compiling
( i realize that the redefinition warnings can be ignored )

C:\...\CFLib\CFControl.cs(22): 'System.Drawing.Bitmap' is defined in
multiple places; using definition from
'c:\..\Designer\System.CF.Drawing.dll'
C:\...\CFLib\CFControl.cs(19): 'System.Drawing.Graphics' is defined in
multiple places; using definition from
'c:\..\Designer\System.CF.Drawing.dll'
C:\...\CFLib\CFControl.cs(13): 'System.Windows.Forms.Control' is defined
in
multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'
C:\...\CFLib\CFControl.cs(107): 'System.Windows.Forms.MouseEventArgs' is
defined in multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'
C:\...\CFLib\CFControl.cs(142): 'System.Windows.Forms.PaintEventArgs' is
defined in multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'

c:\...\Designer\System.CF.Windows.Forms.dll Referenced class
'System.Windows.Forms.Control' has base class or interface
'System.ComponentModel.ISynchronizeInvoke' defined in an assembly that is
not referenced. You must add a reference to assembly 'System'.
c:\...\Designer\System.CF.Windows.Forms.dll Referenced class
'System.Windows.Forms.Control' has base class or interface
'System.Windows.Forms.IWin32Window' defined in an assembly that is not
referenced. You must add a reference to assembly 'System.Windows.Forms'.

The dependency 'Accessibility' could not be found.
The dependency 'ConMan' could not be found.
The dependency 'ConManDataStore' could not be found.
The dependency 'EnvDTE' could not be found.
The dependency 'Microsoft.VisualStudio' could not be found.
The dependency 'Microsoft.VisualStudio.Designer.Interfaces' could not be
found.
The dependency 'System.Design' could not be found.
The dependency 'System.Drawing.Design' could not be found.
The dependency 'System.Runtime.Serialization.Formatters.Soap' could not be
found.

C:\...\CFLib\CFControl.cs(262): The type or namespace name 'Browsable'
does
not exist in the class or namespace 'System.ComponentModel' (are you
missing
an assembly reference?)
C:\...\CFLib\CFControl.cs(66): The type or namespace name 'Category' does
not exist in the class or namespace 'System.ComponentModel' (are you
missing
an assembly reference?)
C:\...\CFLib\CFControl.cs(68): The type or namespace name 'Description'
does
not exist in the class or namespace 'System.ComponentModel' (are you
missing
an assembly reference?)

gerry
 
G

gerry

Hi Chris ,

thanks for the reply

writing controls with design time support isn't the issue , my controls also
have design time support which works just peachy.
I am thinking that maybe you missed the point of my original question which
was how to get the design time library built using a vs.net project from
within the vs.net ide. Responses to previous posts on this issue have
stated that opennetcf design time lib is always built using the command
line - my lib builds without problem using the command line , but i would
much rather manage this as a design time project from within the vs.net ide.

the only difference with imports between opennetcf controls and my own are I
have System.ComponentModel always included and opennetcf only includes it
for design time - making this inclusion only for design time has no effect.

am I still overlooking something in the openNETCF control source that would
allow the design time lib to be built using the command line but not via a
project within vs.net ?

gerry




Chris Tacke said:
You need to modify your build so that only certain imports are used for the
design version and others are used for the run time version. Look at any of
the OpenNETCF SDF controls - they all have design-time support.

--
<ctacke/>
www.OpenNETCF.org
Your CF searches start and end here


gerry said:
has anybody successfully created a design time version of a cf control
library from within VS.NET ?
i can create one from the command line fine but would much rather be able
to
do everything from within vs.

from cf webcasts i have seen this is possible but there must be some trick
that is never being mentioned.
basically I a doing is :
- copy the runtime library project file to a new design time project file
within the same project directory
- add the new design time project to the solution within vs.net
- add the appropriate conditional compilation constant
- specify the new output file name
- add the approprriate System.CF references to the design time project
- edit the design time project.csdproj file & rearrange the references to
place the System.CF references before all other references

[ I found that if i create the design time project from scratch rather
than
copy the runtime project that everything compiles ok and the controls can
be
added to the toolbar and dropped on a cf form but the controls are never
actually added to the form - there are no errors generated but nothing
seems
to happen. ]

here is a condensed version of the task list ouput after compiling
( i realize that the redefinition warnings can be ignored )

C:\...\CFLib\CFControl.cs(22): 'System.Drawing.Bitmap' is defined in
multiple places; using definition from
'c:\..\Designer\System.CF.Drawing.dll'
C:\...\CFLib\CFControl.cs(19): 'System.Drawing.Graphics' is defined in
multiple places; using definition from
'c:\..\Designer\System.CF.Drawing.dll'
C:\...\CFLib\CFControl.cs(13): 'System.Windows.Forms.Control' is defined
in
multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'
C:\...\CFLib\CFControl.cs(107): 'System.Windows.Forms.MouseEventArgs' is
defined in multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'
C:\...\CFLib\CFControl.cs(142): 'System.Windows.Forms.PaintEventArgs' is
defined in multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'

c:\...\Designer\System.CF.Windows.Forms.dll Referenced class
'System.Windows.Forms.Control' has base class or interface
'System.ComponentModel.ISynchronizeInvoke' defined in an assembly that is
not referenced. You must add a reference to assembly 'System'.
c:\...\Designer\System.CF.Windows.Forms.dll Referenced class
'System.Windows.Forms.Control' has base class or interface
'System.Windows.Forms.IWin32Window' defined in an assembly that is not
referenced. You must add a reference to assembly 'System.Windows.Forms'.

The dependency 'Accessibility' could not be found.
The dependency 'ConMan' could not be found.
The dependency 'ConManDataStore' could not be found.
The dependency 'EnvDTE' could not be found.
The dependency 'Microsoft.VisualStudio' could not be found.
The dependency 'Microsoft.VisualStudio.Designer.Interfaces' could not be
found.
The dependency 'System.Design' could not be found.
The dependency 'System.Drawing.Design' could not be found.
The dependency 'System.Runtime.Serialization.Formatters.Soap' could not be
found.

C:\...\CFLib\CFControl.cs(262): The type or namespace name 'Browsable'
does
not exist in the class or namespace 'System.ComponentModel' (are you
missing
an assembly reference?)
C:\...\CFLib\CFControl.cs(66): The type or namespace name 'Category' does
not exist in the class or namespace 'System.ComponentModel' (are you
missing
an assembly reference?)
C:\...\CFLib\CFControl.cs(68): The type or namespace name 'Description'
does
not exist in the class or namespace 'System.ComponentModel' (are you
missing
an assembly reference?)

gerry
 
G

Guest

Take a look at this articles:

http://msdn.microsoft.com/library/d...en-us/dnnetcomp/html/DTPick_WD.asp?frame=true


--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com
www.opennetcf.org



gerry said:
Hi Chris ,

thanks for the reply

writing controls with design time support isn't the issue , my controls also
have design time support which works just peachy.
I am thinking that maybe you missed the point of my original question which
was how to get the design time library built using a vs.net project from
within the vs.net ide. Responses to previous posts on this issue have
stated that opennetcf design time lib is always built using the command
line - my lib builds without problem using the command line , but i would
much rather manage this as a design time project from within the vs.net ide.

the only difference with imports between opennetcf controls and my own are I
have System.ComponentModel always included and opennetcf only includes it
for design time - making this inclusion only for design time has no effect.

am I still overlooking something in the openNETCF control source that would
allow the design time lib to be built using the command line but not via a
project within vs.net ?

gerry




Chris Tacke said:
You need to modify your build so that only certain imports are used for the
design version and others are used for the run time version. Look at any of
the OpenNETCF SDF controls - they all have design-time support.

--
<ctacke/>
www.OpenNETCF.org
Your CF searches start and end here


gerry said:
has anybody successfully created a design time version of a cf control
library from within VS.NET ?
i can create one from the command line fine but would much rather be able
to
do everything from within vs.

from cf webcasts i have seen this is possible but there must be some trick
that is never being mentioned.
basically I a doing is :
- copy the runtime library project file to a new design time project file
within the same project directory
- add the new design time project to the solution within vs.net
- add the appropriate conditional compilation constant
- specify the new output file name
- add the approprriate System.CF references to the design time project
- edit the design time project.csdproj file & rearrange the references to
place the System.CF references before all other references

[ I found that if i create the design time project from scratch rather
than
copy the runtime project that everything compiles ok and the controls can
be
added to the toolbar and dropped on a cf form but the controls are never
actually added to the form - there are no errors generated but nothing
seems
to happen. ]

here is a condensed version of the task list ouput after compiling
( i realize that the redefinition warnings can be ignored )

C:\...\CFLib\CFControl.cs(22): 'System.Drawing.Bitmap' is defined in
multiple places; using definition from
'c:\..\Designer\System.CF.Drawing.dll'
C:\...\CFLib\CFControl.cs(19): 'System.Drawing.Graphics' is defined in
multiple places; using definition from
'c:\..\Designer\System.CF.Drawing.dll'
C:\...\CFLib\CFControl.cs(13): 'System.Windows.Forms.Control' is defined
in
multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'
C:\...\CFLib\CFControl.cs(107): 'System.Windows.Forms.MouseEventArgs' is
defined in multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'
C:\...\CFLib\CFControl.cs(142): 'System.Windows.Forms.PaintEventArgs' is
defined in multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'

c:\...\Designer\System.CF.Windows.Forms.dll Referenced class
'System.Windows.Forms.Control' has base class or interface
'System.ComponentModel.ISynchronizeInvoke' defined in an assembly that is
not referenced. You must add a reference to assembly 'System'.
c:\...\Designer\System.CF.Windows.Forms.dll Referenced class
'System.Windows.Forms.Control' has base class or interface
'System.Windows.Forms.IWin32Window' defined in an assembly that is not
referenced. You must add a reference to assembly 'System.Windows.Forms'.

The dependency 'Accessibility' could not be found.
The dependency 'ConMan' could not be found.
The dependency 'ConManDataStore' could not be found.
The dependency 'EnvDTE' could not be found.
The dependency 'Microsoft.VisualStudio' could not be found.
The dependency 'Microsoft.VisualStudio.Designer.Interfaces' could not be
found.
The dependency 'System.Design' could not be found.
The dependency 'System.Drawing.Design' could not be found.
The dependency 'System.Runtime.Serialization.Formatters.Soap' could not be
found.

C:\...\CFLib\CFControl.cs(262): The type or namespace name 'Browsable'
does
not exist in the class or namespace 'System.ComponentModel' (are you
missing
an assembly reference?)
C:\...\CFLib\CFControl.cs(66): The type or namespace name 'Category' does
not exist in the class or namespace 'System.ComponentModel' (are you
missing
an assembly reference?)
C:\...\CFLib\CFControl.cs(68): The type or namespace name 'Description'
does
not exist in the class or namespace 'System.ComponentModel' (are you
missing
an assembly reference?)

gerry
 
G

gerry

Thanks Alex ,

that's what I needed - 100% within IDE and modifications no longer required
each time a source file is added or removed from the library project.

Tip for anyone else following this thread , in the NMAKE commands
"$(SolutionDir)xxx.cs" "$(SolutionDir)yyy.cs" "..." can be changed to
"$(ProjectDir)*.cs"

gerry



Alex Yakhnin said:
Take a look at this articles:

http://msdn.microsoft.com/library/d...en-us/dnnetcomp/html/DTPick_WD.asp?frame=true


--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com
www.opennetcf.org



gerry said:
Hi Chris ,

thanks for the reply

writing controls with design time support isn't the issue , my controls also
have design time support which works just peachy.
I am thinking that maybe you missed the point of my original question which
was how to get the design time library built using a vs.net project from
within the vs.net ide. Responses to previous posts on this issue have
stated that opennetcf design time lib is always built using the command
line - my lib builds without problem using the command line , but i would
much rather manage this as a design time project from within the vs.net ide.

the only difference with imports between opennetcf controls and my own are I
have System.ComponentModel always included and opennetcf only includes it
for design time - making this inclusion only for design time has no effect.

am I still overlooking something in the openNETCF control source that would
allow the design time lib to be built using the command line but not via a
project within vs.net ?

gerry




Chris Tacke said:
You need to modify your build so that only certain imports are used
for
the
design version and others are used for the run time version. Look at
any
of
the OpenNETCF SDF controls - they all have design-time support.

--
<ctacke/>
www.OpenNETCF.org
Your CF searches start and end here


has anybody successfully created a design time version of a cf control
library from within VS.NET ?
i can create one from the command line fine but would much rather be able
to
do everything from within vs.

from cf webcasts i have seen this is possible but there must be some trick
that is never being mentioned.
basically I a doing is :
- copy the runtime library project file to a new design time project file
within the same project directory
- add the new design time project to the solution within vs.net
- add the appropriate conditional compilation constant
- specify the new output file name
- add the approprriate System.CF references to the design time project
- edit the design time project.csdproj file & rearrange the
references
to
place the System.CF references before all other references

[ I found that if i create the design time project from scratch rather
than
copy the runtime project that everything compiles ok and the
controls
can
be
added to the toolbar and dropped on a cf form but the controls are never
actually added to the form - there are no errors generated but nothing
seems
to happen. ]

here is a condensed version of the task list ouput after compiling
( i realize that the redefinition warnings can be ignored )

C:\...\CFLib\CFControl.cs(22): 'System.Drawing.Bitmap' is defined in
multiple places; using definition from
'c:\..\Designer\System.CF.Drawing.dll'
C:\...\CFLib\CFControl.cs(19): 'System.Drawing.Graphics' is defined in
multiple places; using definition from
'c:\..\Designer\System.CF.Drawing.dll'
C:\...\CFLib\CFControl.cs(13): 'System.Windows.Forms.Control' is defined
in
multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'
C:\...\CFLib\CFControl.cs(107): 'System.Windows.Forms.MouseEventArgs' is
defined in multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'
C:\...\CFLib\CFControl.cs(142): 'System.Windows.Forms.PaintEventArgs' is
defined in multiple places; using definition from
'c:\..\Designer\System.CF.Windows.Forms.dll'

c:\...\Designer\System.CF.Windows.Forms.dll Referenced class
'System.Windows.Forms.Control' has base class or interface
'System.ComponentModel.ISynchronizeInvoke' defined in an assembly
that
is
not referenced. You must add a reference to assembly 'System'.
c:\...\Designer\System.CF.Windows.Forms.dll Referenced class
'System.Windows.Forms.Control' has base class or interface
'System.Windows.Forms.IWin32Window' defined in an assembly that is not
referenced. You must add a reference to assembly 'System.Windows.Forms'.

The dependency 'Accessibility' could not be found.
The dependency 'ConMan' could not be found.
The dependency 'ConManDataStore' could not be found.
The dependency 'EnvDTE' could not be found.
The dependency 'Microsoft.VisualStudio' could not be found.
The dependency 'Microsoft.VisualStudio.Designer.Interfaces' could not be
found.
The dependency 'System.Design' could not be found.
The dependency 'System.Drawing.Design' could not be found.
The dependency 'System.Runtime.Serialization.Formatters.Soap' could
not
be
found.

C:\...\CFLib\CFControl.cs(262): The type or namespace name 'Browsable'
does
not exist in the class or namespace 'System.ComponentModel' (are you
missing
an assembly reference?)
C:\...\CFLib\CFControl.cs(66): The type or namespace name 'Category' does
not exist in the class or namespace 'System.ComponentModel' (are you
missing
an assembly reference?)
C:\...\CFLib\CFControl.cs(68): The type or namespace name 'Description'
does
not exist in the class or namespace 'System.ComponentModel' (are you
missing
an assembly reference?)

gerry
 

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