473,320 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Shared .cs files, and file locations

I'm relatively new to the .cs world. I would like to have some "shared" .cs
files, which several solutions can use. I don't want to place these in a
..dll, I simply want them included into various applications. I have tried
several methods, but most have failed. The most obvious way (I thought) was
to place the .cs files in a parent folder (maybe called "shared"), and then
simply drag-n-drop the files into the "Solution Explorer" (files list) --
But, this actually copies the files into the folder where the solution
exists.

Is there some way to have a folder with many .cs files in it, and have those
..cs files be included in several solutions?

Any suggestions, pointers concepts, ideas?
Thanks
DanB
The only idea I currently have is as follows:
1) Have a main project folder: "C:\Projects\"
2) Place the solution files for every project in this folder (this includes:
..sln, .slu, .csproj, .csproj.user)
(Note: This seems like a huge pain. Every project solution files are in
the same folder! Yuck!)
project1.*
project2.*
project3.*
...
3) Each project would have a folder for the project files:
"C:\Projects\project1"
Form1.cs
App.ico
bin\
...
4) Have a "shared" folder: "C:\Projects\Shared"
Shared.cs
OtherShared.cs
...
5) Now, all the projects can include the shared .cs files, and only have
*one* copy of them also.
Nov 17 '05 #1
2 3142
There was a discussion on this subject a little while back.
http://www.google.ca/groups?hl=en&lr...TNGP10.phx.gbl

--
Tim Wilson
..Net Compact Framework MVP

"Dan Baker" <dbmail> wrote in message
news:uo**************@tk2msftngp13.phx.gbl...
I'm relatively new to the .cs world. I would like to have some "shared" ..cs files, which several solutions can use. I don't want to place these in a
.dll, I simply want them included into various applications. I have tried
several methods, but most have failed. The most obvious way (I thought) was to place the .cs files in a parent folder (maybe called "shared"), and then simply drag-n-drop the files into the "Solution Explorer" (files list) --
But, this actually copies the files into the folder where the solution
exists.

Is there some way to have a folder with many .cs files in it, and have those .cs files be included in several solutions?

Any suggestions, pointers concepts, ideas?
Thanks
DanB
The only idea I currently have is as follows:
1) Have a main project folder: "C:\Projects\"
2) Place the solution files for every project in this folder (this includes: .sln, .slu, .csproj, .csproj.user)
(Note: This seems like a huge pain. Every project solution files are in the same folder! Yuck!)
project1.*
project2.*
project3.*
...
3) Each project would have a folder for the project files:
"C:\Projects\project1"
Form1.cs
App.ico
bin\
...
4) Have a "shared" folder: "C:\Projects\Shared"
Shared.cs
OtherShared.cs
...
5) Now, all the projects can include the shared .cs files, and only have
*one* copy of them also.

Nov 17 '05 #2
Fantastic!
Thank you * 1Gig.
DanB

The part from the discussion I was looking for I copied below:
"When you add the code file to the project make sure that you specify it as
a
"link file". So in the "Add Existing Item" dialog, after you select the
DM.cs file, select the drop down arrow on the "Open" button and then select
"Link File". The file will now appear in the Solution Explorer, under the
appropriate project, with a code file icon that looks like it has a little
shortcut image over top of it."

"Tim Wilson" <TIM(UNDERSCORE)WILSON(AT)ROGERS(PERIOD)COM> wrote in message
news:eV**************@TK2MSFTNGP15.phx.gbl...
There was a discussion on this subject a little while back.
http://www.google.ca/groups?hl=en&lr...TNGP10.phx.gbl

--
Tim Wilson
.Net Compact Framework MVP

"Dan Baker" <dbmail> wrote in message
news:uo**************@tk2msftngp13.phx.gbl...
I'm relatively new to the .cs world. I would like to have some "shared"

.cs
files, which several solutions can use. I don't want to place these in a
.dll, I simply want them included into various applications. I have
tried
several methods, but most have failed. The most obvious way (I thought)

was
to place the .cs files in a parent folder (maybe called "shared"), and

then
simply drag-n-drop the files into the "Solution Explorer" (files list) --
But, this actually copies the files into the folder where the solution
exists.

Is there some way to have a folder with many .cs files in it, and have

those
.cs files be included in several solutions?

Any suggestions, pointers concepts, ideas?
Thanks
DanB
The only idea I currently have is as follows:
1) Have a main project folder: "C:\Projects\"
2) Place the solution files for every project in this folder (this

includes:
.sln, .slu, .csproj, .csproj.user)
(Note: This seems like a huge pain. Every project solution files are

in
the same folder! Yuck!)
project1.*
project2.*
project3.*
...
3) Each project would have a folder for the project files:
"C:\Projects\project1"
Form1.cs
App.ico
bin\
...
4) Have a "shared" folder: "C:\Projects\Shared"
Shared.cs
OtherShared.cs
...
5) Now, all the projects can include the shared .cs files, and only have
*one* copy of them also.


Nov 17 '05 #3

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

Similar topics

0
by: Eliezer Figueroa | last post by:
Managing Multiple Excel incoming files? I have this situation. I have a client which have several locations they work primary with excel forms and they are thinking in doing reports with them....
2
by: \A_Michigan_User\ | last post by:
Ok, I give up. I need to #include the same 1 file (IncludeThis.asp) into 3 different asp files. 1> C:\MyDir\ThisFile.asp 2> D:\MyDir\AASubSub\ThatFile.asp 3>...
12
by: Corey Burnett | last post by:
I have a client that has a split database (front-end/back-end). They are also using Access security - MDW file. The front end MDE file, the back end MDB file, and the MDW file are all located on...
5
by: Brian | last post by:
I need to import data from 720 csv files into an Access database so I can do some editing prior to loading into a SQL Server. These files came from data output from a mainframe on a monthly basis....
9
by: Invalidlastname | last post by:
Hi, We developed some assemblies which use EnterpriseServices queued components. In order to use EnterpriseServices, these assemblies need to be installed into GAC. I used the pre-build and...
8
by: John K. | last post by:
Hi I was wondering if it's possible to use the WebRequest class to access a file on windows shared folder with authentication? If yes, what would the syntax be? I've tried to look this up in the...
2
by: Apprentice | last post by:
Hi there, Is there a way in which I can specify at runtime to an application the locations of shared dynamic libraries on which it depends? I do not want to use LD_LIBRARY_PATH or other LD...
0
by: esha | last post by:
I'm learning WEB site stuff with C# and have a question. In order to produce precompiled application (dlls and required for a real hosting files) it's not enough to build the solution. It must be...
2
by: DragonShade | last post by:
To be honest, I'm not sure if this is a .NET issue, some configuration on a PC, or a setting in a database but here goes: Environment (have NO control over): XP (London & Tokyo),.NET 2.0 C#, 2...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.