I'm a newbie to Dot NET. Can anyone show me how to compile a reusable code
repository so that codes can be reused by a number of Web Forms in the .NET
Framework. In the classic ASP, Include files are used but I don't know how to
do it in C#.Net.

Any help is greatly appreciated.

Re: Share common code by Richard

Richard
Mon Sep 27 01:39:37 CDT 2004

From within Visual Studio:

Create a "Class Library" Project and put your common code in there. Be sure to mark all the classes that wou want visible as public. Set a reference to this project from the applications that want to use the common code.

From the command line:

Put roud classes in one or more .cs files making sure to mark all the necessary exposed classes as public then run
csc /t:library *.cs
to create a .dll. This then needs to be referenced by the applications using the common code

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.framework/<97F75292-54D0-48BF-99F8-5D455A8FDBE9@microsoft.com>

I'm a newbie to Dot NET. Can anyone show me how to compile a reusable code
repository so that codes can be reused by a number of Web Forms in the .NET
Framework. In the classic ASP, Include files are used but I don't know how to
do it in C#.Net.

Any help is greatly appreciated.

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.768 / Virus Database: 515 - Release Date: 22/09/2004



[microsoft.public.dotnet.framework]

Re: Share common code by CalvinKD

CalvinKD
Mon Sep 27 02:19:04 CDT 2004

Thanks Richard.
Will those dlls automatically be part of the .NET application at deployment
(packaged) or do you have to administer them separately on the Server?

I'm using Visual Studio 2003 with DotNET version 1.1

"Richard Blewett [DevelopMentor]" wrote:

> From within Visual Studio:
>
> Create a "Class Library" Project and put your common code in there. Be sure to mark all the classes that wou want visible as public. Set a reference to this project from the applications that want to use the common code.
>
> From the command line:
>
> Put roud classes in one or more .cs files making sure to mark all the necessary exposed classes as public then run
> csc /t:library *.cs
> to create a .dll. This then needs to be referenced by the applications using the common code
>
> Regards
>
> Richard Blewett - DevelopMentor
> http://staff.develop.com/richardb/weblog
>
> nntp://news.microsoft.com/microsoft.public.dotnet.framework/<97F75292-54D0-48BF-99F8-5D455A8FDBE9@microsoft.com>
>
> I'm a newbie to Dot NET. Can anyone show me how to compile a reusable code
> repository so that codes can be reused by a number of Web Forms in the .NET
> Framework. In the classic ASP, Include files are used but I don't know how to
> do it in C#.Net.
>
> Any help is greatly appreciated.
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.768 / Virus Database: 515 - Release Date: 22/09/2004
>
>
>
> [microsoft.public.dotnet.framework]
>

Re: Share common code by CalvinKD

CalvinKD
Mon Sep 27 02:53:03 CDT 2004

That's OK.
Thanks Richard.

"Richard Blewett [DevelopMentor]" wrote:

> If you build the MSI using VS.NET then yes, they wikll be part of the deployment package.
>
> The only issue you may get is that you will end up with multiple copies of the shared assembly - one for each application. This is not necessarily a problem. If you only want one copy you will have to install the shared assembly in the GAC which means strong naming it.
>
> Regards
>
> Richard Blewett - DevelopMentor
> http://staff.develop.com/richardb/weblog
>
> nntp://news.microsoft.com/microsoft.public.dotnet.framework/<11C4382B-C697-4D45-A156-04BFA8854D03@microsoft.com>
>
> Thanks Richard.
> Will those dlls automatically be part of the .NET application at deployment
> (packaged) or do you have to administer them separately on the Server?
>
> I'm using Visual Studio 2003 with DotNET version 1.1
>
> "Richard Blewett [DevelopMentor]" wrote:
>
> > From within Visual Studio:
> >
> > Create a "Class Library" Project and put your common code in there. Be sure to mark all the classes that wou want visible as public. Set a reference to this project from the applications that want to use the common code.
> >
> > From the command line:
> >
> > Put roud classes in one or more .cs files making sure to mark all the necessary exposed classes as public then run
> > csc /t:library *.cs
> > to create a .dll. This then needs to be referenced by the applications using the common code
> >
> > Regards
> >
> > Richard Blewett - DevelopMentor
> > http://staff.develop.com/richardb/weblog
> >
> > nntp://news.microsoft.com/microsoft.public.dotnet.framework/<97F75292-54D0-48BF-99F8-5D455A8FDBE9@microsoft.com>
> >
> > I'm a newbie to Dot NET. Can anyone show me how to compile a reusable code
> > repository so that codes can be reused by a number of Web Forms in the .NET
> > Framework. In the classic ASP, Include files are used but I don't know how to
> > do it in C#.Net.
> >
> > Any help is greatly appreciated.
> >
> > ---
> > Incoming mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.768 / Virus Database: 515 - Release Date: 22/09/2004
> >
> >
> >
> > [microsoft.public.dotnet.framework]
> >
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.768 / Virus Database: 515 - Release Date: 22/09/2004
>
>
>
> [microsoft.public.dotnet.framework]
>