Home > Archive > Visual Studio > February 2006 > Using custom controls in more than once
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Using custom controls in more than once
|
|
| Peter Larsen 2006-02-20, 7:00 pm |
| Hi,
How do i include the source files from a custom control, to more than one
project, without having to copy the files ?
What i want to do is to share the source files between different projects -
and still only have one copy to maintain.
If i'm using the menu "Add | Existing item", the files will be copied.
/Peter
| |
|
| On Mon, 20 Feb 2006 18:39:05 +0200, Peter Larsen <tjanne39@gmail.com> =
wrote:
> Hi,
>
> How do i include the source files from a custom control, to more than =
one
> project, without having to copy the files ?
>
> What i want to do is to share the source files between different =
> projects -
> and still only have one copy to maintain.
> If i'm using the menu "Add | Existing item", the files will be copied.=
>
> /Peter
>
>
Create assembly for this source code and refer two projects on this new =
=
assembly.
-- =
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
| |
| Peter Larsen 2006-02-21, 3:57 am |
| Could you show me how to do that please ??
/Peter
| |
|
| On Tue, 21 Feb 2006 10:48:33 +0200, Peter Larsen <tjanne39@gmail.com>
wrote:
> Could you show me how to do that please ??
>
> /Peter
>
>
Peter, are these .NET projects?
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
| |
| Peter Larsen 2006-02-21, 7:57 am |
| Yes they are !
It's components (user controls), but is could also be other types of .Net
projects.
/Peter
"void" <goover@ukrpost.net> wrote in message
news:op.s5bhmdvzc5urqi@odp.ua.btobits.com...
> On Tue, 21 Feb 2006 10:48:33 +0200, Peter Larsen <tjanne39@gmail.com>
> wrote:
>
>
> Peter, are these .NET projects?
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
| |
| Peter Larsen 2006-02-21, 7:57 am |
| BTW, it seems possible to add files to a project from another location than
current project path.
I tried that - added files to a project - opened the project file and
changed the path to the files. After that, i deleted the newly added files
from the directory - and the project is still up and running.
The only change i see, is that the icons (placed left to the files in
solution explorer) changes to contain the shortcut arrow bitmap.
/Peter
"void" <goover@ukrpost.net> wrote in message
news:op.s5bhmdvzc5urqi@odp.ua.btobits.com...
> On Tue, 21 Feb 2006 10:48:33 +0200, Peter Larsen <tjanne39@gmail.com>
> wrote:
>
>
> Peter, are these .NET projects?
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
| |
|
| On Tue, 21 Feb 2006 13:18:04 +0200, Peter Larsen <tjanne39@gmail.com> =
wrote:
> Yes they are !
> It's components (user controls), but is could also be other types of .=
Net
> projects.
>
BTW, you can create new assembly in your solution, add source file to it=
and refer other projects to this new project.
-- =
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
| |
| Sandor Heese 2006-02-21, 7:02 pm |
| Peter,
If you want to link a file into your project without copying it then you can
do it inside the VS IDE. You will get the same result as you described a
file with a shortcut item attached to it. Here is how it works:
In the project you want the file linked, right click and select 'add
existing item'. Browse to the file to link and do not click the open button
but the small arrow icon to the right of the button and then select 'add as
link'.
A demonstration of this functionality is given by Juval Jowy at:
http://www.microsoft.com/downloads/...&displaylang=en
Sandor
"Peter Larsen" <tjanne39@gmail.com> wrote in message
news:eCtYLqtNGHA.984@tk2msftngp13.phx.gbl...
> BTW, it seems possible to add files to a project from another location
> than current project path.
> I tried that - added files to a project - opened the project file and
> changed the path to the files. After that, i deleted the newly added files
> from the directory - and the project is still up and running.
> The only change i see, is that the icons (placed left to the files in
> solution explorer) changes to contain the shortcut arrow bitmap.
>
> /Peter
>
>
> "void" <goover@ukrpost.net> wrote in message
> news:op.s5bhmdvzc5urqi@odp.ua.btobits.com...
>
>
| |
| Peter Larsen 2006-02-22, 3:57 am |
| Hi Sandor,
This is exactly what i was looking for (how could i miss it):
Thanks.
/Peter
"Sandor Heese" <nospam@nospam.com> wrote in message
news:e9wVVnyNGHA.3264@TK2MSFTNGP11.phx.gbl...
> Peter,
>
> If you want to link a file into your project without copying it then you
> can do it inside the VS IDE. You will get the same result as you described
> a file with a shortcut item attached to it. Here is how it works:
>
> In the project you want the file linked, right click and select 'add
> existing item'. Browse to the file to link and do not click the open
> button but the small arrow icon to the right of the button and then select
> 'add as link'.
>
> A demonstration of this functionality is given by Juval Jowy at:
> http://www.microsoft.com/downloads/...&displaylang=en
>
> Sandor
>
>
> "Peter Larsen" <tjanne39@gmail.com> wrote in message
> news:eCtYLqtNGHA.984@tk2msftngp13.phx.gbl...
>
>
| |
| Peter Larsen 2006-02-22, 3:57 am |
| I understand the meaning of the assembly files, but i dont know how to make
them visible to others.
[color=darkred]
What do you mean by creating a new assembly file - won't it get in conflict
with the existing assembly file (same guid etc) ??
And you are also talking about "adding source file to it" - is it possible
to choose which files you want to add (like drag and drop or similar) ??
| |
|
| On Wed, 22 Feb 2006 10:55:02 +0200, Peter Larsen <tjanne39@gmail.com> =
wrote:
> I understand the meaning of the assembly files, but i dont know how to=
=
> make
> them visible to others.
>
>
o =
[color=darkred]
>
> What do you mean by creating a new assembly file - won't it get in =
> conflict
> with the existing assembly file (same guid etc) ??
> And you are also talking about "adding source file to it" - is it =
> possible
> to choose which files you want to add (like drag and drop or similar) =
??
>
>
e.g.
1. You have solution with project "A" and "B".
2. A and B share one source file
3. Create new project "C" (Class Library) in this solution
4. remove the source from "A" and "B" projects
5. Add this source file to project "C"
6. RightClick on "Reference" option of project "A". Press "Add reference=
" =
and add project "C" as a reference.
7. do the same for "B"
that is all. your source file will be compiled once and will be used whe=
re =
you want.
-- =
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
| |
| Peter Larsen 2006-02-22, 7:59 am |
| Thanks
"void" <goover@ukrpost.net> wrote in message
news:op.s5dcn406c5urqi@odp.ua.btobits.com...
On Wed, 22 Feb 2006 10:55:02 +0200, Peter Larsen <tjanne39@gmail.com>
wrote:
> I understand the meaning of the assembly files, but i dont know how to
> make
> them visible to others.
>
>
>
> What do you mean by creating a new assembly file - won't it get in
> conflict
> with the existing assembly file (same guid etc) ??
> And you are also talking about "adding source file to it" - is it
> possible
> to choose which files you want to add (like drag and drop or similar) ??
>
>
e.g.
1. You have solution with project "A" and "B".
2. A and B share one source file
3. Create new project "C" (Class Library) in this solution
4. remove the source from "A" and "B" projects
5. Add this source file to project "C"
6. RightClick on "Reference" option of project "A". Press "Add reference"
and add project "C" as a reference.
7. do the same for "B"
that is all. your source file will be compiled once and will be used where
you want.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
|
|
|
|
|