Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2004

Tip: Looking for answers? Try searching our database.

Share common code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Calvin KD - 27 Sep 2004 06:49 GMT
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.
Richard Blewett [DevelopMentor] - 27 Sep 2004 07:39 GMT
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.



[microsoft.public.dotnet.framework]
Calvin KD - 27 Sep 2004 08:19 GMT
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

> From within Visual Studio:
>
[quoted text clipped - 27 lines]
>  
>  [microsoft.public.dotnet.framework]
Richard Blewett [DevelopMentor] - 27 Sep 2004 08:27 GMT
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:
>
[quoted text clipped - 26 lines]
>
> [microsoft.public.dotnet.framework]




[microsoft.public.dotnet.framework]
Calvin KD - 27 Sep 2004 08:53 GMT
That's OK.
Thanks Richard.

> If you build the MSI using VS.NET then yes, they wikll be part of the deployment package.
>
[quoted text clipped - 56 lines]
>  
>  [microsoft.public.dotnet.framework]

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.