473,498 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Modular approach to .net development for large solution?

Tim
Dear All,

I have been working with VB.NET for the last 5 months or so as a solo
developer for a small business. I have already started developing the
application but have hit a snag with the referencing of one project
within another.

I would like to develop the solution using a modular approach such
that the solution will be made up of several smaller projects being
referenced by a main application project. Some of these smaller
projects may well have to work independently from the main application
so these have been set-up as New Windows Applications.

My problem is that when I try to call a form held within the smaller
project from within the main application project I will require a
reference to the sub-project. However, to create a reference to this
project from within my main project I need to connect to a .dll or a
COM object. Now, I'm not really clear whether or not I should have
created this sub-project as a com object as I want it to be able to
run independently from the main application project as well. I just
can't seem to find a .dll within the sub-project folder, just an
Executable?

So how should I be structuring my solution so that I reference the
smaller projects from within the main project? And Allow some of the
smaller projects to run independently? And do I create the other
smaller projects that will not run independently but that provide
specific functionality as COM objects?

Any help much appreciated!!

Kind Regards,

Tim
Jul 21 '05 #1
5 2245
You should add a Project Reference from the main project to the sub
projects. If you are using .NET, then no need to use COM (except for
interop with legacy code).

-mike
MVP

"Tim" <tp********@plls.co.uk> wrote in message
news:10**************************@posting.google.c om...
Dear All,

I have been working with VB.NET for the last 5 months or so as a solo
developer for a small business. I have already started developing the
application but have hit a snag with the referencing of one project
within another.

I would like to develop the solution using a modular approach such
that the solution will be made up of several smaller projects being
referenced by a main application project. Some of these smaller
projects may well have to work independently from the main application
so these have been set-up as New Windows Applications.

My problem is that when I try to call a form held within the smaller
project from within the main application project I will require a
reference to the sub-project. However, to create a reference to this
project from within my main project I need to connect to a .dll or a
COM object. Now, I'm not really clear whether or not I should have
created this sub-project as a com object as I want it to be able to
run independently from the main application project as well. I just
can't seem to find a .dll within the sub-project folder, just an
Executable?

So how should I be structuring my solution so that I reference the
smaller projects from within the main project? And Allow some of the
smaller projects to run independently? And do I create the other
smaller projects that will not run independently but that provide
specific functionality as COM objects?

Any help much appreciated!!

Kind Regards,

Tim

Jul 21 '05 #2
Tim
Thanks for you post Mike,

I have tried to create a project reference, however I am retrurned
this error message when I tryed to reference my sub-project from
within my main project.

"A Reference to 'CONTACTS' could not be added. An assembly must have a
'.dll' extension in order to be refenced."

Is there a problem with the way I have setup my sub-project to build?

Regards,

Tim
Jul 21 '05 #3
"Tim" <tp********@plls.co.uk> wrote in message
news:10**************************@posting.google.c om...
Dear All,

I have been working with VB.NET for the last 5 months or so as a solo
developer for a small business. I have already started developing the
application but have hit a snag with the referencing of one project
within another.


You might like to consider splitting off the user interface code from the
non-visual code, and putting the non-visual stuff into a library project
(dll). Then you could use the shared library from all the Winform projects.

Tim
Where is Borland going?
http://www.itwriting.com/borlandtop.php
Jul 21 '05 #4
Yes, make sure your CONTACTS project is a Class Library, not an Exe. If you
need Contacts to be a separate program in and of itself, then you'll need to
move its core code into a DLL project, which both Contacts (EXE) and your
main EXE can reference.

-mike
MVP

"Tim" <tp********@plls.co.uk> wrote in message
news:10**************************@posting.google.c om...
Thanks for you post Mike,

I have tried to create a project reference, however I am retrurned
this error message when I tryed to reference my sub-project from
within my main project.

"A Reference to 'CONTACTS' could not be added. An assembly must have a
'.dll' extension in order to be refenced."

Is there a problem with the way I have setup my sub-project to build?

Regards,

Tim

Jul 21 '05 #5
tp********@plls.co.uk (Tim) wrote in news:100ccfa6.0312020120.34bcce22
@posting.google.com:
"A Reference to 'CONTACTS' could not be added. An assembly must have a
'.dll' extension in order to be refenced."


VS.NET requires that references (even to projects) be only to class
libraries, not .exe (windows forms or console). This is a limitation of
VS.NET, and not a limitation of VB.NET, C#, the CLR, the framework or
anything else. If you build from the command line, you can do your
references any way you like.

example:
test.cs contains:

public class someclass
{
public static void Main()
{
System.Console.WriteLine("hello, world");
}
}
user.cs contains:

class otherclass
{
static void Main()
{
System.Console.WriteLine("running someclass.Main()");
System.Console.Write(" ");
someclass.Main();
System.Console.WriteLine("done.");
}
}
build test.exe with:
csc /t:exe test.cs
build user.exe with:
csc /t:exe /r:test.exe user.cs

Run user.exe, and see that it uses the class in test.exe

Mark
Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
3746
by: Hayden Kirk | last post by:
Hey guys I am about to write some back end software for my business. I want a system that I can create invoices, clients etc... I can do this no problem. However I want to write it in modules so...
5
2868
by: steve | last post by:
Hi, I finally figured out the best way to synch local and remote script folders, containing many php script files. What I used to do before was try to ftp all the changed files, etc. which was...
18
5603
by: Zero | last post by:
Hi, I am calculating an integer to the pwer of a large integer, e.g. 2^5000. It turns out that the result I always get is zero. I am sure that the result is too large to store in such type...
16
1880
by: Linus | last post by:
Being a ASP developer for a consultant company thinking of starting developing with ASP.NET I have read literally hundreds of web pages and posts in discussion forums on the Internet to get an idea...
4
2291
by: Nick Goloborodko | last post by:
Hi, I'm in the process of conceptualizing a new ASP.NET application. I'm a relative newbie in ASP.NET / .NET in general, so any comments will be greatly appreciated. Basically i need to make...
12
2178
by: Don Huan | last post by:
Hi my job is to migrate our WinForms application to ASP.NET. This app was build very modular so every peace of code can be replaced by another "modul". There are 1 VS-solution with about 60...
5
295
by: Tim | last post by:
Dear All, I have been working with VB.NET for the last 5 months or so as a solo developer for a small business. I have already started developing the application but have hit a snag with the...
22
2958
by: Wildemar Wildenburger | last post by:
To make it short: Is there something like this already? There seem to loads of python frameworks for Web-Apps, but I have a hard time finding one for desktop-apps. I imagine it wouldn't be too...
2
3460
by: Canice | last post by:
I'm working on a web application where 90% of it is common 'product' code an the other 10% is customer specific. I want some method of separating the customer specific presentation, business and...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4590
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1419
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.