No Namespace Danger?

  • Thread starter Thread starter localhost
  • Start date Start date
L

localhost

I have a single class in a single DLL. I want to use it as a
reference in many different Visual Studio projects (web, winform,
etc). Is there any danger in not using a namespace for this single
DLL? I thought it would save typing but am unsure if there is any
long-term development danger I am not thinking of.
 
I wonder if this issue should not be addressed better in IDE somehow. I
often want to reuse my libraries this way, but saving them as dlls always
seems to be more work then it should be. And if you need to make a change
to orig lib or debug it along with your new project then you need the
project again and you sometimes I end up having issues with this. Naturally
this could all be my own ignorance in using the tools or not have a set
pattern for doing this cleanly. However I wonder if some common container
(with UI) would not be better to house your namespaces and libraries in
native code. When you compile one project that uses lib, then copy is saved
down with project, but original library can be referenced and changed with
future projects, and so on.
 
I wonder if this issue should not be addressed better in IDE somehow.
I often want to reuse my libraries this way, but saving them as dlls
always seems to be more work then it should be. And if you need to
make a change to orig lib or debug it along with your new project
then you need the project again and you sometimes I end up having
issues with this. Naturally this could all be my own ignorance in
using the tools or not have a set pattern for doing this cleanly.
However I wonder if some common container (with UI) would not be
better to house your namespaces and libraries in native code. When
you compile one project that uses lib, then copy is saved down with
project, but original library can be referenced and changed with
future projects, and so on.

William

I have moved back and forth between using a DLL and linking the
original file about half a dozen times in the last year or so :-)

I agree with you that the latter is more flexible and easier to update.
The only problem being that if a control in the library (say my RTF
text editor) itself uses another couple of controls when you have to
remember to add links to all the files.

We really could do with a 'using' statement for C#/VB.
 
We really could do with a 'using' statement for C#/VB.

There is one, but maybe not for what you want. What are you thinking?
 
There is one, but maybe not for what you want. What are you thinking?

Whoops!

Meant #include so that I can make sure each control pulls in all its
sub controls/libraries.

I know I can put them all in the same file but I often want to use them
independently.
 
Hi Jeff,

Based on my test, if we have the reference structure as below.
winform hold controlB, control B hold controlA
When we add a reference to ControlB, control A will be added to the
reference automatically.
Also we can build two controls in one assembly(dll).
Only after we have add reference can we use the using directive to use the
library. actually if we do not use the using directive, we can use full
namespace to do the job.
So I am somewhat confusion about your problem.
IF you still have any concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Jeff,

Based on my test, if we have the reference structure as below.
winform hold controlB, control B hold controlA
When we add a reference to ControlB, control A will be added to the
reference automatically.
Also we can build two controls in one assembly(dll).
Only after we have add reference can we use the using directive to
use the library. actually if we do not use the using directive, we
can use full namespace to do the job.
So I am somewhat confusion about your problem.
IF you still have any concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Hi Peter

I was talking about including the original source files in another
project (by adding a link) rather than compiling them into a dll then
using that.

If I have usercontrol1 that uses both usercontrol2 and usercontrol3
(which are in separate files because I also use them on their own) I
have to add a link to all three files in any new project that uses
usercontrol1.

Now if I could add in the file for usercontrol1:

#include usercontrol2
#include usercontrol3

I would be a really happy bunny :-)
 
Hi Jeff,

Thank you for your input.
So far, vs.net ide did not support such feature, but I think may submit a
wish to out mswish website.

Microsoft offers several ways for you to send comments or suggestions about
Microsoft products. If you have suggestions for product enhancements that
you would like to see in future versions of Microsoft products, please
contact us using one of the methods listed later in this article.

Let us know how we can improve our products.

Product Enhancement suggestions can include:

" Improvements on existing products.
" Suggestions for additional features.
" Ways to make products easier to use.

World Wide Web - To send a comment or suggestion via the Web, use one of
the following methods:

" In Internet Explorer 6, click Send Feedback on the Help menu and then
click the link in the Product Suggestion section of the page that appears.
" In Windows XP, click Help and Support on the Start menu. Click Send your
feedback to Microsoft, and then fill out the Product Suggestion page that
appears.
" Visit the following Microsoft Web site: http://www.microsoft.com/ms.htm
" Click Microsoft.com Guide in the upper-right corner of the page and then
click Contact Us . Click the link in the Product Suggestion section of the
page that appears.
" Visit the following Microsoft Product Feedback Web site:
"http://register.microsoft.com/mswish/suggestion.asp" and then complete and
submit the form.

E-mail - To send comments or suggestions via e-mail, use the following
Microsoft Wish Program e-mail address, (e-mail address removed).
FAX - To send comments or suggestions via FAX, use the following Microsoft
FAX number, (425) 936-7329.

Each product suggestion is read by a member of our product feedback team,
classified for easy access, and routed to the product or service team to
drive Microsoft product and/or service improvements. Because we receive an
abundance of suggestions (over 69,000 suggestions a year!) we can't
guarantee that each request makes it into a final product or service. But
we can tell you that each suggestion has been received and is being
reviewed by the team that is most capable of addressing it.

All product or service suggestions received become the sole property of
Microsoft. Should a suggestion be implemented, Microsoft is under no
obligation to provide compensation.



Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Jeff,

Thank you for your input.
So far, vs.net ide did not support such feature, but I think may
submit a wish to out mswish website.
[snipped]

Each product suggestion is read by a member of our product feedback
team, classified for easy access, and routed to the product or
service team to drive Microsoft product and/or service improvements.
Because we receive an abundance of suggestions (over 69,000
suggestions a year!) we can't guarantee that each request makes it
into a final product or service. But we can tell you that each
suggestion has been received and is being reviewed by the team that
is most capable of addressing it.

Thanks Peter, I've done that.

It's now 69,001 suggestions for 2004 :-)
 
Hi Jeff,

Now I think our product group will evaluate the wish and then judge if it
will be added into the next version of VS.NET IDE.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top